reactos.git
8 years ago[LOCALSPL]
Colin Finck [Fri, 17 Jul 2015 14:18:22 +0000 (14:18 +0000)]
[LOCALSPL]
- Bugfix: A cb value includes the terminating null-character, a cch value does not. Fix the conversion.
- Bugfix: Properly calculate the required buffer size in LocalGetPrintProcessorDirectory and properly copy the string.

svn path=/branches/colins-printing-for-freedom/; revision=68410

8 years ago[LOCALSPL]
Colin Finck [Fri, 17 Jul 2015 13:00:49 +0000 (13:00 +0000)]
[LOCALSPL]
Report any error that occured inside _OpenEnvironment.

svn path=/branches/colins-printing-for-freedom/; revision=68409

8 years ago[SPOOLSV, WINSPOOL]
Colin Finck [Fri, 17 Jul 2015 10:57:10 +0000 (10:57 +0000)]
[SPOOLSV, WINSPOOL]
- Add RPC calls, proper marshalling and exports for all implemented functions.
- Move the spoolsv stubs into categories, so that future implementations in winspool, spoolsv, spoolss and localspl can follow a consistent naming scheme.

svn path=/branches/colins-printing-for-freedom/; revision=68408

8 years ago[FORMATTING]
Colin Finck [Thu, 16 Jul 2015 15:24:40 +0000 (15:24 +0000)]
[FORMATTING]
Tabs -> Spaces

svn path=/branches/colins-printing-for-freedom/; revision=68407

8 years agoMerge r67713 and r67936 (Eric's parport driver) from trunk
Colin Finck [Thu, 16 Jul 2015 15:12:50 +0000 (15:12 +0000)]
Merge r67713 and r67936 (Eric's parport driver) from trunk

svn path=/branches/colins-printing-for-freedom/; revision=68406

8 years ago[LOCALSPL, WINSPOOL]
Colin Finck [Thu, 16 Jul 2015 15:03:47 +0000 (15:03 +0000)]
[LOCALSPL, WINSPOOL]
Partially implement the whole StartDocPrinter, StartPagePrinter, ReadPrinter, WritePrinter, EndPagePrinter, EndDocPrinter, ClosePrinter group of functions.
They behave very differently based on whether spooled printing is enabled, whether it's a local or remote call, etc. Most information was gained by observing callchains under Windows.

So far, only the spooled path is implemented, the others need more investigation first.
Many other TODOs remain as well, see the comments.

Also make some more comments Doxygen-aware :)

svn path=/branches/colins-printing-for-freedom/; revision=68405

8 years ago[SPOOLSV]
Colin Finck [Thu, 16 Jul 2015 13:59:20 +0000 (13:59 +0000)]
[SPOOLSV]
Implement the RPC calls for EnumMonitors, EnumPorts, ClosePrinter, EndDocPrinter, EndPagePrinter, ReadPrinter, StartDocPrinter, StartPagePrinter and WritePrinter.

svn path=/branches/colins-printing-for-freedom/; revision=68404

8 years ago[LOCALMON]
Colin Finck [Wed, 15 Jul 2015 18:45:37 +0000 (18:45 +0000)]
[LOCALMON]
- Bugfix: Unset bStartedDoc in LocalmonEndDocPort so that new documents can be started again.
- Bugfix: Use CREATE_ALWAYS instead of OPEN_ALWAYS for CreateFileW to truncate any existing output file before writing a new document into it.

svn path=/branches/colins-printing-for-freedom/; revision=68403

8 years ago[LOCALMON]
Colin Finck [Wed, 15 Jul 2015 18:15:33 +0000 (18:15 +0000)]
[LOCALMON]
My idea to just care about COM, FILE: and LPT ports was too short-sighted.
Apart from selecting a FILE: port that prompts for the output filename at printing, you can also add a port "C:\bla.txt" to always output into that particular file.
Even shared network printers can be added as a local port "\\COMPUTERNAME\PrinterName" (and Windows even does that when auto-adding printers found on the network). Note that this is the exception though, shared network printers are normally handled by a different component.

Our localmon now handles all valid ports found in the registry.
Port name checks were modified to be extra-picky and not let any false positives happen (e.g. trying to print into a file starting with "LPT" shouldn't be treated as printing to an LPT port)

svn path=/branches/colins-printing-for-freedom/; revision=68402

8 years ago[WINPRINT]
Colin Finck [Wed, 15 Jul 2015 15:53:04 +0000 (15:53 +0000)]
[WINPRINT]
Bugfix: The Printer Name with Port is given through the parameter pPrinterName, not the pPrinterName field of the pPrintProcessorOpenData structure.

svn path=/branches/colins-printing-for-freedom/; revision=68401

8 years ago[LOCALSPL]
Colin Finck [Mon, 13 Jul 2015 10:18:07 +0000 (10:18 +0000)]
[LOCALSPL]
- Rewrite LocalOpenPrinter to also properly support opening Port and Xcv handles.
- Manage a list of Ports and their associated Print Monitors.
- const-ify some parameters.

svn path=/branches/colins-printing-for-freedom/; revision=68397

8 years ago[LOCALSPL]
Colin Finck [Wed, 8 Jul 2015 12:35:35 +0000 (12:35 +0000)]
[LOCALSPL]
Bugfix: Copy the full DevMode including the extra data by the driver.

svn path=/branches/colins-printing-for-freedom/; revision=68379

8 years ago[LOCALSPL]
Colin Finck [Tue, 7 Jul 2015 17:06:48 +0000 (17:06 +0000)]
[LOCALSPL]
- Initialize all Print Monitors on startup and keep a list of them.
- Implement LocalEnumMonitors and LocalEnumPorts.
- Check the result of the initialization functions.

[SPOOLSS]
- Implement support for multiple Print Providers.
  Initialize them on startup and keep a list here as well.
- Implement all functions that had simple stubs in the C code. This still needs to be done for the remaining functions stubbed in the .spec file.
  But generally spoken, this always boils down to 3 cases:
    * Forward the call to the Local Spooler (for general functions like GetPrintProcessorDirectory).
    * Forward the call to the Print Provider we used for OpenPrinter (for functions like SetJob).
    * Forward the call to all Print Providers and collect the results (for functions like EnumPrinters).

svn path=/branches/colins-printing-for-freedom/; revision=68375

8 years ago[LOCALMON]
Colin Finck [Tue, 7 Jul 2015 10:30:30 +0000 (10:30 +0000)]
[LOCALMON]
- Bugfix: LocalmonClosePort must only free the memory for virtual file ports. Other port entries are reused.
- Bugfix: Set the port type to PortType_OtherLPT in all conditions that ít's not a physical LPT port.
- Synchronize access to the port lists.
- Keep a list of open Xcv handles as well to properly close them on shutdown.
- Add traces to all monitor functions for easier debugging. (requires DEBUGCHANNEL=+localmon environment variable)

svn path=/branches/colins-printing-for-freedom/; revision=68364

8 years ago[LOCALMON]
Colin Finck [Mon, 6 Jul 2015 12:41:06 +0000 (12:41 +0000)]
[LOCALMON]
Implement a Local Port Monitor for COM, FILE: and LPT ports, usable as a drop-in replacement for the Windows original.
Fully implements opening, enumerating and closing ports, starting and ending documents as well as reading and writing to ports along with Xcv data transfer between Port Monitor and Port Monitor UI.
Does not support IrDA printers unlike the Windows original, sorry guys :-P

The Windows Local Port Monitor is partly documented in an ancient DDK sample.
Additional information was gathered through API monitoring.

TODO:
- AddPort, DeletePort and PortIsValid Xcv functions need to be implemented.
- A real privilege check needs to be added to LocalmonXcvOpenPort.
- TESTING TESTING TESTING (under Windows) and fixing bugs.

To test it under Windows:
- Copy the compiled "localmon.dll" to the system32 directory.
- Open regedit.exe and move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Local Port.
- Replace "localspl.dll" by "localmon.dll" for the "Driver" value.

[SPOOLSS]
- Properly stub EnumPortsW to let localmon compile.

svn path=/branches/colins-printing-for-freedom/; revision=68356

8 years ago[PSDK]
Colin Finck [Mon, 6 Jul 2015 09:57:09 +0000 (09:57 +0000)]
[PSDK]
Source our winspool.h from MinGW-w64.
Our current version was still based on MinGW w32api from 2005 and missing lots of definitions added ages ago.

svn path=/branches/colins-printing-for-freedom/; revision=68355

8 years ago[LOCALSPL, WINPRINT]
Colin Finck [Fri, 3 Jul 2015 09:06:35 +0000 (09:06 +0000)]
[LOCALSPL, WINPRINT]
Bugfix: All functions returning multiple elements must only set *pcReturned to the element count on success!
Currently, this was also done when querying the needed buffer size. But for this case, *pcReturned just has to be zeroed.

svn path=/branches/colins-printing-for-freedom/; revision=68335

8 years ago[LOCALSPL]
Colin Finck [Tue, 30 Jun 2015 16:08:16 +0000 (16:08 +0000)]
[LOCALSPL]
Bugfix: The RegEnum* functions take the buffer size _including_ the terminating null character as input and only return the actual data length _without_ the terminating null character as output.

svn path=/branches/colins-printing-for-freedom/; revision=68324

8 years ago[LOCALSPL, WINPRINT]
Colin Finck [Tue, 30 Jun 2015 16:02:26 +0000 (16:02 +0000)]
[LOCALSPL, WINPRINT]
Bugfix: I want to dereference the pointer and then increment its value, not increment the pointer address.

svn path=/branches/colins-printing-for-freedom/; revision=68323

8 years ago[LOCALSPL]
Colin Finck [Tue, 30 Jun 2015 15:54:42 +0000 (15:54 +0000)]
[LOCALSPL]
Bugfix: The last entry in a doubly linked list (LIST_ENTRY structure) is actually the head element again, not NULL!

svn path=/branches/colins-printing-for-freedom/; revision=68322

8 years ago[LOCALSPL]
Colin Finck [Sun, 28 Jun 2015 15:51:32 +0000 (15:51 +0000)]
[LOCALSPL]
- Partly implement LocalScheduleJob.
- Set the default status to JOB_STATUS_SPOOLING in LocalAddJob.
- Fix file sharing flags in ReadJobShadowFile and WriteJobShadowFile.

[SPOOLSS, SPOOLSV, WINSPOOL]
- Forward the newly implemented ScheduleJob call all the way down to localspl.dll.
- Stub ReadPrinter.

[WINPRINT]
Implement a very simple RAW Print Processor that just takes the input and forwards it to the Print Monitor. This one doesn't even do pausing or multiple copies yet.
The implementation includes:
- Implemented ClosePrintProcessor, OpenPrintProcessor and PrintDocumentOnPrintProcessor (apart from the previously implemented EnumPrintProcessorDatatypesW).
- Stubbed ControlPrintProcessor and GetPrintProcessorCapabilities.

svn path=/branches/colins-printing-for-freedom/; revision=68304

8 years ago[LOCALSPL]
Colin Finck [Sat, 27 Jun 2015 15:37:14 +0000 (15:37 +0000)]
[LOCALSPL]
- Write the shadow file after changing job details.
- dwUnknown2 in the shadow file header is actually the offset of the Print Processor Parameters.
- Process all known fields of the shadow file in ReadJobShadowFile and WriteJobShadowFile.

svn path=/branches/colins-printing-for-freedom/; revision=68292

8 years ago[SPOOLSS, SPOOLSV, WINSPOOL]
Colin Finck [Sat, 27 Jun 2015 12:36:45 +0000 (12:36 +0000)]
[SPOOLSS, SPOOLSV, WINSPOOL]
Connect AddJobW, EnumJobsW, GetJobW and SetJobW from winspool.drv over spoolsv.exe and spoolss.dll to the implemented functions in localspl.dll (including marshalling the involved structures down and up).
I decided to not use my recently implemented MarshallDownStructure API here and rather do the pointer math in place as this is simpler and faster.

svn path=/branches/colins-printing-for-freedom/; revision=68288

8 years ago[LOCALSPL]
Colin Finck [Thu, 25 Jun 2015 15:27:38 +0000 (15:27 +0000)]
[LOCALSPL]
Implement LocalEnumJobs the easy way by using the new Skiplist function LookupNodeByIndexSkiplist and calling _LocalGetJobLevelX for each job.
This required changes in _LocalGetJobLevelX, so that the strings are now copied in reverse to the end of the buffer while the structure is copied to the start. By preserving the pointers after each call, the function can be called multiple times.

svn path=/branches/colins-printing-for-freedom/; revision=68264

8 years ago[SKIPLIST]
Colin Finck [Thu, 25 Jun 2015 13:12:01 +0000 (13:12 +0000)]
[SKIPLIST]
- Add a LookupNodeByIndexSkiplist function and a small test for it in skiplist_test.
- Remove a redundant double-set in LookupElementSkiplist.

Yes, we now have one lookup function that accepts search criteria and returns an element and another one that accepts an index and returns a SKIPLIST_NODE.
It's simply because I have exactly these two cases :)
You're free to implement the two missing functions or refactor this code another way.

svn path=/branches/colins-printing-for-freedom/; revision=68262

8 years ago[LOCALSPL]
Colin Finck [Thu, 25 Jun 2015 12:29:18 +0000 (12:29 +0000)]
[LOCALSPL]
- Implement LocalSetJob for Level 1 and 2.
- Add pPrintProcessor, pwszPrintProcessorParameters and pwszStatus members to the LOCAL_JOB structure and use them in LocalAddJob, LocalGetJob and LocalSetJob.
- Fix naming of some LOCAL_JOB members.

svn path=/branches/colins-printing-for-freedom/; revision=68259

8 years ago[SPOOLSS]
Colin Finck [Wed, 24 Jun 2015 16:26:33 +0000 (16:26 +0000)]
[SPOOLSS]
Halfplement and document the undocumented but exported MarshallDownStructure API.
Information about this API was exclusively gained by writing a custom XML file for rohitab.com's API Monitor and monitoring calls under Windows.

I could figure out the parameters passed to the function, but don't really know what most of them are for.
For me, the function does what it should and what I will soon need it for, but without making use of cbSize, cbPerElementSize, cbStructureSize and bSomeBoolean.
A Code Review and additional hints are highly appreciated! My XML file for the API Monitor is available on request.

svn path=/branches/colins-printing-for-freedom/; revision=68253

8 years agoAddendum to r68248
Colin Finck [Wed, 24 Jun 2015 16:20:13 +0000 (16:20 +0000)]
Addendum to r68248

svn path=/branches/colins-printing-for-freedom/; revision=68252

8 years ago[SPOOLSV, WINSPOOL]
Colin Finck [Wed, 24 Jun 2015 09:51:29 +0000 (09:51 +0000)]
[SPOOLSV, WINSPOOL]
Local Communication between winspool.drv and spoolsv.exe happens using the ncalrpc protocol. The ncacn_np endpoint is only available when sharing a printer. It's then used for receiving a remote call from win32spl.dll.
Reference: http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html

This fixes e.g. testing a _RpcOpenPrinter call from our winspool.drv to a local printer under Windows.

svn path=/branches/colins-printing-for-freedom/; revision=68248

8 years ago[WINSPOOL]
Colin Finck [Tue, 23 Jun 2015 13:46:14 +0000 (13:46 +0000)]
[WINSPOOL]
Don't rely on pure magic to transmit the error code of the RPC call to the calling application. Instead use SetLastError on the return value of the call (this is what all these DWORD return values are for!)

[SPOOLSV]
For every RPC function, return the error code of the called Spooler Router function instead of the error code of RpcRevertToSelf.

[LOCALSPL, WINPRINT]
- Change the code structure in every function called from the Spooler Router to always set an error code, especially ERROR_SUCCESS on success.
- Store Attributes and Status values for a local printer.
- Fail in LocalAddJob if an invalid handle has been supplied or the printer is set to do direct printing.

svn path=/branches/colins-printing-for-freedom/; revision=68247

8 years ago[SPOOLSS] [SPOOLSV] [WINSPOOL]
Colin Finck [Mon, 22 Jun 2015 14:31:47 +0000 (14:31 +0000)]
[SPOOLSS] [SPOOLSV] [WINSPOOL]
- Add RPC calls in winspool, Router calls in spoolsv and Local Spooler calls in spoolss for most of the APIs I've implemented in localspl.
  This is still Work-In-Progress and missing some sanity checks, but a first step into something usable from the documented Spooler API side.
- Separate APIs into individual source files just like I did for localspl.

svn path=/branches/colins-printing-for-freedom/; revision=68237

8 years ago[LOCALSPL]
Colin Finck [Fri, 19 Jun 2015 15:21:30 +0000 (15:21 +0000)]
[LOCALSPL]
- Get rid of the Generic Tables entirely and make use of the new Skiplist for the Global Job List, the Printer's Job List and the Printer List.
  Use a doubly linked-list for the Print Processors (there won't be many) and just save the information returned from the Print Processor's EnumPrintProcessorDatatypesW instead of putting it in another structure.
- Implement LocalAddJob and LocalGetJob (with full JOB_INFO_1W and JOB_INFO_2W support)
  This makes use of the element index in the new Skiplist implementation to retrieve the position of the job in the list.
- Do some changes to LocalStartDocPrinter, though this will make use of LocalAddJob in the future.
- Make some global variables static again.

svn path=/branches/colins-printing-for-freedom/; revision=68195

8 years ago[LOCALSPL_APITEST]
Colin Finck [Fri, 19 Jun 2015 15:05:58 +0000 (15:05 +0000)]
[LOCALSPL_APITEST]
Put the calls that eventually give us the function pointers to localspl into a separate procedure GetLocalsplFuncs to enable further tests easily.

svn path=/branches/colins-printing-for-freedom/; revision=68194

8 years ago[RPCRT4]
Colin Finck [Fri, 19 Jun 2015 15:00:41 +0000 (15:00 +0000)]
[RPCRT4]
Add a lazy stub for RpcBindingServerFromClient to get my upcoming localspl changes to compile.
This needs further attention later.

svn path=/branches/colins-printing-for-freedom/; revision=68193

8 years ago[SKIPLIST]
Colin Finck [Fri, 19 Jun 2015 12:33:45 +0000 (12:33 +0000)]
[SKIPLIST]
Verify that SKIPLIST_LEVELS is in the required range using C_ASSERTs (thanks to Thomas for the hint!)

svn path=/branches/colins-printing-for-freedom/; revision=68192

8 years ago[SKIPLIST]
Colin Finck [Fri, 19 Jun 2015 10:27:46 +0000 (10:27 +0000)]
[SKIPLIST]
Add my implementation of an efficient Skiplist. A Skiplist can do insertion, deletion and lookups in O(log N) on average just like balanced trees.
It features simpler algorithms though due to purely relying on probabilistic balancing at insertion and not on rebalancing with every modification.

This simple structure allowed me to implement some additions on top of the standard algorithms:
* Storing distances between elements on each level to efficiently return the index of the element in the Skiplist when doing a lookup.
* InsertTailElementSkiplist to explicitly insert an element at the end of the Skiplist.
  This needs no comparisons and is useful when you can be sure that the new element would be inserted at the end (e.g. for a new print job in the queue with default priority).

More features are easily possible, but for now I limited features on those needed for my Local Spooler work.

Some references on Skiplists:
* ftp://ftp.cs.umd.edu/pub/skipLists/skiplists.pdf
* http://drum.lib.umd.edu/bitstream/1903/544/2/CS-TR-2286.1.pdf

svn path=/branches/colins-printing-for-freedom/; revision=68191

8 years ago[LOCALSPL_APITEST]
Colin Finck [Wed, 10 Jun 2015 21:49:49 +0000 (21:49 +0000)]
[LOCALSPL_APITEST]
It's only the second disabled test, which is causing trouble for us, so reactivate the first one.
This also confirms that the problem is not related to SEH.

svn path=/branches/colins-printing-for-freedom/; revision=68104

8 years ago[LOCALSPL_APITEST]
Colin Finck [Tue, 9 Jun 2015 13:22:25 +0000 (13:22 +0000)]
[LOCALSPL_APITEST]
- Add more tests for fpEnumPrinters.
  For some reason, using SEH here works only once. We experience a hang in the testing process when you run the test again for a second time without restarting spoolsv. Needs more investigation.
- Ensure that the spooler service is running before starting any testing.
- Do proper cleanup in every case.

[LOCALSPL]
- Implement LocalEnumPrinters level 1 based on the API-Tests.
- Use DllAllocSplMem/DllFreeSplMem instead of HeapAlloc/HeapFree.
- Use AllocSplStr with DllFreeSplStr now that DuplicateStringW is gone.
- Use _countof where applicable.

[SPOOLSS]
- Found out that I was not the only one needing a wcsdup equivalent. My DuplicateStringW from localspl is actually exported as AllocSplStr in spoolss.
  This is actually part of a range of undocumented memory functions in spoolss, so implement and document AllocSplStr, DllAllocSplMem, DllFreeSplMem, DllFreeSplStr, ReallocSplMem and ReallocSplStr.
  Information about some of them was gathered through black box testing and DDK samples (down to Win95 DDK), which at least contained prototypes of them.
- Implement SplInitializeWinSpoolDrv based on the API-Test and simply return FALSE for SplIsUpgrade.

[SPOOLSS_APITEST]
- Add a test for ReallocSplStr, which was actually the most undocumented function of spoolss' memory functions.

[WINSPOOL]
SplInitializeWinSpoolDrv shows that we can't just auto-assign an ordinal to all winspool.drv functions. We even need to export some nameless functions by ordinal only.
Redo the whole .spec file based on the ordinals found in Windows Server 2003's winspool.drv. Trust WINE for the nameless stubs.

svn path=/branches/colins-printing-for-freedom/; revision=68089

8 years ago[LOCALSPL_APITEST]
Colin Finck [Mon, 8 Jun 2015 17:15:44 +0000 (17:15 +0000)]
[LOCALSPL_APITEST]
Write an API-Test for localspl.dll. As the original localspl.dll from Windows Server 2003 relies on proper initialization inside spoolsv.exe, we cannot test it standalone as usual.
To make testing possible anyway, this program basically does four things:

  - Injecting our testing code into spoolsv.exe.
  - Registering and running us as a service in the SYSTEM security context like spoolsv.exe, so that injection is possible at all.
  - Sending the test name and receiving the console output over named pipes.
  - Redirecting the received console output to stdout again, so it looks and feels like a standard API-Test.

Nevertheless, the testing code in fpEnumPrinters.c is still written like a usual test. The known ok(), skip(), etc. macros can be used as usual, their output is just redirected through the named pipes.
Thanks to Thomas for giving me the tip about injecting code into spoolsv! :)

svn path=/branches/colins-printing-for-freedom/; revision=68080

8 years ago[SPOOLSS_APITEST]
Colin Finck [Sat, 6 Jun 2015 12:32:30 +0000 (12:32 +0000)]
[SPOOLSS_APITEST]
Add a test for SplInitializeWinSpoolDrv verifying that Wine's XP-compatible implementation of this function also works for 2003 (and that we're going to need some nameless exports by ordinals in winspool.drv...)

svn path=/branches/colins-printing-for-freedom/; revision=68035

8 years ago[PRINTING]
Colin Finck [Fri, 5 Jun 2015 18:16:51 +0000 (18:16 +0000)]
[PRINTING]
Add an include directory for all printing components containing definitions not found in the public headers.
For now, that's just PackStrings in spoolss.h.

[SPOOLSS_APITEST]
Use the new spoolss.h header.

[WINPRINT_APITEST]
Add an API-Test for the winprint Print Processor, so far for its EnumPrintProcessorDatatypesW function. Tests succeed in Windows Server 2003.
winspool.drv also provides functions that go into winprint.dll, but as these tests show, they behave slightly different in terms of error codes due to the involved RPC and routing.
Windows Server 2003 has winprint functions in localspl.dll, so you have to copy its localspl.dll to winprint.dll for testing.

[WINPRINT]
- Use PackStrings to simplify the code.
- Fix test failures.

svn path=/branches/colins-printing-for-freedom/; revision=68025

8 years ago[SPOOLSS]
Colin Finck [Fri, 5 Jun 2015 15:52:39 +0000 (15:52 +0000)]
[SPOOLSS]
In an attempt to simplify the code for further functions that return information structures, implement and document the undocumented PackStrings function.
Hints were taken from an XP DDK sample and own testing.

[SPOOLSS_APITEST]
Add some tests for PackStrings that succeed under Windows Server 2003.

svn path=/branches/colins-printing-for-freedom/; revision=68023

8 years ago[WINSPOOL_APITEST]
Colin Finck [Thu, 4 Jun 2015 12:19:06 +0000 (12:19 +0000)]
[WINSPOOL_APITEST]
- Add tests for EnumPrinters
- Fix a test for EnumPrintProcessorDatatypes

svn path=/branches/colins-printing-for-freedom/; revision=68007

8 years ago[PARPORT]
Eric Kohl [Wed, 27 May 2015 20:18:10 +0000 (20:18 +0000)]
[PARPORT]
- Add FdoQueryBusRelations to enumerate the 'attached' raw port.
- Create the PDO for the raw port (\Device\ParallelX) and let the symbolic link (\DosDevices\LPTX) point to it.
- Move the open, close and write code from the FDO to the PDO.

svn path=/trunk/; revision=67936

8 years ago[PSDK] Apply Wine commit ea41f29 by Vincent Povirk: Fix off-by-one error in EmfPlusRe...
Amine Khaldi [Wed, 27 May 2015 19:58:39 +0000 (19:58 +0000)]
[PSDK] Apply Wine commit ea41f29 by Vincent Povirk: Fix off-by-one error in EmfPlusRecordType enumeration.

svn path=/trunk/; revision=67935

8 years ago[NTVDM]
Aleksandar Andrejevic [Wed, 27 May 2015 01:07:05 +0000 (01:07 +0000)]
[NTVDM]
Now that the Fast486 FPU is feature-complete, tell programs that we have a builtin FPU.
(This commit may cause regressions if there are bugs in the FPU)

svn path=/trunk/; revision=67934

8 years ago[FAST486]
Aleksandar Andrejevic [Wed, 27 May 2015 01:00:20 +0000 (01:00 +0000)]
[FAST486]
Implement FPATAN.
Fix the sign of the FPTAN result. Spotted by fox_anthony.

svn path=/trunk/; revision=67933

8 years ago[FAST486]
Aleksandar Andrejevic [Tue, 26 May 2015 19:11:33 +0000 (19:11 +0000)]
[FAST486]
Implement FPTAN by calculating the sine and then dividing it by
the approximated cosine: sqrt(1 - sin(x) ^ 2).
This method turned out to be faster and more precise than the
Maclaurin series for tan(x), which converges very slowly.

svn path=/trunk/; revision=67932

8 years ago[rapps]
Daniel Reimer [Tue, 26 May 2015 18:18:27 +0000 (18:18 +0000)]
[rapps]
[rapps_new]
Add zh-CN translation in RAPPS/RAPPS_NEW by Henry Tang Ih
CORE-9554 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=67931

8 years ago[TRANSLATION]
Daniel Reimer [Tue, 26 May 2015 18:12:08 +0000 (18:12 +0000)]
[TRANSLATION]
Adding Turkish Translations (inf) by Erdem Ersoy
CORE-9138 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=67930

8 years ago[TRANSLATION]
Daniel Reimer [Tue, 26 May 2015 18:05:52 +0000 (18:05 +0000)]
[TRANSLATION]
work on Romanian related strings in drivers inf by Stefan Fulea
CORE-9572 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=67929

8 years ago[TRANSLATIONS]
Daniel Reimer [Tue, 26 May 2015 18:01:39 +0000 (18:01 +0000)]
[TRANSLATIONS]
Updating Turkish Translations by Erdem Ersoy
CORE-9587 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=67928

8 years ago[TRANSLATION]
Daniel Reimer [Tue, 26 May 2015 17:56:10 +0000 (17:56 +0000)]
[TRANSLATION]
Czech translation update by Radek Liska
CORE-9528 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=67927

8 years ago[ROSAPPS]
Daniel Reimer [Tue, 26 May 2015 17:35:57 +0000 (17:35 +0000)]
[ROSAPPS]
General improvements to rosapps by Jared Smudde
ROSAPPS-301 #resolve #comment Committed, thx for help.

svn path=/trunk/; revision=67926

8 years ago[SYSDM]
Daniel Reimer [Tue, 26 May 2015 17:23:45 +0000 (17:23 +0000)]
[SYSDM]
Increase some text field sizes to make more text fit inside
German translation update
Fix copypasta...

svn path=/trunk/; revision=67925

8 years ago[NETAPI32_WINETEST] Sync with Wine Staging 1.7.43.
Amine Khaldi [Tue, 26 May 2015 17:17:50 +0000 (17:17 +0000)]
[NETAPI32_WINETEST] Sync with Wine Staging 1.7.43.

svn path=/trunk/; revision=67924

8 years ago[MSVCRT_WINETEST] Sync with Wine Staging 1.7.43.
Amine Khaldi [Tue, 26 May 2015 17:15:48 +0000 (17:15 +0000)]
[MSVCRT_WINETEST] Sync with Wine Staging 1.7.43.

svn path=/trunk/; revision=67923

8 years ago[PSDK] Add missing DYNAMIC_TIME_ZONE_INFORMATION and QueryInformationJobObject.
Amine Khaldi [Tue, 26 May 2015 16:25:42 +0000 (16:25 +0000)]
[PSDK] Add missing DYNAMIC_TIME_ZONE_INFORMATION and QueryInformationJobObject.

svn path=/trunk/; revision=67922

8 years ago[WINE/INCLUDE] Add missing RTL_DYNAMIC_TIME_ZONE_INFORMATION and RtlQueryDynamicTimeZ...
Amine Khaldi [Tue, 26 May 2015 12:09:59 +0000 (12:09 +0000)]
[WINE/INCLUDE] Add missing RTL_DYNAMIC_TIME_ZONE_INFORMATION and RtlQueryDynamicTimeZoneInformation.

svn path=/trunk/; revision=67921

8 years ago[FREETYPE] Update to v2.5.5. CORE-8888
Amine Khaldi [Tue, 26 May 2015 12:02:58 +0000 (12:02 +0000)]
[FREETYPE] Update to v2.5.5. CORE-8888

svn path=/trunk/; revision=67920

8 years ago[PSDK] Update JOB_OBJECT_* defines.
Amine Khaldi [Tue, 26 May 2015 12:00:39 +0000 (12:00 +0000)]
[PSDK] Update JOB_OBJECT_* defines.

svn path=/trunk/; revision=67919

8 years ago[NTFS]
Pierre Schweitzer [Tue, 26 May 2015 07:10:45 +0000 (07:10 +0000)]
[NTFS]
- Don't attempt to moon walk path name for reserved MFT entries.
- Don't attempt to dereference file name if it doesn't exist

svn path=/trunk/; revision=67918

8 years ago[SYSDM]
Eric Kohl [Mon, 25 May 2015 22:02:05 +0000 (22:02 +0000)]
[SYSDM]
Add the hardware profile property sheet dialog.

svn path=/trunk/; revision=67917

8 years ago[GDI32_WINETEST] Sync with Wine Staging 1.7.43.
Amine Khaldi [Mon, 25 May 2015 18:52:18 +0000 (18:52 +0000)]
[GDI32_WINETEST] Sync with Wine Staging 1.7.43.

svn path=/trunk/; revision=67916

8 years ago[ADVAPI32_WINETEST] Sync with Wine Staging 1.7.43.
Amine Khaldi [Mon, 25 May 2015 18:46:12 +0000 (18:46 +0000)]
[ADVAPI32_WINETEST] Sync with Wine Staging 1.7.43.

svn path=/trunk/; revision=67915

8 years ago[FASTFAT]
Pierre Schweitzer [Mon, 25 May 2015 17:54:27 +0000 (17:54 +0000)]
[FASTFAT]
[NTFS]
Addendum to r67911

svn path=/trunk/; revision=67914

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 17:45:04 +0000 (17:45 +0000)]
[NTFS]
Call NtfsGetUserBuffer() when required, don't reimplement the wheel everytime

svn path=/trunk/; revision=67913

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 17:43:04 +0000 (17:43 +0000)]
[NTFS]
Fix MmGetSystemAddressForMdlSafe() call, as it was done in r67808

svn path=/trunk/; revision=67912

8 years ago[FASTFAT]
Pierre Schweitzer [Mon, 25 May 2015 17:30:01 +0000 (17:30 +0000)]
[FASTFAT]
[NTFS]
Remove useless cast and use appropriate macro.
Spotted by Thomas

svn path=/trunk/; revision=67911

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 17:06:00 +0000 (17:06 +0000)]
[NTFS]
Acquire FCB resource (shared) before trying to attempt its data

svn path=/trunk/; revision=67910

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 16:52:15 +0000 (16:52 +0000)]
[NTFS]
If IRP can't wait, queue it

svn path=/trunk/; revision=67909

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 16:52:02 +0000 (16:52 +0000)]
[NTFS]
Implement NtfsMarkIrpContextForQueue() which allows marking an IRP to queue it

svn path=/trunk/; revision=67908

8 years ago[WIN32K:NTUSER]
Thomas Faber [Mon, 25 May 2015 15:28:06 +0000 (15:28 +0000)]
[WIN32K:NTUSER]
- Use UserRefObjectCo in IntNotifyWinEvent to avoid a reference leak in case the call-out does not return
- Sanitize list walk

svn path=/trunk/; revision=67907

8 years ago[RTL][NTOSKRNL]
Thomas Faber [Mon, 25 May 2015 15:04:09 +0000 (15:04 +0000)]
[RTL][NTOSKRNL]
- Don't cast CONTAINING_RECORD

svn path=/trunk/; revision=67906

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 12:55:51 +0000 (12:55 +0000)]
[NTFS]
Handle IRP_MJ_FILE_SYSTEM_CONTROL with the dispatch routine

svn path=/trunk/; revision=67905

8 years ago[SYSDM]
Eric Kohl [Mon, 25 May 2015 12:23:12 +0000 (12:23 +0000)]
[SYSDM]
- Implement changing the hardware profile order.
- Keep button states up-to-date.

svn path=/trunk/; revision=67904

8 years ago[NTFS]
Pierre Schweitzer [Mon, 25 May 2015 11:58:23 +0000 (11:58 +0000)]
[NTFS]
Handle IRP_MJ_CREATTE with the dispatch routine

svn path=/trunk/; revision=67903

8 years ago[NTOSKRNL]
Pierre Schweitzer [Mon, 25 May 2015 11:49:14 +0000 (11:49 +0000)]
[NTOSKRNL]
Fix a fixme: add a tag for tunnel cache allocations

CORE-7272

svn path=/trunk/; revision=67902

8 years ago[KERNEL32_APITEST]
Pierre Schweitzer [Mon, 25 May 2015 11:38:02 +0000 (11:38 +0000)]
[KERNEL32_APITEST]
Add very long tests for tunnel cache.
So far, they are skipped because they are really long (they require more than 15s to complete).
Unfortunately, for unknown reason now, they are failing in ReactOS (whereas they shouldn't!).

An idea would be to see whether we can set an expiry of 1s for tunnel cache just for dbgtests and query the value from registry, so that it could help reduce test duration on ReactOS (but not on w2k3).

ROSTESTS-177

svn path=/trunk/; revision=67901

8 years ago[KERNEL32_APITEST]
Pierre Schweitzer [Mon, 25 May 2015 11:14:12 +0000 (11:14 +0000)]
[KERNEL32_APITEST]
Add more tests for tunnel cache

svn path=/trunk/; revision=67900

8 years ago[README.WINE] Mark more modules as synced with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Mon, 25 May 2015 10:56:43 +0000 (10:56 +0000)]
[README.WINE] Mark more modules as synced with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67899

8 years ago[README.WINE] Mark some modules as synced with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Mon, 25 May 2015 10:34:03 +0000 (10:34 +0000)]
[README.WINE] Mark some modules as synced with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67898

8 years ago[KERNEL32_APITEST]
Pierre Schweitzer [Mon, 25 May 2015 10:30:12 +0000 (10:30 +0000)]
[KERNEL32_APITEST]
Add simple tests regarding renaming and tunnel cache behavior for short names in user mode.
Longer tests should be added to show what happens in case of cache expiry.
All pass on w2k3 but not on ReactOS.

CORE-3875

svn path=/trunk/; revision=67897

8 years ago[CRYPTUI] Sync with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Mon, 25 May 2015 09:39:49 +0000 (09:39 +0000)]
[CRYPTUI] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67896

8 years ago[PSDK] Update cryptuiapi.h. CORE-9246
Amine Khaldi [Mon, 25 May 2015 09:39:00 +0000 (09:39 +0000)]
[PSDK] Update cryptuiapi.h. CORE-9246

svn path=/trunk/; revision=67895

8 years ago[FAST486]
Aleksandar Andrejevic [Mon, 25 May 2015 03:23:40 +0000 (03:23 +0000)]
[FAST486]
Fix the implementation of FSIN and FCOS:
First of all, 4 steps for a Maclaurin series is not enough.
Second, the angle should be normalized to the [-pi/2, pi/2] range.

svn path=/trunk/; revision=67894

8 years ago[SYSDM]
Eric Kohl [Sun, 24 May 2015 22:51:12 +0000 (22:51 +0000)]
[SYSDM]
Show a warning if the user tries to copy or rename a hardware profile to a name that is already in use.

svn path=/trunk/; revision=67893

8 years ago[NTFS]
Pierre Schweitzer [Sun, 24 May 2015 21:29:34 +0000 (21:29 +0000)]
[NTFS]
Handle IRP_MJ_CLOSE with the dispatch routine

svn path=/trunk/; revision=67892

8 years ago[README.WINE] Mark some modules as synced with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sun, 24 May 2015 20:51:18 +0000 (20:51 +0000)]
[README.WINE] Mark some modules as synced with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67891

8 years ago[NOTEPAD] Printer output improvements by Ricardo Hanke. See CORE-9088 for more details.
Amine Khaldi [Sun, 24 May 2015 20:37:29 +0000 (20:37 +0000)]
[NOTEPAD] Printer output improvements by Ricardo Hanke. See CORE-9088 for more details.

svn path=/trunk/; revision=67890

8 years ago[SYSDM]
Eric Kohl [Sun, 24 May 2015 20:20:04 +0000 (20:20 +0000)]
[SYSDM]
- Move the code to copy and rename hardware profiles from the dialog procedures into separate functions.
- Use the dialogs only to retrieve the destination profile name.
- Do not copy or rename a hardware profile if it source and destination name is the same.
- Replace a hard.-coded string by a resource string.

svn path=/trunk/; revision=67889

8 years ago[KMTEST]
Pierre Schweitzer [Sun, 24 May 2015 18:14:49 +0000 (18:14 +0000)]
[KMTEST]
Leak less memory.

svn path=/trunk/; revision=67888

8 years ago[KMTEST]
Pierre Schweitzer [Sun, 24 May 2015 17:42:52 +0000 (17:42 +0000)]
[KMTEST]
Enable FsRtlTunnel tests.
They all pass in ReactOS now.

CORE-7272

svn path=/trunk/; revision=67887

8 years ago[NTOSKRNL]
Pierre Schweitzer [Sun, 24 May 2015 17:42:05 +0000 (17:42 +0000)]
[NTOSKRNL]
Short commit message: implementation of (names) tunnel cache in file system RTL.
This is in the vast majority work done by Johannes Anderwald, I've just reviewed, fixed a few things, and implemented last bits.

Thanks to Johannes for his initial implementation (and huge work!).
Dedicated to Hervé's secret plans ;-).

CORE-7272
CORE-3875

svn path=/trunk/; revision=67886

8 years ago[KMTEST]
Pierre Schweitzer [Sun, 24 May 2015 17:31:49 +0000 (17:31 +0000)]
[KMTEST]
Don't attempt to allocate null-size buffer when copying empty string.

Note to next generations students: test your code and DON'T LEAK MEMORY!!!!
It still leaks atm, will have a look later on.
Note to Mr Bragin, beloved ReactOS Project Coordinator: did you actually reviewed your students work?

CORE-7272

svn path=/trunk/; revision=67885

8 years ago[WINSPOOL_APITEST]
Colin Finck [Sun, 24 May 2015 16:55:20 +0000 (16:55 +0000)]
[WINSPOOL_APITEST]
Make the tests actually succeed under Windows Server 2003.

svn path=/branches/colins-printing-for-freedom/; revision=67884

8 years ago[NTFS]
Pierre Schweitzer [Sun, 24 May 2015 15:26:15 +0000 (15:26 +0000)]
[NTFS]
Use non-paged lookaside list for IRP context allocation

svn path=/trunk/; revision=67883

8 years ago[NTOSKRNL]
Eric Kohl [Sun, 24 May 2015 14:38:55 +0000 (14:38 +0000)]
[NTOSKRNL]
IoCreateDevice: Assign SePublicOpenUnrestrictedSd to new devices.

CORE-9176

svn path=/trunk/; revision=67882

8 years ago[KBDHU] Fix MSVC build when the default code page is a MBCS. By Yuntian Zhang. CORE...
Amine Khaldi [Sun, 24 May 2015 14:26:31 +0000 (14:26 +0000)]
[KBDHU] Fix MSVC build when the default code page is a MBCS. By Yuntian Zhang. CORE-7417

svn path=/trunk/; revision=67881

8 years ago[FASTFAT]
Pierre Schweitzer [Sun, 24 May 2015 12:39:10 +0000 (12:39 +0000)]
[FASTFAT]
- Add a debugging assert that will save your lot of time if you attempt to manually queue a wrong IRP. You cannot queue an IRP which is set to be later queued again. This is a broken behavior.
- Remove a bit of code duplication

svn path=/trunk/; revision=67880