reactos.git
8 years agoIt's bugfixing time!
Colin Finck [Mon, 20 Jul 2015 15:21:03 +0000 (15:21 +0000)]
It's bugfixing time!

[LOCALSPL]
- A Print Job has more optional fields than I thought. Only do a wcslen on them if they are not NULL.
- Make the code for checking changed fields more robust. Add checks for NULL to the Find and Compare functions.
- Fix some wrong parameters given to CopyMemory.
- Set the pPort field of a LOCAL_PRINTER structure.

[WINSPOOL]
Only pass the datatype from the DOC_INFO_1W structure of StartDocPrinterW to SetJobW if it's not NULL.
For StartDocPrinterW, this means that the datatype shall not be changed while SetJobW would return ERROR_INVALID_DATATYPE if none was passed.

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

8 years ago[WINSPOOL]
Colin Finck [Sat, 18 Jul 2015 14:31:20 +0000 (14:31 +0000)]
[WINSPOOL]
Bugfix: winspool.drv shall only do local connections for now.
Even if wszName may include a computer name that needs to be extracted in the future, it must in no way be directly passed as the NetworkAddr parameter.
Fixes problems when using the spooler components with the "ncacn_np" protocol or with Windows' rpcrt4.dll.

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

8 years agoMerge r68232 to get Windows' rpcrt4.dll to work under ReactOS.
Colin Finck [Sat, 18 Jul 2015 12:29:25 +0000 (12:29 +0000)]
Merge r68232 to get Windows' rpcrt4.dll to work under ReactOS.

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

8 years ago[WINSPOOL]
Colin Finck [Fri, 17 Jul 2015 15:11:34 +0000 (15:11 +0000)]
[WINSPOOL]
Bugfix: hPrinter is a PSPOOLER_HANDLE for all winspool functions. The hPrinter member of a SPOOLER_HANDLE is only passed to RPC calls.

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

8 years ago[SPOOLSV, WINSPOOL]
Colin Finck [Fri, 17 Jul 2015 15:09:31 +0000 (15:09 +0000)]
[SPOOLSV, WINSPOOL]
Add MarshallUp/MarshallDown functions for ADDJOB_INFO_1W as well.

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

8 years ago[WINSPOOL]
Colin Finck [Fri, 17 Jul 2015 14:34:23 +0000 (14:34 +0000)]
[WINSPOOL]
The pDevModeContainer parameter of _RpcOpenPrinter is not optional, but its contents may be null.
You can see this in the IDL file (pDevModeContainer is not marked with the "unique" attribute) or refer to https://msdn.microsoft.com/en-us/library/cc244808.aspx

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

8 years ago[HIVESYS]
Colin Finck [Fri, 17 Jul 2015 14:20:12 +0000 (14:20 +0000)]
[HIVESYS]
Add registry entries for all developed printing components along with a dummy printer on LPT1.
These entries are enough to boot up the spooler.

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

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[RTL][NTDLL]
Thomas Faber [Sun, 21 Jun 2015 16:38:44 +0000 (16:38 +0000)]
[RTL][NTDLL]
- Add basic implementations of RtlApplicationVerifierStop and RtlCopyMappedMemory for the benefit of some Windows dlls
CORE-9857 CORE-9858 #resolve

svn path=/trunk/; revision=68232

8 years ago[CDFS]
Pierre Schweitzer [Sun, 21 Jun 2015 14:02:35 +0000 (14:02 +0000)]
[CDFS]
Remove redundant code now we have IRP context dispatch

svn path=/trunk/; revision=68231

8 years ago[TRANSLATION]
Daniel Reimer [Sun, 21 Jun 2015 11:20:39 +0000 (11:20 +0000)]
[TRANSLATION]
Updating Turkish Translation by Erdem Ersoy
CORE-9755 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=68230

8 years ago[FSLIB]
Eric Kohl [Sun, 21 Jun 2015 09:39:06 +0000 (09:39 +0000)]
[FSLIB]
Remove the HiddenSectors hack because usetup initializes the HiddenSectors value properly.

svn path=/trunk/; revision=68229

8 years ago[NTFS]
Pierre Schweitzer [Sun, 21 Jun 2015 09:26:15 +0000 (09:26 +0000)]
[NTFS]
CcInitializeCacheMap can raise exceptions, wrap it into a SEH block

svn path=/trunk/; revision=68228

8 years ago[NTOS:CC]
Thomas Faber [Sun, 21 Jun 2015 09:20:01 +0000 (09:20 +0000)]
[NTOS:CC]
- Raise an exception in case of failure in CcInitializeCacheMap
CORE-9848

svn path=/trunk/; revision=68227

8 years ago[USETUP]
Eric Kohl [Sun, 21 Jun 2015 08:55:43 +0000 (08:55 +0000)]
[USETUP]
UpdateDiskLayout:
- Set the proper HiddenSectors value.
- Fix counting the PartitonaNumber.
UpdatePartitionNumbers() has become obsolete. Remove it.

svn path=/trunk/; revision=68226

8 years ago[NTDLL_APITEST]
Thomas Faber [Sun, 21 Jun 2015 08:50:10 +0000 (08:50 +0000)]
[NTDLL_APITEST]
- Add a test for SystemFlagsInformation that demonstrates the parameter checks performed by NtQuerySystemInformation/NtSetSystemInformation
CORE-9849

svn path=/trunk/; revision=68225

8 years ago[NTOSKNRL]
Pierre Schweitzer [Sun, 21 Jun 2015 08:07:11 +0000 (08:07 +0000)]
[NTOSKNRL]
As shown by the non commited yet tests from Thomas, we have to check for privilege in NtSetSystemInformation - SystemFlagsInformation

svn path=/trunk/; revision=68224

8 years ago[NTOSKRNL]
Pierre Schweitzer [Sun, 21 Jun 2015 08:06:25 +0000 (08:06 +0000)]
[NTOSKRNL]
- Probe input buffer for read in NtSetSystemInformation() and call the helpers function in a PSEH block
- For the NtSetSytemInformation - SystemSessionCreate specific case, as we return session ID, probe for write directly there.

svn path=/trunk/; revision=68223

8 years ago[NTOSKRNL]
Pierre Schweitzer [Sun, 21 Jun 2015 05:46:38 +0000 (05:46 +0000)]
[NTOSKRNL]
Revert r68221: probing *should* be done in NtSetSystemInformation()
Let's check there why it's not done instead...

svn path=/trunk/; revision=68222

8 years ago[NTOSKRNL]
Pierre Schweitzer [Sun, 21 Jun 2015 05:40:15 +0000 (05:40 +0000)]
[NTOSKRNL]
Don't trust the user!
Probe buffers in NtSetSystemInformation - SystemSessionCreate and in NtSetSystemInformation - SystemSessionDetach

svn path=/trunk/; revision=68221

8 years ago[NTOSKRNL]
Pierre Schweitzer [Sun, 21 Jun 2015 05:33:53 +0000 (05:33 +0000)]
[NTOSKRNL]
Don't use SYSTEM_INFORMATION_CLASS definition from Wine but from NDK.
Fix naming accordingly

svn path=/trunk/; revision=68220

8 years ago[SHELL32]
Thomas Faber [Sun, 21 Jun 2015 05:30:20 +0000 (05:30 +0000)]
[SHELL32]
- Use CreateViewObject instead of QueryInterface to get a drop target from a shell folder.
CORE-9846

svn path=/trunk/; revision=68219

8 years ago[SHELL32]
Thomas Faber [Sun, 21 Jun 2015 05:21:30 +0000 (05:21 +0000)]
[SHELL32]
- Finally give up on that assert. It's not easily fixable
CORE-9839 or CORE-9844 or CORE-9845 or whatever

svn path=/trunk/; revision=68218

8 years ago[SHELL32]
Thomas Faber [Sun, 21 Jun 2015 04:56:38 +0000 (04:56 +0000)]
[SHELL32]
- Test your code, Arch! Fix another assertion failure.
CORE-9845 #resolve

svn path=/trunk/; revision=68217

8 years ago[NTVDM]
Aleksandar Andrejevic [Sun, 21 Jun 2015 02:36:20 +0000 (02:36 +0000)]
[NTVDM]
Begin upgrading the VGA emulation to SuperVGA emulation
(Cirrus Logic CL-GD5343 compatible).
This is still a WIP. So far only the VCLK and MCLK have been implemented.

svn path=/trunk/; revision=68216

8 years ago[SHELL32]
Thomas Faber [Sat, 20 Jun 2015 21:46:16 +0000 (21:46 +0000)]
[SHELL32]
- Fix assertion failure in 2nd stage by setting s_IsTerminated when an instance does not yet exist.
- Rename CComCreatorSingleton to CComCreatorCentralInstance since it's not /technically/ a singleton

svn path=/trunk/; revision=68215

8 years ago[USETUP]
Eric Kohl [Sat, 20 Jun 2015 18:17:03 +0000 (18:17 +0000)]
[USETUP]
DumpPartitionTable: Improve the output and print the partition start and length in sectors instead of bytes.

svn path=/trunk/; revision=68214

8 years ago[USETUP]
Eric Kohl [Sat, 20 Jun 2015 17:59:14 +0000 (17:59 +0000)]
[USETUP]
AddDiskToList: Fix the allocation of the disk layout buffer.

CORE-9821 #resolve #comment Please retest.

svn path=/trunk/; revision=68213

8 years ago[SHELL32]
Thomas Faber [Sat, 20 Jun 2015 17:52:28 +0000 (17:52 +0000)]
[SHELL32]
- Also make My Computer a singleton, as shown by the CMyComputer test. With r68210 and this commit, SHFileOperation on a large number of files is approximately 3 times as fast.
CORE-9839 #resolve

svn path=/trunk/; revision=68212

8 years ago[GRML]
Thomas Faber [Sat, 20 Jun 2015 17:04:27 +0000 (17:04 +0000)]
[GRML]
- Fix build

svn path=/trunk/; revision=68211

8 years ago[SHELL32]
Thomas Faber [Sat, 20 Jun 2015 16:54:52 +0000 (16:54 +0000)]
[SHELL32]
- Introduce a CComCreatorSingleton class and use it for CDesktopFolder. Multiple calls to SHGetDesktopFolder will now return the same instance, which provides a massive speedup in many shell operations.
CORE-9839

svn path=/trunk/; revision=68210

8 years ago[SHELL32_APITEST]
Thomas Faber [Sat, 20 Jun 2015 16:28:38 +0000 (16:28 +0000)]
[SHELL32_APITEST]
- Add a test for CLSID_MyComputer that shows this folder object is also cached.
CORE-9839

svn path=/trunk/; revision=68209

8 years ago[SHELL32]
Thomas Faber [Sat, 20 Jun 2015 15:23:25 +0000 (15:23 +0000)]
[SHELL32]
- Addendum to r68202
CORE-9839

svn path=/trunk/; revision=68208

8 years ago[USETUP]
Eric Kohl [Sat, 20 Jun 2015 13:42:39 +0000 (13:42 +0000)]
[USETUP]
Add support for logical partitions to the partition deletion code.

svn path=/trunk/; revision=68207

8 years ago[REACTOS][VMWINST][WELCOME] Properly track resource file dependencies. CORE-9806
Amine Khaldi [Sat, 20 Jun 2015 13:03:46 +0000 (13:03 +0000)]
[REACTOS][VMWINST][WELCOME] Properly track resource file dependencies. CORE-9806

svn path=/trunk/; revision=68206

8 years ago[MMSYS] Move the speaker bitmap up 5 pixels. By Jared Smudde. CORE-9790
Amine Khaldi [Sat, 20 Jun 2015 13:02:14 +0000 (13:02 +0000)]
[MMSYS] Move the speaker bitmap up 5 pixels. By Jared Smudde. CORE-9790

svn path=/trunk/; revision=68205

8 years ago[BROWSEUI] Make the view->go to menu items reflect the toolbar buttons status. By...
Amine Khaldi [Sat, 20 Jun 2015 12:59:55 +0000 (12:59 +0000)]
[BROWSEUI] Make the view->go to menu items reflect the toolbar buttons status. By Barrett Karish with some slight changes by me. CORE-9800

svn path=/trunk/; revision=68204

8 years ago[ATL]
Thomas Faber [Sat, 20 Jun 2015 12:08:13 +0000 (12:08 +0000)]
[ATL]
- Implement CComClassFactorySingleton

svn path=/trunk/; revision=68203

8 years ago[SHELL32]
Thomas Faber [Sat, 20 Jun 2015 10:26:22 +0000 (10:26 +0000)]
[SHELL32]
- Separate CDesktopFolder's IDropTarget out into its own class (since each caller needs its own instance)
CORE-9839

svn path=/trunk/; revision=68202

8 years ago[ATL]
Thomas Faber [Sat, 20 Jun 2015 09:22:55 +0000 (09:22 +0000)]
[ATL]
- Fix compilation when UNICODE is not defined
CORE-9258 #resolve

svn path=/trunk/; revision=68201

8 years ago[SHELL32_APITEST]
Thomas Faber [Sat, 20 Jun 2015 09:07:29 +0000 (09:07 +0000)]
[SHELL32_APITEST]
- Add a test showing that repeated calls to SHGetDesktopFolder return pointers to the same object, and that its CreateViewObject method instead creates new objects.
CORE-9839

svn path=/trunk/; revision=68200

8 years ago[APITESTS]
Thomas Faber [Sat, 20 Jun 2015 08:51:07 +0000 (08:51 +0000)]
[APITESTS]
- Make CUnknownBase constructor parameters optional

svn path=/trunk/; revision=68199

8 years ago[ROSAPPS]: Merge the two existing CATs into one and improve it (see r66942, r66989...
Hermès Bélusca-Maïto [Fri, 19 Jun 2015 22:38:34 +0000 (22:38 +0000)]
[ROSAPPS]: Merge the two existing CATs into one and improve it (see r66942, r66989 and r66990).

svn path=/trunk/; revision=68198

8 years ago[USETUP]
Eric Kohl [Fri, 19 Jun 2015 19:01:39 +0000 (19:01 +0000)]
[USETUP]
Implement CreateLogicalPartition. Now we can create logical partitons, but they will not be written to a disk yet.

svn path=/trunk/; revision=68197

8 years ago[ADVAPI32]
Thomas Faber [Fri, 19 Jun 2015 18:16:27 +0000 (18:16 +0000)]
[ADVAPI32]
- Use a separate heap allocation for the thread parameters to ScServiceMainStub, since the thread can live longer than the ACTIVE_SERVICE structure
CORE-9235

svn path=/trunk/; revision=68196

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[WIN32K:NTUSER]
Thomas Faber [Thu, 18 Jun 2015 15:45:32 +0000 (15:45 +0000)]
[WIN32K:NTUSER]
- Restructure co_UserProcessHotKeys to correctly process modifier-only hotkeys. Fixes start menu opening after Win+X shortcuts, and probably several other hotkey-related issues. Thanks to reactosfanboy.
CORE-9728 #resolve

svn path=/trunk/; revision=68190

8 years ago[USER32_APITEST]
Thomas Faber [Thu, 18 Jun 2015 14:02:55 +0000 (14:02 +0000)]
[USER32_APITEST]
- Arch, will you stop only testing your code with MSVC?!

svn path=/trunk/; revision=68189

8 years ago[USER32_APITEST]
Thomas Faber [Thu, 18 Jun 2015 13:59:51 +0000 (13:59 +0000)]
[USER32_APITEST]
- Fail if we get too many WM_HOTKEY messages
CORE-9728

svn path=/trunk/; revision=68188

8 years ago[INCLUDE]
Thomas Faber [Thu, 18 Jun 2015 13:45:17 +0000 (13:45 +0000)]
[INCLUDE]
- Fix undocshell.h build without UNICODE defined

svn path=/trunk/; revision=68187

8 years ago[USER32_APITEST]
Thomas Faber [Thu, 18 Jun 2015 13:41:52 +0000 (13:41 +0000)]
[USER32_APITEST]
- Add a simple test for RegisterHotKey with regular vs modifier-only hotkeys
CORE-9728

svn path=/trunk/; revision=68186

8 years ago[DEVMGR]
Ged Murphy [Thu, 18 Jun 2015 13:08:11 +0000 (13:08 +0000)]
[DEVMGR]
- Add tooltips for the toolbar
- Fix the 'disable' button not showing for devices that be disabled
- Some code cleanup / noise

svn path=/trunk/; revision=68185

8 years ago[DEVMGR]
Ged Murphy [Thu, 18 Jun 2015 11:02:52 +0000 (11:02 +0000)]
[DEVMGR]
- Add support for WM_ENTERMENULOOP/WM_EXITMENULOOP and update the status bar style to allow hints to be drawn
- Fixup the menu hints

svn path=/trunk/; revision=68184

8 years ago[SHELL32] Add printer icons. By Lee Schroeder. CORE-9829
Amine Khaldi [Thu, 18 Jun 2015 10:48:00 +0000 (10:48 +0000)]
[SHELL32] Add printer icons. By Lee Schroeder. CORE-9829

svn path=/trunk/; revision=68183

8 years ago[DEVMGR]
Ged Murphy [Thu, 18 Jun 2015 10:26:30 +0000 (10:26 +0000)]
[DEVMGR]
- In 'Devices by Connection, if a device has a problem, expand the treeview to to show that problem device.
- Add a missing break in WM_COMMAND to stop the app from closing
- Fix clearing the lists

svn path=/trunk/; revision=68182

8 years ago[NTVDM]: Implement INT 10h, AX=1018/1019 "Set/Get PEL Mask".
Hermès Bélusca-Maïto [Wed, 17 Jun 2015 23:21:12 +0000 (23:21 +0000)]
[NTVDM]: Implement INT 10h, AX=1018/1019 "Set/Get PEL Mask".

svn path=/trunk/; revision=68181

8 years ago[DEVMGR]
Ged Murphy [Wed, 17 Jun 2015 21:26:42 +0000 (21:26 +0000)]
[DEVMGR]
- Make class and device nodes polymorphic and move the code into separate files
- Add an abstract base class which we attach to the listview nodes
- Add double clicking of nodes

svn path=/trunk/; revision=68180

8 years ago[CDFS]
Pierre Schweitzer [Wed, 17 Jun 2015 20:33:08 +0000 (20:33 +0000)]
[CDFS]
Don't attempt to complete an IRP that was took over by FsRtl.

CORE-9777 #resolve #comment Fixed in r68179

svn path=/trunk/; revision=68179

8 years ago[CDFS] Update the file paths in the header blocks. NFC
Amine Khaldi [Wed, 17 Jun 2015 20:27:52 +0000 (20:27 +0000)]
[CDFS] Update the file paths in the header blocks. NFC

svn path=/trunk/; revision=68178

8 years ago[NDK]
Pierre Schweitzer [Wed, 17 Jun 2015 20:07:44 +0000 (20:07 +0000)]
[NDK]
Fix KNODE definition, to be compatible with w2k3.

Thanks to Thomas for his help.

svn path=/trunk/; revision=68177

8 years ago[SHELL32] Report file system changes in SHChangeNotifyRegister. Brought to you by...
Amine Khaldi [Wed, 17 Jun 2015 19:55:43 +0000 (19:55 +0000)]
[SHELL32] Report file system changes in SHChangeNotifyRegister. Brought to you by Huw Campbell. CORE-1171

svn path=/trunk/; revision=68176

8 years ago[FASTFAT]
Thomas Faber [Wed, 17 Jun 2015 19:19:39 +0000 (19:19 +0000)]
[FASTFAT]
- Set the correct length in FsdGetFsVolumeInformation/FsdGetFsAttributeInformation, and write back partial data when returning STATUS_BUFFER_OVERFLOW
- Replace unnecessary checks with ASSERTs
CORE-9820 #resolve

svn path=/trunk/; revision=68175

8 years ago[SHELL32] Fix IDI_SHELL_EXTENDED_PROPERTIES, use the icons 6 and 7 for floppy drive...
Amine Khaldi [Wed, 17 Jun 2015 18:30:14 +0000 (18:30 +0000)]
[SHELL32] Fix IDI_SHELL_EXTENDED_PROPERTIES, use the icons 6 and 7 for floppy drive and remove floppy.ico. By Jared Smudde. CORE-9804

svn path=/trunk/; revision=68174

8 years ago[NTOSKRNL]
Pierre Schweitzer [Wed, 17 Jun 2015 18:23:39 +0000 (18:23 +0000)]
[NTOSKRNL]
Implement NtQuerySystemInformation - SystemNumaAvailableMemory
Stub out NtQuerySystemInformation - SystemPrefetcherInformation
Stub out NtQuerySystemInformation - SystemExtendedProcessInformation
Stub out NtQuerySystemInformation - SystemRecommendedSharedDataAlignment

svn path=/trunk/; revision=68173

8 years ago[CRYPTUI][NETSHELL] Add some missing DS_MODALFRAME. By Jared Smudde. CORE-9822
Amine Khaldi [Wed, 17 Jun 2015 17:32:48 +0000 (17:32 +0000)]
[CRYPTUI][NETSHELL] Add some missing DS_MODALFRAME. By Jared Smudde. CORE-9822

svn path=/trunk/; revision=68172

8 years ago[NTOSKRNL]
Pierre Schweitzer [Wed, 17 Jun 2015 17:28:19 +0000 (17:28 +0000)]
[NTOSKRNL]
Completely implement Complete NtQuerySystemInformation - SystemNumaProcessorMap

CORE-9680

svn path=/trunk/; revision=68171