reactos.git
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[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 agoTime to commit some Work-In-Progress stuff before my diff gets too large..
Colin Finck [Fri, 22 May 2015 15:29:07 +0000 (15:29 +0000)]
Time to commit some Work-In-Progress stuff before my diff gets too large..

[LOCALSPL]
- Begin work on the Local Spooler. Return a structure with function pointers in InitializePrintProvidor.
- Design and document internal structures for managing LocalSpl Handles, Printer Handles, Printers, Print Jobs and Print Processors.
  Manage Printers and Print Processors in Generic Tables, with one Job Queue per Printer managed as a Doubly Linked List.
- Implement LocalOpenPrinter, LocalEnumPrintProcessorDatatypes, LocalEnumPrintProcessors, LocalGetPrintProcessorDirectory, with focus on catching all corner cases.
  Currently working on LocalStartDocPrinter.
- Build upon the documentation at http://www.undocprint.org/formats/winspool/shd to read and write .SHD files.

[WINPRINT]
Begin work on the Standard Print Processor. Implement EnumPrintProcessorDatatypesW.

[WINSPOOL_APITEST]
Add an API Test for winspool.drv, currently testing some corner cases of ClosePrinter, EnumPrintProcessorDatatypesW, GetPrintProcessorDirectoryW, OpenPrinterW, StartDocPrinterW.
TODO: Find a way to actually test the localspl.dll functions instead of only winspool.drv. This DLL doesn't like to be tested standalone under Windows, e.g. without being used through spoolsv/spoolss.

[SPOOLSS]
Implement InitializeRouter by calling the InitializePrintProvidor function of localspl there.
This function should later also initialize further Print Providers.

[SPOOLSV]
Call InitializeRouter when starting up the service.

[WINSPOOL]
Add dummy functions for EnumPrintProcessorDatatypesA/EnumPrintProcessorDatatypesW.

[All modules]
Fix printf format specifiers for errors (%lu) and statuses (%ld).

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

8 years ago[WINSPOOL]
Colin Finck [Sun, 17 May 2015 17:19:37 +0000 (17:19 +0000)]
[WINSPOOL]
- Use GdiConvertToDevmodeW instead of duplicating code.
- Fix the spec2def call here as well.

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

8 years agospec2def requires the DLL filename and not the module name in its parameters.
Colin Finck [Wed, 13 May 2015 07:03:05 +0000 (07:03 +0000)]
spec2def requires the DLL filename and not the module name in its parameters.
Fixes delay-importing spoolss.dll.

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

8 years ago- Fix the importlib order for the GNU linker according to Amine's suggestion.
Colin Finck [Tue, 12 May 2015 14:56:54 +0000 (14:56 +0000)]
- Fix the importlib order for the GNU linker according to Amine's suggestion.
- Add PSEH for winspool.

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

8 years ago- Add a dummy winspool.drv SpoolerInit doing an RPC call to a dummy RpcSpoolerInit...
Colin Finck [Tue, 12 May 2015 14:43:25 +0000 (14:43 +0000)]
- Add a dummy winspool.drv SpoolerInit doing an RPC call to a dummy RpcSpoolerInit, which itself passes the call to a dummy spoolss.dll SpoolerInit.
  This serves as an example to show how I expect most spooler functions to work.
- Implement the publicly exported and fundamental RevertToPrinterSelf and ImpersonatePrinterClient spoolss.dll functions.
- Fix WINSPOOL_HANDLE_bind.
- Fix build with GCC.

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

8 years ago[SPOOLSV]
Colin Finck [Mon, 11 May 2015 14:14:50 +0000 (14:14 +0000)]
[SPOOLSV]
Add stubs for all RPC functions of the winspool interface.

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

8 years ago- Add all publicly available information about the spoolsv RPC interface of Windows...
Colin Finck [Mon, 11 May 2015 13:37:23 +0000 (13:37 +0000)]
- Add all publicly available information about the spoolsv RPC interface of Windows Server 2003 to the winspool.idl file.
  Another reference: http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html
- Put this file in the public domain as it's just collected interface information from various sources without any real code.

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

8 years agoFix copying of structure values in OpenPrinterA
Colin Finck [Wed, 6 May 2015 13:00:08 +0000 (13:00 +0000)]
Fix copying of structure values in OpenPrinterA

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

8 years ago- Add the first bits of the winspool/spoolsv/spoolss interface in a WIDL-compatible...
Colin Finck [Wed, 6 May 2015 12:47:20 +0000 (12:47 +0000)]
- Add the first bits of the winspool/spoolsv/spoolss interface in a WIDL-compatible format.
  References:
     - https://git.samba.org/?p=samba.git;a=blob;f=librpc/idl/spoolss.idl;hb=618af83d1bd07b12a9acc88b0d2111cab7a8bb2b
     - https://msdn.microsoft.com/en-us/library/cc244649.aspx
- Replace our stubbed spoolsv by a new basic implementation that already creates a thread to serve RPC requests.
- Add stubbed versions of localmon, localspl, spoolss, winprint, winspool matching the exports of the Windows Server 2003 DLLs.
  localmon and winprint are part of localspl in Windows Server 2003. I took the freedom of putting these distinct components into separate DLLs (as it's done for localmon in NT4 and for winprint in Win7).
- Implement some stubs myself to fix the build (e.g. comdlg32 uses some functions).
- Implement OpenPrinterA and OpenPrinterW in winspool. This is just ANSI-to-Unicode conversion and a RPC call.
- Remove the Wine-imported ntprint, this one also needs a complete rewrite once we're at this point.

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

8 years agoFix PRINTER_DEFAULTSA and PRINTER_DEFAULTSW structures
Colin Finck [Wed, 6 May 2015 12:17:39 +0000 (12:17 +0000)]
Fix PRINTER_DEFAULTSA and PRINTER_DEFAULTSW structures

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

8 years agoAdd a little test program "winspool_print" that just prints a single line of unformat...
Colin Finck [Mon, 4 May 2015 13:39:07 +0000 (13:39 +0000)]
Add a little test program "winspool_print" that just prints a single line of unformatted text.
This line will arrive as RAW data in the printing stack, so it doesn't need any processing through GDI and serves as a good test for the very basic printing components.

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

8 years ago- Add my proposed directory tree for the components involved in printing.
Colin Finck [Mon, 4 May 2015 13:21:13 +0000 (13:21 +0000)]
- Add my proposed directory tree for the components involved in printing.
- Remove some Wine-imported components which are either entirely not usable for us or only implement so few functions that it's easier to completely reimplement them.
- Move "localui" (Wine-imported) and "spoolsv" (ReactOS stub) to the new directories.

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

8 years ago[NTVDM]
Aleksandar Andrejevic [Sun, 3 May 2015 22:02:41 +0000 (22:02 +0000)]
[NTVDM]
Implement VGA read mode 1.

svn path=/trunk/; revision=67541

8 years ago[NTFS]
Pierre Schweitzer [Sun, 3 May 2015 18:36:58 +0000 (18:36 +0000)]
[NTFS]
Handle the file query information IRP major with the dispatch routine

svn path=/trunk/; revision=67540

8 years ago[NTFS]
Pierre Schweitzer [Sun, 3 May 2015 18:25:55 +0000 (18:25 +0000)]
[NTFS]
Store stack & FO in IRP context

svn path=/trunk/; revision=67539

8 years ago[NTFS]
Pierre Schweitzer [Sun, 3 May 2015 18:17:39 +0000 (18:17 +0000)]
[NTFS]
Set a flag in the IRP context when an IRP can wait on locking

svn path=/trunk/; revision=67538

8 years ago[CRT]
Timo Kreuzer [Sun, 3 May 2015 18:15:19 +0000 (18:15 +0000)]
[CRT]
- Implement portable fabsf.c
- Move some ARM stubs to a better location
- Add stubs for __dtoi64, __i64tos, __u64tos, _clearfp

svn path=/trunk/; revision=67537

8 years ago[NTFS]
Pierre Schweitzer [Sun, 3 May 2015 18:13:16 +0000 (18:13 +0000)]
[NTFS]
An IRP context without an IRP sounds like a challenge...

svn path=/trunk/; revision=67536

8 years ago[ATL]
Timo Kreuzer [Sun, 3 May 2015 18:03:31 +0000 (18:03 +0000)]
[ATL]
- Handle failure to allocate VM for thunk code
- Factor out the assembly thumk code, fix amd64 code and implement ARM code

svn path=/trunk/; revision=67535

8 years ago[ATL]
Timo Kreuzer [Sun, 3 May 2015 15:10:09 +0000 (15:10 +0000)]
[ATL]
- Convert tabs to spaces
- Remove excessive local variable indentation for alignment, since that doesn't help to improve readability
- No code changes

svn path=/trunk/; revision=67534

8 years ago[FAST486]
Aleksandar Andrejevic [Sun, 3 May 2015 13:14:53 +0000 (13:14 +0000)]
[FAST486]
Don't overwrite the masked flags in IRET.

svn path=/trunk/; revision=67533

8 years ago[KERNEL32] Add Italian translation by Carlo Bramini. CORE-9650
Amine Khaldi [Sun, 3 May 2015 12:56:51 +0000 (12:56 +0000)]
[KERNEL32] Add Italian translation by Carlo Bramini. CORE-9650

svn path=/trunk/; revision=67532

8 years ago[SETUPAPI_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sun, 3 May 2015 11:33:46 +0000 (11:33 +0000)]
[SETUPAPI_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67531

8 years ago[REG_WINETEST] Import from Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sun, 3 May 2015 11:32:28 +0000 (11:32 +0000)]
[REG_WINETEST] Import from Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67530

8 years ago[REG] Sync with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sun, 3 May 2015 11:30:49 +0000 (11:30 +0000)]
[REG] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67529

8 years ago[FAST486]
Aleksandar Andrejevic [Sun, 3 May 2015 03:37:06 +0000 (03:37 +0000)]
[FAST486]
Properly check the limit for "expand down" segments.

svn path=/trunk/; revision=67528

8 years ago[NTVDM]
Aleksandar Andrejevic [Sun, 3 May 2015 02:11:32 +0000 (02:11 +0000)]
[NTVDM]
- Fix a typo.
- Use a #define for the device flag.
- In r67526, the following change was committed but not described in the commit message:
- Enable opening devices in DosCreateFile and DosCreateFileEx.

svn path=/trunk/; revision=67527

8 years ago[FAST486]
Aleksandar Andrejevic [Sun, 3 May 2015 01:45:57 +0000 (01:45 +0000)]
[FAST486]
Update the copyright year (better late than never).
Push the error code inside Fast486InterruptInternal, to make the size of the
pushed value on the stack correct.
Update the CPL in Fast486TaskSwitch.

svn path=/trunk/; revision=67526

8 years ago[NDK]
Timo Kreuzer [Sat, 2 May 2015 23:12:19 +0000 (23:12 +0000)]
[NDK]
Add a few definitions based on (Windows RT 8.1) symbol files, ks386.inc, ksamd64.inc, ksarm.inc and Windows 10 WDK (ntosp.h ftw!)

svn path=/trunk/; revision=67525

8 years ago[NTOSKRNL]
Timo Kreuzer [Sat, 2 May 2015 23:11:50 +0000 (23:11 +0000)]
[NTOSKRNL]
- Implement KiCpuId and make use of it
- Get rid of ugly CPUID, RDMSR and WRMSR functions
- remove unused KTS_ constants

svn path=/trunk/; revision=67524

8 years ago[NTOSKRNL] Handle some more KeFeatureFlags in amd64/cpu.c and set RtlpUse16ByteSLists
Timo Kreuzer [Sat, 2 May 2015 22:20:59 +0000 (22:20 +0000)]
[NTOSKRNL] Handle some more KeFeatureFlags in amd64/cpu.c and set RtlpUse16ByteSLists
[NTDLL] Set RtlpUse16ByteSLists
[RTL] Make use of RtlpUse16ByteSLists in x64 Interlocked SList functions

svn path=/trunk/; revision=67523

8 years ago[RTL]
Timo Kreuzer [Sat, 2 May 2015 22:20:38 +0000 (22:20 +0000)]
[RTL]
- Implement C versions of RtlInterlockedPushEntrySList, RtlInterlockedPushListSList, RtlInterlockedPopEntrySList and RtlInterlockedFlushSList.
- RtlInterlockedPushListSList is fastcall, not stdcall

svn path=/trunk/; revision=67522

8 years ago[DDK/XDK]
Timo Kreuzer [Sat, 2 May 2015 22:20:18 +0000 (22:20 +0000)]
[DDK/XDK]
- Improve definition of ExInterlockedCompareExchange64 and interlocked SList functions and improve some annotations based on native header
- Update processor feature constants

svn path=/trunk/; revision=67521

8 years ago[XDK/DDK/NDK]
Timo Kreuzer [Sat, 2 May 2015 22:19:47 +0000 (22:19 +0000)]
[XDK/DDK/NDK]
Simplify RtlXxxByteSwap macros (use them unconditionally)

svn path=/trunk/; revision=67520

8 years ago[CRT] Fix MSVC warnings
Timo Kreuzer [Sat, 2 May 2015 22:19:31 +0000 (22:19 +0000)]
[CRT] Fix MSVC warnings

svn path=/trunk/; revision=67519

8 years ago[NTVDM]
Hermès Bélusca-Maïto [Sat, 2 May 2015 20:48:08 +0000 (20:48 +0000)]
[NTVDM]

Mouse:
- Remove now useless code in mouse support in BIOS.
- Implement INT 33h, AH=1Bh "Return mouse sensitivity" (returning hardcoded standard values since we don't support custom sensitivities) (AH=13h and 1Ah are marked as UNSUPPORTED).
- INT 33h, AH=1Fh "Disable mouse driver" returns in ES:BX the old INT 33h vector value: implement that.
- Implement INT 33h, AH=21h "Software reset", AH=24h and 4Dh and 6Dh "Software version and mouse info", "pointer to copyright string" and "version 'string'" functionalities.

DOS:
- Initialize in Win2k3-ntvdm-compatible order the DOS drivers: NUL, then CON, then XMS, and then EMS.
- Fix segment/offset inversion usage in INT 21h, AH=5Ch "Lock/Unlock region of file": when using MAKELONG macro to build a far pointer, the first parameter (loword) is the offset, and the second parameter (hiword) is the segment.

svn path=/trunk/; revision=67518

8 years ago[BOOTDATA] Add missing font DPI entries in registry. By Ziliang Guo. CORE-8902
Amine Khaldi [Sat, 2 May 2015 19:55:55 +0000 (19:55 +0000)]
[BOOTDATA] Add missing font DPI entries in registry. By Ziliang Guo. CORE-8902

svn path=/trunk/; revision=67517

8 years ago[SYSSETUP] Fix timezone setup in the unattended install of ReactOS. Spotted and fixed...
Amine Khaldi [Sat, 2 May 2015 19:48:26 +0000 (19:48 +0000)]
[SYSSETUP] Fix timezone setup in the unattended install of ReactOS. Spotted and fixed by V. CORE-9648

svn path=/trunk/; revision=67516

8 years ago[WBEMDISP_WINETEST] Import from Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sat, 2 May 2015 19:40:48 +0000 (19:40 +0000)]
[WBEMDISP_WINETEST] Import from Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67515

8 years ago[WBEMDISP] Sync with Wine Staging 1.7.37. CORE-9246
Amine Khaldi [Sat, 2 May 2015 19:38:14 +0000 (19:38 +0000)]
[WBEMDISP] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=67514

8 years ago[NTVDM]
Aleksandar Andrejevic [Sat, 2 May 2015 18:51:03 +0000 (18:51 +0000)]
[NTVDM]
Save/restore the processor state when executing/terminating nested tasks.

svn path=/trunk/; revision=67513

8 years ago[FAST486]
Aleksandar Andrejevic [Sat, 2 May 2015 16:09:00 +0000 (16:09 +0000)]
[FAST486]
When storing a segment selector, the operand size attribute is only ignored when
writing to memory (where it's treated as if it's always 16-bit).

svn path=/trunk/; revision=67512

8 years ago[CRT]
Timo Kreuzer [Sat, 2 May 2015 14:07:28 +0000 (14:07 +0000)]
[CRT]
Implement _setjmp / longjmp on ARM

svn path=/trunk/; revision=67511

8 years ago[CRT]
Timo Kreuzer [Sat, 2 May 2015 12:48:50 +0000 (12:48 +0000)]
[CRT]
Add stub for __i64tod and C++ wrappers for ARM

svn path=/trunk/; revision=67510

8 years ago[MSPORTS] Introduce a setting that makes the driver accept resources with an IRQ...
Amine Khaldi [Sat, 2 May 2015 10:23:26 +0000 (10:23 +0000)]
[MSPORTS] Introduce a setting that makes the driver accept resources with an IRQ instead of only resources without an IRQ. Brought to you by The ReactOS Printing Group. CORE-9645

svn path=/trunk/; revision=67509

8 years ago[PARPORT] Introduce a skeleton that will serve as base for implementing the parallel...
Amine Khaldi [Sat, 2 May 2015 10:15:37 +0000 (10:15 +0000)]
[PARPORT] Introduce a skeleton that will serve as base for implementing the parallel port function driver. Brought to you by The ReactOS Printing Group. CORE-9644

svn path=/trunk/; revision=67508

8 years ago[NTVDM]
Aleksandar Andrejevic [Sat, 2 May 2015 02:59:21 +0000 (02:59 +0000)]
[NTVDM]
Implement INT 27h (Terminate and Stay Resident).
Keep track of the last entry SS:SP in the INT 21h handler.
Restore the stack in DosTerminateProcess.
The number of bytes to keep resident applies only to the block which holds the PSP,
other blocks are not freed.

svn path=/trunk/; revision=67507

8 years agoFix compilation.
Hermès Bélusca-Maïto [Sat, 2 May 2015 01:26:42 +0000 (01:26 +0000)]
Fix compilation.

svn path=/trunk/; revision=67506

8 years ago[NTVDM]
Hermès Bélusca-Maïto [Sat, 2 May 2015 01:23:27 +0000 (01:23 +0000)]
[NTVDM]
- Fix command-line handling.
- Disable a hack introduced in r65012 for testing purposes.

svn path=/trunk/; revision=67505

8 years ago[NTVDM]
Aleksandar Andrejevic [Fri, 1 May 2015 23:04:03 +0000 (23:04 +0000)]
[NTVDM]
Implement INT 21h, AH = 36h "Get Free Disk Space".

svn path=/trunk/; revision=67504

8 years ago[NPFS]
Thomas Faber [Fri, 1 May 2015 19:40:04 +0000 (19:40 +0000)]
[NPFS]
- Correctly check for write quota in NpCommonWrite. Should fix test regressions after enabling fast I/O.

svn path=/trunk/; revision=67503

8 years ago[NTFS]
Pierre Schweitzer [Fri, 1 May 2015 18:58:00 +0000 (18:58 +0000)]
[NTFS]
Why would you allocate NTFS global data structure twice to use it from only one location?
Fix that misbehavior.

svn path=/trunk/; revision=67502

8 years ago[NTFS]
Pierre Schweitzer [Fri, 1 May 2015 18:38:10 +0000 (18:38 +0000)]
[NTFS]
Add FastIO non-support in NTFS

svn path=/trunk/; revision=67501

8 years ago[CDFS]
Pierre Schweitzer [Fri, 1 May 2015 17:45:16 +0000 (17:45 +0000)]
[CDFS]
No, FastIo is not possible!

svn path=/trunk/; revision=67500

8 years ago[CDFS]
Pierre Schweitzer [Fri, 1 May 2015 17:41:38 +0000 (17:41 +0000)]
[CDFS]
Set SizeOfFastIoDispatch member

svn path=/trunk/; revision=67499

8 years ago[NTVDM]
Aleksandar Andrejevic [Fri, 1 May 2015 15:42:54 +0000 (15:42 +0000)]
[NTVDM]
Separate the process-related code from the DOS kernel.
Enable starting processes from other processes in STANDALONE mode.
Implement INT 21h, AH = 55h and INT 21h, AH = 26h (Create/Clone PSP).
Implement overlay loading.

svn path=/trunk/; revision=67498

8 years ago[BLUE]
Thomas Faber [Fri, 1 May 2015 13:58:37 +0000 (13:58 +0000)]
[BLUE]
- Arch, learn how to properly revert things?

svn path=/trunk/; revision=67497

8 years ago[BLUE][CDFS]
Thomas Faber [Fri, 1 May 2015 13:56:37 +0000 (13:56 +0000)]
[BLUE][CDFS]
- Arch, don't assume the driver you see in the backtrace is one that needs fixing. CDFS is the one who's a file system driver here...

svn path=/trunk/; revision=67496

8 years ago[BLUE]
Thomas Faber [Fri, 1 May 2015 13:46:08 +0000 (13:46 +0000)]
[BLUE]
- FastIoDispatch is not optional for file system drivers!

svn path=/trunk/; revision=67495

8 years ago[NTOS:IO]
Thomas Faber [Fri, 1 May 2015 13:20:26 +0000 (13:20 +0000)]
[NTOS:IO]
- Implement Fast I/O support in NtReadFile/NtWriteFile
CORE-9624

svn path=/trunk/; revision=67494

8 years ago[KMTESTS:IO]
Thomas Faber [Fri, 1 May 2015 12:50:12 +0000 (12:50 +0000)]
[KMTESTS:IO]
- Also test write operations in IoReadWrite
- Add some nonzero success statuses
CORE-9624

svn path=/trunk/; revision=67493

8 years ago[FASTFAT]
Eric Kohl [Fri, 1 May 2015 12:15:49 +0000 (12:15 +0000)]
[FASTFAT]
VfatRead: Check the Length before checking the ByteOffset because reading 0 bytes should always be successful.

svn path=/trunk/; revision=67492

8 years ago[NTOS:IO]
Thomas Faber [Fri, 1 May 2015 12:00:50 +0000 (12:00 +0000)]
[NTOS:IO]
- Free the correct event pointer when out of memory in IopDeviceFsIoControl

svn path=/trunk/; revision=67491

8 years ago[NTOS:IO]
Thomas Faber [Fri, 1 May 2015 11:57:51 +0000 (11:57 +0000)]
[NTOS:IO]
- Don't leak event object reference when out of memory in NtReadFile/NtWriteFile

svn path=/trunk/; revision=67490

8 years ago[NTOS:IO]
Thomas Faber [Fri, 1 May 2015 11:52:32 +0000 (11:52 +0000)]
[NTOS:IO]
- IopCompleteRequest: in case of an exception, fail the IRP as shown by kmtest:IoReadWrite
CORE-9624

svn path=/trunk/; revision=67489

8 years ago[KMTESTS:IO]
Thomas Faber [Fri, 1 May 2015 11:07:40 +0000 (11:07 +0000)]
[KMTESTS:IO]
- Fix GCC build

svn path=/trunk/; revision=67488

8 years ago[KMTESTS:IO]
Thomas Faber [Fri, 1 May 2015 11:03:21 +0000 (11:03 +0000)]
[KMTESTS:IO]
- Add a test for the interaction between NtReadFile and a file system driver
CORE-9624

svn path=/trunk/; revision=67487

8 years ago[KMTEST]
Thomas Faber [Fri, 1 May 2015 10:52:37 +0000 (10:52 +0000)]
[KMTEST]
- Add TESTENTRY_NO_READONLY_DEVICE and TESTENTRY_BUFFERED_IO_DEVICE flags for standalone drivers

svn path=/trunk/; revision=67486

8 years ago[NTOS:IO]
Thomas Faber [Fri, 1 May 2015 10:49:50 +0000 (10:49 +0000)]
[NTOS:IO]
- Add missing SEH around user buffer access in IopCompleteRequest
- Remove a redundant condition
CORE-9624

svn path=/trunk/; revision=67485

8 years agoNote to self: review diffs and remove temporary changes BEFORE commiting (not after).
David Quintana [Thu, 30 Apr 2015 22:09:11 +0000 (22:09 +0000)]
Note to self: review diffs and remove temporary changes BEFORE commiting (not after).

svn path=/trunk/; revision=67484

8 years agoThis commit brings support for compiling ReactOS with Visual Studio 2015 RC (and...
David Quintana [Thu, 30 Apr 2015 21:48:26 +0000 (21:48 +0000)]
This commit brings support for compiling ReactOS with Visual Studio 2015 RC (and possibly the final release).

[BUILD]
msvc.cmake: Disable thread-local static initialization.
CMakeLists.txt: Disable PCH for VS2015.
configure.cmd: Make it aware of cl.exe version 19.x

[CPPRT]
Add alias for the new variants of the delete operators.

[BROWSEUI]
[MFIFS]
[FRAMEDYN]
[NDIS]
[DDK]
[PSDK]
[STLPORT]
Add explicit declarations of the new delete operators for those modules that don't use the WITH_RUNTIME option.

[WIDL]
[WPP]
Do not alias the snprintf family of functions to the _snprintf variants, since VS14 already declares them internally.

svn path=/trunk/; revision=67483

8 years ago[CRT/KERNEL32]
Timo Kreuzer [Thu, 30 Apr 2015 21:07:08 +0000 (21:07 +0000)]
[CRT/KERNEL32]
Add some more ARM stubs

svn path=/trunk/; revision=67482

8 years ago[CRT]
Timo Kreuzer [Thu, 30 Apr 2015 21:04:29 +0000 (21:04 +0000)]
[CRT]
Add a number of ARM

svn path=/trunk/; revision=67481

8 years ago[COMCTL32] Export DrawShadowText() and mention that it's exported only in v6. Dedicat...
Amine Khaldi [Thu, 30 Apr 2015 15:56:19 +0000 (15:56 +0000)]
[COMCTL32] Export DrawShadowText() and mention that it's exported only in v6. Dedicated to Stefano Toncich aka Tonix.

svn path=/trunk/; revision=67480

8 years ago[FAST486]
Aleksandar Andrejevic [Wed, 29 Apr 2015 20:41:41 +0000 (20:41 +0000)]
[FAST486]
When a segment isn't present, the exception should always be #NP (unless
it was the stack segment, in which case the exception should be #SS).

svn path=/trunk/; revision=67479

8 years ago[NTVDM]
Aleksandar Andrejevic [Wed, 29 Apr 2015 03:18:02 +0000 (03:18 +0000)]
[NTVDM]
The fix in r67477 was incorrect. When loading an executable high, we need to
allocate all of the memory and copy the program itself to the highest part of it.
I know it sounds illogical but that's how it works...

svn path=/trunk/; revision=67478

8 years ago[NTVDM]
Aleksandar Andrejevic [Wed, 29 Apr 2015 01:21:58 +0000 (01:21 +0000)]
[NTVDM]
If both e_minalloc and e_maxalloc are 0, the program should be loaded high.

svn path=/trunk/; revision=67477

8 years ago[NTVDM]
Aleksandar Andrejevic [Wed, 29 Apr 2015 00:58:22 +0000 (00:58 +0000)]
[NTVDM]
Also check for BlockData == 0 in RosResizeMemory. This, however, wasn't a crash since we
were lucky enough to cast the segment to a WORD before the access.

svn path=/trunk/; revision=67476

8 years ago[NTVDM]
Aleksandar Andrejevic [Wed, 29 Apr 2015 00:47:06 +0000 (00:47 +0000)]
[NTVDM]
Don't crash when DosFreeMemory is called with BlockData == 0.

svn path=/trunk/; revision=67475

8 years ago[RAPPS_NEW]
David Quintana [Wed, 29 Apr 2015 00:07:54 +0000 (00:07 +0000)]
[RAPPS_NEW]
Continue the work converting the UI to using ATL-wrapped windows. CORE-9593

[RSHELL]
[EXPLORER]
Fixup two class declarations to work with the rosctrls.h changes.

svn path=/trunk/; revision=67474