ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
669 discussions
Start a n
N
ew thread
[sedwards] 17138: enable the ntdll and kernel32 wine tests and watch them fail
by sedwards@svn.reactos.com
enable the ntdll and kernel32 wine tests and watch them fail Modified: trunk/reactos/regtests/winetests/directory.xml _____ Modified: trunk/reactos/regtests/winetests/directory.xml --- trunk/reactos/regtests/winetests/directory.xml 2005-08-07 03:14:17 UTC (rev 17137) +++ trunk/reactos/regtests/winetests/directory.xml 2005-08-07 03:15:15 UTC (rev 17138) @@ -8,9 +8,15 @@ <directory name="gdi32"> <xi:include href="gdi32/gdi32_test.xml" /> </directory> +<directory name="kernel32"> + <xi:include href="kernel32/kernel32_test.xml" /> +</directory> <directory name="msvcrt"> <xi:include href="msvcrt/msvcrt_test.xml" /> </directory> +<directory name="ntdll"> + <xi:include href="ntdll/ntdll_test.xml" /> +</directory> <directory name="psapi"> <xi:include href="psapi/psapi_test.xml" /> </directory>
19 years, 4 months
1
0
0
0
[sedwards] 17137: added kernel32 wine tests
by sedwards@svn.reactos.com
added kernel32 wine tests Added: trunk/reactos/regtests/winetests/kernel32/ Added: trunk/reactos/regtests/winetests/kernel32/alloc.c Added: trunk/reactos/regtests/winetests/kernel32/atom.c Added: trunk/reactos/regtests/winetests/kernel32/change.c Added: trunk/reactos/regtests/winetests/kernel32/codepage.c Added: trunk/reactos/regtests/winetests/kernel32/comm.c Added: trunk/reactos/regtests/winetests/kernel32/console.c Added: trunk/reactos/regtests/winetests/kernel32/directory.c Added: trunk/reactos/regtests/winetests/kernel32/drive.c Added: trunk/reactos/regtests/winetests/kernel32/environ.c Added: trunk/reactos/regtests/winetests/kernel32/file.c Added: trunk/reactos/regtests/winetests/kernel32/format_msg.c Added: trunk/reactos/regtests/winetests/kernel32/heap.c Added: trunk/reactos/regtests/winetests/kernel32/kernel32_test.xml Added: trunk/reactos/regtests/winetests/kernel32/locale.c Added: trunk/reactos/regtests/winetests/kernel32/mailslot.c Added: trunk/reactos/regtests/winetests/kernel32/module.c Added: trunk/reactos/regtests/winetests/kernel32/path.c Added: trunk/reactos/regtests/winetests/kernel32/pipe.c Added: trunk/reactos/regtests/winetests/kernel32/process.c Added: trunk/reactos/regtests/winetests/kernel32/profile.c Added: trunk/reactos/regtests/winetests/kernel32/sync.c Added: trunk/reactos/regtests/winetests/kernel32/testlist.c Added: trunk/reactos/regtests/winetests/kernel32/thread.c Added: trunk/reactos/regtests/winetests/kernel32/time.c Added: trunk/reactos/regtests/winetests/kernel32/timer.c Added: trunk/reactos/regtests/winetests/kernel32/virtual.c _____ Added: trunk/reactos/regtests/winetests/kernel32/alloc.c --- trunk/reactos/regtests/winetests/kernel32/alloc.c 2005-08-07 03:00:44 UTC (rev 17136) +++ trunk/reactos/regtests/winetests/kernel32/alloc.c 2005-08-07 03:14:17 UTC (rev 17137) @@ -0,0 +1,406 @@ +/* + * Unit test suite for memory allocation functions. + * + * Copyright 2002 Geoffrey Hausheer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <stdarg.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + + + /* The following functions don't have tests, because either I don't know how + to test them, or they are WinNT only, or require multiple threads. + Since the last two issues shouldn't really stop the tests from being + written, assume for now that it is all due to the first case + HeapCompact + HeapLock + HeapQueryInformation + HeapSetInformation + HeapUnlock + HeapValidate + HeapWalk +*/ +/* In addition, these features aren't being tested + HEAP_NO_SERIALIZE + HEAP_GENERATE_EXCEPTIONS + STATUS_ACCESS_VIOLATION (error code from HeapAlloc) +*/ + +static void test_Heap(void) +{ + SYSTEM_INFO sysInfo; + ULONG memchunk; + HANDLE heap; + LPVOID mem1,mem1a,mem3; + UCHAR *mem2,*mem2a; + UINT error,i; + DWORD dwSize; + +/* Retrieve the page size for this system */ + sysInfo.dwPageSize=0; + GetSystemInfo(&sysInfo); + ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n"); + +/* Create a Heap with a minimum and maximum size */ +/* Note that Windows and Wine seem to behave a bit differently with respect + to memory allocation. In Windows, you can't access all the memory + specified in the heap (due to overhead), so choosing a reasonable maximum + size for the heap was done mostly by trial-and-error on Win2k. It may need + more tweaking for otherWindows variants. +*/ + memchunk=10*sysInfo.dwPageSize; + heap=HeapCreate(0,2*memchunk,5*memchunk); + +/* Check that HeapCreate allocated the right amount of ram */ + todo_wine { + /* Today HeapCreate seems to return a memory block larger than specified. + MSDN says the maximum heap size should be dwMaximumSize rounded up to the + nearest page boundary + */ + mem1=HeapAlloc(heap,0,5*memchunk+1); + ok(mem1==NULL,"HeapCreate allocated more Ram than it should have\n"); + HeapFree(heap,0,mem1); + } + +/* Check that a normal alloc works */ + mem1=HeapAlloc(heap,0,memchunk); + ok(mem1!=NULL,"HeapAlloc failed\n"); + if(mem1) { + ok(HeapSize(heap,0,mem1)>=memchunk, "HeapAlloc should return a big enough memory block\n"); + } + +/* Check that a 'zeroing' alloc works */ + mem2=HeapAlloc(heap,HEAP_ZERO_MEMORY,memchunk); + ok(mem2!=NULL,"HeapAlloc failed\n"); + if(mem2) { + ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n"); + error=0; + for(i=0;i<memchunk;i++) { + if(mem2[i]!=0) { + error=1; + } + } + ok(!error,"HeapAlloc should have zeroed out it's allocated memory\n"); + } + +/* Check that HeapAlloc returns NULL when requested way too much memory */ + mem3=HeapAlloc(heap,0,5*memchunk); + ok(mem3==NULL,"HeapAlloc should return NULL\n"); + if(mem3) { + ok(HeapFree(heap,0,mem3),"HeapFree didn't pass successfully\n"); + } + +/* Check that HeapRealloc works */ + mem2a=HeapReAlloc(heap,HEAP_ZERO_MEMORY,mem2,memchunk+5*sysInfo.dwPageSi ze); + ok(mem2a!=NULL,"HeapReAlloc failed\n"); + if(mem2a) { + ok(HeapSize(heap,0,mem2a)>=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n"); + error=0; + for(i=0;i<5*sysInfo.dwPageSize;i++) { + if(mem2a[memchunk+i]!=0) { + error=1; + } + } + ok(!error,"HeapReAlloc should have zeroed out it's allocated memory\n"); + } + +/* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */ + error=0; + mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo. dwPageSize); + if(mem1a!=NULL) { + if(mem1a!=mem1) { + error=1; + } + } + ok(mem1a==NULL || error==0,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); + +/* Check that HeapFree works correctly */ + if(mem1a) { + ok(HeapFree(heap,0,mem1a),"HeapFree failed\n"); + } else { + ok(HeapFree(heap,0,mem1),"HeapFree failed\n"); + } + if(mem2a) { + ok(HeapFree(heap,0,mem2a),"HeapFree failed\n"); + } else { + ok(HeapFree(heap,0,mem2),"HeapFree failed\n"); + } + + /* 0-length buffer */ + mem1 = HeapAlloc(heap, 0, 0); + ok(mem1 != NULL, "Reserved memory\n"); + + dwSize = HeapSize(heap, 0, mem1); + /* should work with 0-length buffer */ + ok((dwSize >= 0) && (dwSize < 0xFFFFFFFF), + "The size of the 0-length buffer\n"); + ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n"); + +/* Check that HeapDestry works */ + ok(HeapDestroy(heap),"HeapDestroy failed\n"); +} + +/* The following functions don't have tests, because either I don't know how + to test them, or they are WinNT only, or require multiple threads. + Since the last two issues shouldn't really stop the tests from being + written, assume for now that it is all due to the first case + GlobalFlags + GlobalMemoryStatus + GlobalMemoryStatusEx +*/ +/* In addition, these features aren't being tested + GMEM_DISCADABLE + GMEM_NOCOMPACT +*/ +static void test_Global(void) +{ + ULONG memchunk; + HGLOBAL mem1,mem2,mem2a,mem2b; + UCHAR *mem2ptr; + UINT error,i; + memchunk=100000; + + SetLastError(NO_ERROR); +/* Check that a normal alloc works */ + mem1=GlobalAlloc(0,memchunk); + ok(mem1!=NULL,"GlobalAlloc failed\n"); + if(mem1) { + ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block\n"); + } + +/* Check that a 'zeroing' alloc works */ + mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); + ok(mem2!=NULL,"GlobalAlloc failed: error=%ld\n",GetLastError()); + if(mem2) { + ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n"); + mem2ptr=GlobalLock(mem2); + ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n"); + if(mem2ptr) { + error=0; + for(i=0;i<memchunk;i++) { + if(mem2ptr[i]!=0) { + error=1; + } + } + ok(!error,"GlobalAlloc should have zeroed out it's allocated memory\n"); + } + } +/* Check that GlobalReAlloc works */ +/* Check that we can change GMEM_FIXED to GMEM_MOVEABLE */ + mem2a=GlobalReAlloc(mem2,0,GMEM_MODIFY | GMEM_MOVEABLE); + if(mem2a!=NULL) { + mem2=mem2a; + mem2ptr=GlobalLock(mem2a); + ok(mem2ptr!=NULL && !GlobalUnlock(mem2a)&&GetLastError()==NO_ERROR, + "Converting from FIXED to MOVEABLE didn't REALLY work\n"); + } + +/* Check that ReAllocing memory works as expected */ + mem2a=GlobalReAlloc(mem2,2*memchunk,GMEM_MOVEABLE | GMEM_ZEROINIT); + ok(mem2a!=NULL,"GlobalReAlloc failed\n"); + if(mem2a) { + ok(GlobalSize(mem2a)>=2*memchunk,"GlobalReAlloc failed\n"); + mem2ptr=GlobalLock(mem2a); + ok(mem2ptr!=NULL,"GlobalLock Failed\n"); + if(mem2ptr) { + error=0; + for(i=0;i<memchunk;i++) { + if(mem2ptr[memchunk+i]!=0) { + error=1; + } + } + ok(!error,"GlobalReAlloc should have zeroed out it's allocated memory\n"); + +/* Check that GlobalHandle works */ + mem2b=GlobalHandle(mem2ptr); + ok(mem2b==mem2a,"GlobalHandle didn't return the correct memory handle\n"); + +/* Check that we can't discard locked memory */ + mem2b=GlobalDiscard(mem2a); + if(mem2b==NULL) { + ok(!GlobalUnlock(mem2a) && GetLastError()==NO_ERROR,"GlobalUnlock Failed\n"); + } + } + } + if(mem1) { + ok(GlobalFree(mem1)==NULL,"GlobalFree failed\n"); + } + if(mem2a) { + ok(GlobalFree(mem2a)==NULL,"GlobalFree failed\n"); + } else { + ok(GlobalFree(mem2)==NULL,"GlobalFree failed\n"); + } +} + + +/* The following functions don't have tests, because either I don't know how + to test them, or they are WinNT only, or require multiple threads. + Since the last two issues shouldn't really stop the tests from being + written, assume for now that it is all due to the first case + LocalDiscard + LocalFlags +*/ +/* In addition, these features aren't being tested + LMEM_DISCADABLE + LMEM_NOCOMPACT +*/ +static void test_Local(void) +{ + ULONG memchunk; + HLOCAL mem1,mem2,mem2a,mem2b; + UCHAR *mem2ptr; + UINT error,i; + memchunk=100000; + +/* Check that a normal alloc works */ + mem1=LocalAlloc(0,memchunk); + ok(mem1!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError()); + if(mem1) { + ok(LocalSize(mem1)>=memchunk, "LocalAlloc should return a big enough memory block\n"); + } + +/* Check that a 'zeroing' and lock alloc works */ + mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk); + ok(mem2!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError()); + if(mem2) { + ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n"); + mem2ptr=LocalLock(mem2); + ok(mem2ptr!=NULL,"LocalLock: error=%ld\n",GetLastError()); + if(mem2ptr) { + error=0; + for(i=0;i<memchunk;i++) { + if(mem2ptr[i]!=0) { + error=1; + } + } + ok(!error,"LocalAlloc should have zeroed out it's allocated memory\n"); + SetLastError(0); + error=LocalUnlock(mem2); + ok(error==0 && GetLastError()==NO_ERROR, + "LocalUnlock Failed: rc=%d err=%ld\n",error,GetLastError()); + } + } + mem2a=LocalFree(mem2); + ok(mem2a==NULL, "LocalFree failed: %p\n",mem2a); + +/* Reallocate mem2 as moveable memory */ + mem2=LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,memchunk); + ok(mem2!=NULL, "LocalAlloc failed to create moveable memory, error=%ld\n",GetLastError()); + +/* Check that ReAllocing memory works as expected */ + mem2a=LocalReAlloc(mem2,2*memchunk,LMEM_MOVEABLE | LMEM_ZEROINIT); + ok(mem2a!=NULL,"LocalReAlloc failed, error=%ld\n",GetLastError()); + if(mem2a) { + ok(LocalSize(mem2a)>=2*memchunk,"LocalReAlloc failed\n"); + mem2ptr=LocalLock(mem2a); + ok(mem2ptr!=NULL,"LocalLock Failed\n"); + if(mem2ptr) { + error=0; + for(i=0;i<memchunk;i++) { + if(mem2ptr[memchunk+i]!=0) { + error=1; + } + } + ok(!error,"LocalReAlloc should have zeroed out it's allocated memory\n"); +/* Check that LocalHandle works */ + mem2b=LocalHandle(mem2ptr); + ok(mem2b==mem2a,"LocalHandle didn't return the correct memory handle\n"); +/* Check that we can't discard locked memory */ + mem2b=LocalDiscard(mem2a); + ok(mem2b==NULL,"Discarded memory we shouldn't have\n"); + SetLastError(NO_ERROR); + ok(!LocalUnlock(mem2a) && GetLastError()==NO_ERROR, "LocalUnlock Failed\n"); + } + } + if(mem1) { + ok(LocalFree(mem1)==NULL,"LocalFree failed\n"); + } + if(mem2a) { + ok(LocalFree(mem2a)==NULL,"LocalFree failed\n"); + } else { + ok(LocalFree(mem2)==NULL,"LocalFree failed\n"); + } +} + +/* The Virtual* routines are not tested as thoroughly, + since I don't really understand how to use them correctly :) + The following routines are not tested at all + VirtualAllocEx + VirtualFreeEx + VirtualLock + VirtualProtect + VirtualProtectEx + VirtualQuery + VirtualQueryEx + VirtualUnlock + And the only features (flags) being tested are + MEM_COMMIT + MEM_RELEASE + PAGE_READWRITE + Testing the rest requires using exceptions, which I really don't + understand well +*/ +static void test_Virtual(void) +{ + SYSTEM_INFO sysInfo; + ULONG memchunk; + UCHAR *mem1; + UINT error,i; + +/* Retrieve the page size for this system */ + sysInfo.dwPageSize=0; + GetSystemInfo(&sysInfo); + ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n"); + +/* Choose a reasonable allocation size */ + memchunk=10*sysInfo.dwPageSize; + +/* Check that a normal alloc works */ + mem1=VirtualAlloc(NULL,memchunk,MEM_COMMIT,PAGE_READWRITE); + ok(mem1!=NULL,"VirtualAlloc failed\n"); + if(mem1) { +/* check that memory is initialized to 0 */ + error=0; + for(i=0;i<memchunk;i++) { + if(mem1[i]!=0) { + error=1; + } + } + ok(!error,"VirtualAlloc did not initialize memory to '0's\n"); +/* Check that we can read/write to memory */ + error=0; + for(i=0;i<memchunk;i+=100) { + mem1[i]='a'; + if(mem1[i]!='a') { + error=1; + } + } + ok(!error,"Virtual memory was not writable\n"); + } + ok(VirtualFree(mem1,0,MEM_RELEASE),"VirtualFree failed\n"); +} +START_TEST(alloc) +{ + test_Heap(); + test_Global(); + test_Local(); + test_Virtual(); +} Property changes on: trunk/reactos/regtests/winetests/kernel32/alloc.c ___________________________________________________________________ Name: svn:executable + * _____ Added: trunk/reactos/regtests/winetests/kernel32/atom.c --- trunk/reactos/regtests/winetests/kernel32/atom.c 2005-08-07 03:00:44 UTC (rev 17136) +++ trunk/reactos/regtests/winetests/kernel32/atom.c 2005-08-07 03:14:17 UTC (rev 17137) @@ -0,0 +1,346 @@ +/* + * Unit tests for atom functions + * + * Copyright (c) 2002 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <stdarg.h> +#include <stdio.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +static const WCHAR foobarW[] = {'f','o','o','b','a','r',0}; +static const WCHAR FOOBARW[] = {'F','O','O','B','A','R',0}; +static const WCHAR _foobarW[] = {'_','f','o','o','b','a','r',0}; + +static BOOL unicode_OS; + +static void test_add_atom(void) +{ + ATOM atom, w_atom; + int i; + + SetLastError( 0xdeadbeef ); + atom = GlobalAddAtomA( "foobar" ); + ok( atom >= 0xc000, "bad atom id %x\n", atom ); + ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error\n" ); + + /* Verify that it can be found (or not) appropriately */ + ok( GlobalFindAtomA( "foobar" ) == atom, "could not find atom foobar\n" ); + ok( GlobalFindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" ); + ok( !GlobalFindAtomA( "_foobar" ), "found _foobar\n" ); + + /* Add the same atom, specifying string as unicode; should + * find the first one, not add a new one */ + SetLastError( 0xdeadbeef ); + w_atom = GlobalAddAtomW( foobarW ); + if (w_atom && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + unicode_OS = TRUE; + else + trace("WARNING: Unicode atom APIs are not supported on this platform\n"); + + if (unicode_OS) + { + ok( w_atom == atom, "Unicode atom does not match ASCII\n" ); + ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomW set last error\n" ); + } + + /* Verify that it can be found (or not) appropriately via unicode name */ + if (unicode_OS) + { + ok( GlobalFindAtomW( foobarW ) == atom, "could not find atom foobar\n" ); + ok( GlobalFindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" ); + ok( !GlobalFindAtomW( _foobarW ), "found _foobar\n" ); + } + + /* Test integer atoms + * (0x0001 .. 0xbfff) should be valid; + * (0xc000 .. 0xffff) should be invalid */ + + SetLastError( 0xdeadbeef ); + ok( GlobalAddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); + if (unicode_OS) + { + SetLastError( 0xdeadbeef ); + ok( GlobalAddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); + } + + SetLastError( 0xdeadbeef ); + for (i = 1; i <= 0xbfff; i++) + { + SetLastError( 0xdeadbeef ); + ok( GlobalAddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, + "failed to add atom %x\n", i ); + if (unicode_OS) + { + SetLastError( 0xdeadbeef ); + ok( GlobalAddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, + "failed to add atom %x\n", i ); + } + } + + for (i = 0xc000; i <= 0xffff; i++) + { + ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %x\n", i ); + if (unicode_OS) + ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %x\n", i ); + } +} + +static void test_get_atom_name(void) +{ + char buf[10]; + WCHAR bufW[10]; + int i; + UINT len; + static const WCHAR resultW[] = {'f','o','o','b','a','r',0,'.','.','.'}; + + ATOM atom = GlobalAddAtomA( "foobar" ); + + /* Get the name of the atom we added above */ + memset( buf, '.', sizeof(buf) ); + len = GlobalGetAtomNameA( atom, buf, 10 ); + ok( len == strlen("foobar"), "bad length %d\n", len ); + ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" ); + + /* Repeat, unicode-style */ + if (unicode_OS) + { + for (i = 0; i < 10; i++) bufW[i] = '.'; + SetLastError( 0xdeadbeef ); + len = GlobalGetAtomNameW( atom, bufW, 10 ); + ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" ); + ok( len == lstrlenW(foobarW), "bad length %d\n", len ); + ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); + } + + /* Check error code returns */ + memset(buf, '.', 10); + ok( !GlobalGetAtomNameA( atom, buf, 0 ), "succeeded\n" ); + ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" ); + + if (unicode_OS) + { + static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'}; + + for (i = 0; i < 10; i++) bufW[i] = '.'; + ok( !GlobalGetAtomNameW( atom, bufW, 0 ), "succeeded\n" ); + ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" ); + } + + /* Test integer atoms */ + for (i = 0; i <= 0xbfff; i++) + { + memset( buf, 'a', 10 ); + len = GlobalGetAtomNameA( (ATOM)i, buf, 10 ); + if (i) + { + char res[20]; + ok( (len > 1) && (len < 7), "bad length %d\n", len ); + sprintf( res, "#%d", i ); + memset( res + strlen(res) + 1, 'a', 10 ); + ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf ); + } + else + ok( !len, "bad length %d\n", len ); + } +} + +static void test_error_handling(void) +{ + char buffer[260]; + WCHAR bufferW[260]; + int i; + + memset( buffer, 'a', 256 ); + buffer[256] = 0; + ok( !GlobalAddAtomA(buffer), "add succeeded\n" ); + ok( !GlobalFindAtomA(buffer), "find succeeded\n" ); + + if (unicode_OS) + { + for (i = 0; i < 256; i++) bufferW[i] = 'b'; + bufferW[256] = 0; + ok( !GlobalAddAtomW(bufferW), "add succeeded\n" ); + ok( !GlobalFindAtomW(bufferW), "find succeeded\n" ); + } +} + +static void test_local_add_atom(void) +{ + ATOM atom, w_atom; + int i; + + SetLastError( 0xdeadbeef ); + atom = AddAtomA( "foobar" ); + ok( atom >= 0xc000, "bad atom id %x\n", atom ); + ok( GetLastError() == 0xdeadbeef, "AddAtomA set last error\n" ); + + /* Verify that it can be found (or not) appropriately */ + ok( FindAtomA( "foobar" ) == atom, "could not find atom foobar\n" ); + ok( FindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" ); + ok( !FindAtomA( "_foobar" ), "found _foobar\n" ); + + /* Add the same atom, specifying string as unicode; should + * find the first one, not add a new one */ + SetLastError( 0xdeadbeef ); + w_atom = AddAtomW( foobarW ); + if (w_atom && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + unicode_OS = TRUE; + else + trace("WARNING: Unicode atom APIs are not supported on this platform\n"); + + if (unicode_OS) + { + ok( w_atom == atom, "Unicode atom does not match ASCII\n" ); + ok( GetLastError() == 0xdeadbeef, "AddAtomW set last error\n" ); + } + + /* Verify that it can be found (or not) appropriately via unicode name */ + if (unicode_OS) + { + ok( FindAtomW( foobarW ) == atom, "could not find atom foobar\n" ); + ok( FindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" ); + ok( !FindAtomW( _foobarW ), "found _foobar\n" ); + } + + /* Test integer atoms + * (0x0001 .. 0xbfff) should be valid; + * (0xc000 .. 0xffff) should be invalid */ + + SetLastError( 0xdeadbeef ); + ok( AddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); + if (unicode_OS) + { + SetLastError( 0xdeadbeef ); + ok( AddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); + } + + SetLastError( 0xdeadbeef ); + for (i = 1; i <= 0xbfff; i++) + { + SetLastError( 0xdeadbeef ); + ok( AddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, + "failed to add atom %x\n", i ); + if (unicode_OS) + { + SetLastError( 0xdeadbeef ); + ok( AddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, + "failed to add atom %x\n", i ); + } + } + + for (i = 0xc000; i <= 0xffff; i++) + { + ok( !AddAtomA((LPCSTR)i), "succeeded adding %x\n", i ); + if (unicode_OS) + ok( !AddAtomW((LPCWSTR)i), "succeeded adding %x\n", i ); + } +} + +static void test_local_get_atom_name(void) +{ + char buf[10]; + WCHAR bufW[10]; + int i; + UINT len; + static const WCHAR resultW[] = {'f','o','o','b','a','r',0,'.','.','.'}; + + ATOM atom = AddAtomA( "foobar" ); + + /* Get the name of the atom we added above */ + memset( buf, '.', sizeof(buf) ); + len = GetAtomNameA( atom, buf, 10 ); + ok( len == strlen("foobar"), "bad length %d\n", len ); + ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" ); + + /* Repeat, unicode-style */ + if (unicode_OS) + { + for (i = 0; i < 10; i++) bufW[i] = '.'; + SetLastError( 0xdeadbeef ); + len = GetAtomNameW( atom, bufW, 10 ); + ok( len && GetLastError() == 0xdeadbeef, "GetAtomNameW failed\n" ); + ok( len == lstrlenW(foobarW), "bad length %d\n", len ); + ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); + } + + /* Check error code returns */ + memset(buf, '.', 10); + ok( !GetAtomNameA( atom, buf, 0 ), "succeeded\n" ); + ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" ); + + if (unicode_OS) + { + static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'}; + + for (i = 0; i < 10; i++) bufW[i] = '.'; + ok( !GetAtomNameW( atom, bufW, 0 ), "succeeded\n" ); + ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" ); + } + + /* Test integer atoms */ + for (i = 0; i <= 0xbfff; i++) + { + memset( buf, 'a', 10 ); + len = GetAtomNameA( (ATOM)i, buf, 10 ); + if (i) + { + char res[20]; + ok( (len > 1) && (len < 7), "bad length %d\n", len ); + sprintf( res, "#%d", i ); + memset( res + strlen(res) + 1, 'a', 10 ); + ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf ); + } + else + ok( !len, "bad length %d\n", len ); + } +} + +static void test_local_error_handling(void) +{ + char buffer[260]; + WCHAR bufferW[260]; + int i; + + memset( buffer, 'a', 256 ); + buffer[256] = 0; + ok( !AddAtomA(buffer), "add succeeded\n" ); + ok( !FindAtomA(buffer), "find succeeded\n" ); + + if (unicode_OS) + { + for (i = 0; i < 256; i++) bufferW[i] = 'b'; + bufferW[256] = 0; + ok( !AddAtomW(bufferW), "add succeeded\n" ); + ok( !FindAtomW(bufferW), "find succeeded\n" ); + } +} + + +START_TEST(atom) +{ + test_add_atom(); + test_get_atom_name(); + test_error_handling(); + test_local_add_atom(); + test_local_get_atom_name(); + test_local_error_handling(); +} Property changes on: trunk/reactos/regtests/winetests/kernel32/atom.c ___________________________________________________________________ Name: svn:executable + * _____ Added: trunk/reactos/regtests/winetests/kernel32/change.c --- trunk/reactos/regtests/winetests/kernel32/change.c 2005-08-07 03:00:44 UTC (rev 17136) +++ trunk/reactos/regtests/winetests/kernel32/change.c 2005-08-07 03:14:17 UTC (rev 17137) @@ -0,0 +1,242 @@ +/* + * Tests for file change notification functions + * + * Copyright (c) 2004 Hans Leidekker + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* TODO: - security attribute changes + * - compound filter and multiple notifications + * - subtree notifications + * - non-documented flags FILE_NOTIFY_CHANGE_LAST_ACCESS and + * FILE_NOTIFY_CHANGE_CREATION + */ + +#include <stdarg.h> +#include <stdio.h> + +#include "wine/test.h" +#include <windef.h> +#include <winbase.h> + +static DWORD CALLBACK NotificationThread(LPVOID arg) +{ + HANDLE change = (HANDLE) arg; + BOOL ret = FALSE; + DWORD status; + + status = WaitForSingleObject(change, 100); + + if (status == WAIT_OBJECT_0 ) { + ret = FindNextChangeNotification(change); + } + + ret = FindCloseChangeNotification(change); + ok( ret, "FindCloseChangeNotification error: %ld\n", + GetLastError()); + + ExitThread((DWORD)ret); +} + +static HANDLE StartNotificationThread(LPCSTR path, BOOL subtree, DWORD flags) +{ + HANDLE change, thread; + DWORD threadId; + + change = FindFirstChangeNotificationA(path, subtree, flags); + ok(change != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %ld\n", GetLastError()); + + thread = CreateThread(NULL, 0, NotificationThread, (LPVOID)change, + 0, &threadId); + ok(thread != INVALID_HANDLE_VALUE, "CreateThread error: %ld\n", GetLastError()); + + return thread; +} + +static DWORD FinishNotificationThread(HANDLE thread) +{ + DWORD status, exitcode; + + status = WaitForSingleObject(thread, 5000); + ok(status == WAIT_OBJECT_0, "WaitForSingleObject status %ld error %ld\n", status, GetLastError()); + + ok(GetExitCodeThread(thread, &exitcode), "Could not retrieve thread exit code\n"); + + return exitcode; +} + +static void test_FindFirstChangeNotification(void) +{ + HANDLE change, file, thread; + DWORD attributes, count; + BOOL ret; + + char workdir[MAX_PATH], dirname1[MAX_PATH], dirname2[MAX_PATH]; + char filename1[MAX_PATH], filename2[MAX_PATH]; + static const char prefix[] = "FCN"; + char buffer[2048]; + + /* pathetic checks */ + + change = FindFirstChangeNotificationA("not-a-file", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + ok(change == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, + "FindFirstChangeNotification error: %ld\n", GetLastError()); + + if (0) /* This documents win2k behavior. It crashes on win98. */ + { + change = FindFirstChangeNotificationA(NULL, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + ok(change == NULL && GetLastError() == ERROR_PATH_NOT_FOUND, + "FindFirstChangeNotification error: %ld\n", GetLastError()); + } + + ret = FindNextChangeNotification(NULL); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindNextChangeNotification error: %ld\n", + GetLastError()); + + ret = FindCloseChangeNotification(NULL); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %ld\n", + GetLastError()); + + ret = GetTempPathA(MAX_PATH, workdir); + ok(ret, "GetTempPathA error: %ld\n", GetLastError()); + + lstrcatA(workdir, "testFileChangeNotification"); + + ret = CreateDirectoryA(workdir, NULL); + ok(ret, "CreateDirectoryA error: %ld\n", GetLastError()); + + ret = GetTempFileNameA(workdir, prefix, 0, filename1); + ok(ret, "GetTempFileNameA error: %ld\n", GetLastError()); + + file = CreateFileA(filename1, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError()); + ret = CloseHandle(file); + ok( ret, "CloseHandle error: %ld\n", GetLastError()); + + /* Try to register notification for a file. win98 and win2k behave differently here */ + change = FindFirstChangeNotificationA(filename1, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + ok(change == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_DIRECTORY || + GetLastError() == ERROR_FILE_NOT_FOUND), + "FindFirstChangeNotification error: %ld\n", GetLastError()); + + lstrcpyA(dirname1, filename1); + lstrcatA(dirname1, "dir"); + + ret = CreateDirectoryA(dirname1, NULL); + ok(ret, "CreateDirectoryA error: %ld\n", GetLastError()); + + /* What if we remove the directory we registered notification for? */ + thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); + ret = RemoveDirectoryA(dirname1); + ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError()); + + /* win98 and win2k behave differently here */ + ret = FinishNotificationThread(thread); + ok(ret || !ret, "You'll never read this\n"); + + /* functional checks */ + + /* Create a directory */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); + ret = CreateDirectoryA(dirname1, NULL); + ok(ret, "CreateDirectoryA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + lstrcpyA(dirname2, dirname1); + lstrcatA(dirname2, "new"); + + /* Rename a directory */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); + ret = MoveFileA(dirname1, dirname2); + ok(ret, "MoveFileA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + /* Delete a directory */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); + ret = RemoveDirectoryA(dirname2); + ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + lstrcpyA(filename2, filename1); + lstrcatA(filename2, "new"); + + /* Rename a file */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + ret = MoveFileA(filename1, filename2); + ok(ret, "MoveFileA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + /* Delete a file */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + ret = DeleteFileA(filename2); + ok(ret, "DeleteFileA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + /* Create a file */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); + file = CreateFileA(filename2, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError()); + ret = CloseHandle(file); + ok( ret, "CloseHandle error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + attributes = GetFileAttributesA(filename2); + ok(attributes != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA error: %ld\n", GetLastError()); + attributes &= FILE_ATTRIBUTE_READONLY; + + /* Change file attributes */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_ATTRIBUTES); + ret = SetFileAttributesA(filename2, attributes); + ok(ret, "SetFileAttributesA error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + /* Change last write time by writing to a file */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE); + file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError()); + ret = WriteFile(file, buffer, sizeof(buffer), &count, NULL); + ok(ret && count == sizeof(buffer), "WriteFile error: %ld\n", GetLastError()); + ret = CloseHandle(file); + ok( ret, "CloseHandle error: %ld\n", GetLastError()); + ok(FinishNotificationThread(thread), "Missed notification\n"); + + /* Change file size by truncating a file */ + thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_SIZE); + file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError()); + ret = WriteFile(file, buffer, sizeof(buffer) / 2, &count, NULL); + ok(ret && count == sizeof(buffer) / 2, "WriteFileA error: %ld\n", GetLastError()); [truncated at 1000 lines; 12413 more skipped]
19 years, 4 months
1
0
0
0
[sedwards] 17136: make the ros test name dllname_rostest.exe, suggested by Usurp
by sedwards@svn.reactos.com
make the ros test name dllname_rostest.exe, suggested by Usurp Modified: trunk/reactos/lib/kernel32/tests/kernel32.xml _____ Modified: trunk/reactos/lib/kernel32/tests/kernel32.xml --- trunk/reactos/lib/kernel32/tests/kernel32.xml 2005-08-07 02:54:10 UTC (rev 17135) +++ trunk/reactos/lib/kernel32/tests/kernel32.xml 2005-08-07 03:00:44 UTC (rev 17136) @@ -1,4 +1,4 @@ -<module name="kernel32_tests" type="test"> +<module name="kernel32_rostest" type="test"> <include base="rtshared">.</include> <include base="kernel32">.</include> <define name="_DISABLE_TIDENTS" />
19 years, 4 months
1
0
0
0
[sedwards] 17135: Named reactos regression tests dllname_tests.exe and wine test name dllname_test.exe to prevent conflicts
by sedwards@svn.reactos.com
Named reactos regression tests dllname_tests.exe and wine test name dllname_test.exe to prevent conflicts Modified: trunk/reactos/lib/kernel32/tests/kernel32.xml _____ Modified: trunk/reactos/lib/kernel32/tests/kernel32.xml --- trunk/reactos/lib/kernel32/tests/kernel32.xml 2005-08-07 02:22:29 UTC (rev 17134) +++ trunk/reactos/lib/kernel32/tests/kernel32.xml 2005-08-07 02:54:10 UTC (rev 17135) @@ -1,4 +1,4 @@ -<module name="kernel32_test" type="test"> +<module name="kernel32_tests" type="test"> <include base="rtshared">.</include> <include base="kernel32">.</include> <define name="_DISABLE_TIDENTS" />
19 years, 4 months
1
0
0
0
[sedwards] 17134: add some missing values from Wine
by sedwards@svn.reactos.com
add some missing values from Wine Modified: trunk/reactos/w32api/include/winerror.h _____ Modified: trunk/reactos/w32api/include/winerror.h --- trunk/reactos/w32api/include/winerror.h 2005-08-07 02:16:34 UTC (rev 17133) +++ trunk/reactos/w32api/include/winerror.h 2005-08-07 02:22:29 UTC (rev 17134) @@ -4,8 +4,15 @@ #pragma GCC system_header #endif +#ifdef RC_INVOKED +#define _HRESULT_TYPEDEF_(x) (x) +#else +#define _HRESULT_TYPEDEF_(x) ((HRESULT)x) +#endif + #define ERROR_SUCCESS 0L #define NO_ERROR 0L +#define ERROR_AUDITING_DISABLED 0xC0090001L #define ERROR_INVALID_FUNCTION 1L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_PATH_NOT_FOUND 3L @@ -2131,40 +2138,55 @@ #define TYPE_E_CANTLOADLIBRARY ((HRESULT)0x80029C4AL) #define TYPE_E_INCONSISTENTPROPFUNCS ((HRESULT)0x80029C83L) #define TYPE_E_CIRCULARTYPE ((HRESULT)0x80029C84L) -#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L) -#define STG_E_FILENOTFOUND ((HRESULT)0x80030002L) -#define STG_E_PATHNOTFOUND ((HRESULT)0x80030003L) -#define STG_E_TOOMANYOPENFILES ((HRESULT)0x80030004L) -#define STG_E_ACCESSDENIED ((HRESULT)0x80030005L) -#define STG_E_INVALIDHANDLE ((HRESULT)0x80030006L) -#define STG_E_INSUFFICIENTMEMORY ((HRESULT)0x80030008L) -#define STG_E_INVALIDPOINTER ((HRESULT)0x80030009L) -#define STG_E_NOMOREFILES ((HRESULT)0x80030012L) -#define STG_E_DISKISWRITEPROTECTED ((HRESULT)0x80030013L) -#define STG_E_SEEKERROR ((HRESULT)0x80030019L) -#define STG_E_WRITEFAULT ((HRESULT)0x8003001DL) -#define STG_E_READFAULT ((HRESULT)0x8003001EL) -#define STG_E_SHAREVIOLATION ((HRESULT)0x80030020L) -#define STG_E_LOCKVIOLATION ((HRESULT)0x80030021L) -#define STG_E_FILEALREADYEXISTS ((HRESULT)0x80030050L) -#define STG_E_INVALIDPARAMETER ((HRESULT)0x80030057L) -#define STG_E_MEDIUMFULL ((HRESULT)0x80030070L) -#define STG_E_ABNORMALAPIEXIT ((HRESULT)0x800300FAL) -#define STG_E_INVALIDHEADER ((HRESULT)0x800300FBL) -#define STG_E_INVALIDNAME ((HRESULT)0x800300FCL) -#define STG_E_UNKNOWN ((HRESULT)0x800300FDL) -#define STG_E_UNIMPLEMENTEDFUNCTION ((HRESULT)0x800300FEL) -#define STG_E_INVALIDFLAG ((HRESULT)0x800300FFL) -#define STG_E_INUSE ((HRESULT)0x80030100L) -#define STG_E_NOTCURRENT ((HRESULT)0x80030101L) -#define STG_E_REVERTED ((HRESULT)0x80030102L) -#define STG_E_CANTSAVE ((HRESULT)0x80030103L) -#define STG_E_OLDFORMAT ((HRESULT)0x80030104L) -#define STG_E_OLDDLL ((HRESULT)0x80030105L) -#define STG_E_SHAREREQUIRED ((HRESULT)0x80030106L) -#define STG_E_NOTFILEBASEDSTORAGE ((HRESULT)0x80030107L) -#define STG_E_EXTANTMARSHALLINGS ((HRESULT)0x80030108L) -#define STG_S_CONVERTED ((HRESULT)0x00030200L) +#define STG_S_CONVERTED _HRESULT_TYPEDEF_(0x00030200L) +#define STG_S_BLOCK _HRESULT_TYPEDEF_(0x00030201L) +#define STG_S_RETRYNOW _HRESULT_TYPEDEF_(0x00030202L) +#define STG_S_MONITORING _HRESULT_TYPEDEF_(0x00030203L) +#define STG_S_MULTIPLEOPENS _HRESULT_TYPEDEF_(0x00030204L) +#define STG_S_CONSOLIDATIONFAILED _HRESULT_TYPEDEF_(0x00030205L) +#define STG_S_CANNOTCONSOLIDATE _HRESULT_TYPEDEF_(0x00030206L) + +#define STG_E_INVALIDFUNCTION _HRESULT_TYPEDEF_(0x80030001L) +#define STG_E_FILENOTFOUND _HRESULT_TYPEDEF_(0x80030002L) +#define STG_E_PATHNOTFOUND _HRESULT_TYPEDEF_(0x80030003L) +#define STG_E_TOOMANYOPENFILES _HRESULT_TYPEDEF_(0x80030004L) +#define STG_E_ACCESSDENIED _HRESULT_TYPEDEF_(0x80030005L) +#define STG_E_INVALIDHANDLE _HRESULT_TYPEDEF_(0x80030006L) +#define STG_E_INSUFFICIENTMEMORY _HRESULT_TYPEDEF_(0x80030008L) +#define STG_E_INVALIDPOINTER _HRESULT_TYPEDEF_(0x80030009L) +#define STG_E_NOMOREFILES _HRESULT_TYPEDEF_(0x80030012L) +#define STG_E_DISKISWRITEPROTECTED _HRESULT_TYPEDEF_(0x80030013L) +#define STG_E_SEEKERROR _HRESULT_TYPEDEF_(0x80030019L) +#define STG_E_WRITEFAULT _HRESULT_TYPEDEF_(0x8003001DL) +#define STG_E_READFAULT _HRESULT_TYPEDEF_(0x8003001EL) +#define STG_E_SHAREVIOLATION _HRESULT_TYPEDEF_(0x80030020L) +#define STG_E_LOCKVIOLATION _HRESULT_TYPEDEF_(0x80030021L) +#define STG_E_FILEALREADYEXISTS _HRESULT_TYPEDEF_(0x80030050L) +#define STG_E_INVALIDPARAMETER _HRESULT_TYPEDEF_(0x80030057L) +#define STG_E_MEDIUMFULL _HRESULT_TYPEDEF_(0x80030070L) +#define STG_E_ABNORMALAPIEXIT _HRESULT_TYPEDEF_(0x800300FAL) +#define STG_E_INVALIDHEADER _HRESULT_TYPEDEF_(0x800300FBL) +#define STG_E_INVALIDNAME _HRESULT_TYPEDEF_(0x800300FCL) +#define STG_E_UNKNOWN _HRESULT_TYPEDEF_(0x800300FDL) +#define STG_E_UNIMPLEMENTEDFUNCTION _HRESULT_TYPEDEF_(0x800300FEL) +#define STG_E_INVALIDFLAG _HRESULT_TYPEDEF_(0x800300FFL) +#define STG_E_INUSE _HRESULT_TYPEDEF_(0x80030100L) +#define STG_E_NOTCURRENT _HRESULT_TYPEDEF_(0x80030101L) +#define STG_E_REVERTED _HRESULT_TYPEDEF_(0x80030102L) +#define STG_E_CANTSAVE _HRESULT_TYPEDEF_(0x80030103L) +#define STG_E_OLDFORMAT _HRESULT_TYPEDEF_(0x80030104L) +#define STG_E_OLDDLL _HRESULT_TYPEDEF_(0x80030105L) +#define STG_E_SHAREREQUIRED _HRESULT_TYPEDEF_(0x80030106L) +#define STG_E_NOTFILEBASEDSTORAGE _HRESULT_TYPEDEF_(0x80030107L) +#define STG_E_EXTANTMARSHALLINGS _HRESULT_TYPEDEF_(0x80030108L) + +#define STG_E_STATUS_COPY_PROTECTION_FAILURE _HRESULT_TYPEDEF_(0x80030305L) +#define STG_E_CSS_AUTHENTICATION_FAILURE _HRESULT_TYPEDEF_(0x80030306L) +#define STG_E_CSS_KEY_NOT_PRESENT _HRESULT_TYPEDEF_(0x80030307L) +#define STG_E_CSS_KEY_NOT_ESTABLISHED _HRESULT_TYPEDEF_(0x80030308L) +#define STG_E_CSS_SCRAMBLED_SECTOR _HRESULT_TYPEDEF_(0x80030309L) +#define STG_E_CSS_REGION_MISMATCH _HRESULT_TYPEDEF_(0x8003030AL) +#define STG_E_RESETS_EXHAUSTED _HRESULT_TYPEDEF_(0x8003030BL) #define RPC_E_CALL_REJECTED ((HRESULT)0x80010001L) #define RPC_E_CALL_CANCELED ((HRESULT)0x80010002L) #define RPC_E_CANTPOST_INSENDCALL ((HRESULT)0x80010003L) @@ -2239,4 +2261,208 @@ #define NTE_SYS_ERR ((HRESULT)0x80090021L) /* #define NTE_TOKEN_KEYSET_STORAGE ??? */ +#define SEC_E_INSUFFICIENT_MEMORY _HRESULT_TYPEDEF_(0x80090300L) +#define SEC_E_INVALID_HANDLE _HRESULT_TYPEDEF_(0x80090301L) +#define SEC_E_UNSUPPORTED_FUNCTION _HRESULT_TYPEDEF_(0x80090302L) +#define SEC_E_TARGET_UNKNOWN _HRESULT_TYPEDEF_(0x80090303L) +#define SEC_E_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80090304L) +#define SEC_E_SECPKG_NOT_FOUND _HRESULT_TYPEDEF_(0x80090305L) +#define SEC_E_NOT_OWNER _HRESULT_TYPEDEF_(0x80090306L) +#define SEC_E_CANNOT_INSTALL _HRESULT_TYPEDEF_(0x80090307L) +#define SEC_E_INVALID_TOKEN _HRESULT_TYPEDEF_(0x80090308L) +#define SEC_E_CANNOT_PACK _HRESULT_TYPEDEF_(0x80090309L) +#define SEC_E_QOP_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009030AL) +#define SEC_E_NO_IMPERSONATION _HRESULT_TYPEDEF_(0x8009030BL) +#define SEC_E_LOGON_DENIED _HRESULT_TYPEDEF_(0x8009030CL) +#define SEC_E_UNKNOWN_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030DL) +#define SEC_E_NO_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030EL) +#define SEC_E_MESSAGE_ALTERED _HRESULT_TYPEDEF_(0x8009030FL) +#define SEC_E_OUT_OF_SEQUENCE _HRESULT_TYPEDEF_(0x80090310L) +#define SEC_E_NO_AUTHENTICATING_AUTHORITY _HRESULT_TYPEDEF_(0x80090311L) +#define SEC_E_BAD_PKGID _HRESULT_TYPEDEF_(0x80090316L) +#define SEC_E_CONTEXT_EXPIRED _HRESULT_TYPEDEF_(0x80090317L) +#define SEC_E_INCOMPLETE_MESSAGE _HRESULT_TYPEDEF_(0x80090318L) +#define SEC_E_INCOMPLETE_CREDENTIALS _HRESULT_TYPEDEF_(0x80090320L) +#define SEC_E_BUFFER_TOO_SMALL _HRESULT_TYPEDEF_(0x80090321L) +#define SEC_E_WRONG_PRINCIPAL _HRESULT_TYPEDEF_(0x80090322L) +#define SEC_E_TIME_SKEW _HRESULT_TYPEDEF_(0x80090324L) +#define SEC_E_UNTRUSTED_ROOT _HRESULT_TYPEDEF_(0x80090325L) +#define SEC_E_ILLEGAL_MESSAGE _HRESULT_TYPEDEF_(0x80090326L) +#define SEC_E_CERT_UNKNOWN _HRESULT_TYPEDEF_(0x80090327L) +#define SEC_E_CERT_EXPIRED _HRESULT_TYPEDEF_(0x80090328L) +#define SEC_E_ENCRYPT_FAILURE _HRESULT_TYPEDEF_(0x80090329L) +#define SEC_E_DECRYPT_FAILURE _HRESULT_TYPEDEF_(0x80090330L) +#define SEC_E_ALGORITHM_MISMATCH _HRESULT_TYPEDEF_(0x80090331L) +#define SEC_E_SECURITY_QOS_FAILED _HRESULT_TYPEDEF_(0x80090332L) +#define SEC_E_UNFINISHED_CONTEXT_DELETED _HRESULT_TYPEDEF_(0x80090333L) +#define SEC_E_NO_TGT_REPLY _HRESULT_TYPEDEF_(0x80090334L) +#define SEC_E_NO_IP_ADDRESSES _HRESULT_TYPEDEF_(0x80090335L) +#define SEC_E_WRONG_CREDENTIAL_HANDLE _HRESULT_TYPEDEF_(0x80090336L) +#define SEC_E_CRYPTO_SYSTEM_INVALID _HRESULT_TYPEDEF_(0x80090337L) +#define SEC_E_MAX_REFERRALS_EXCEEDED _HRESULT_TYPEDEF_(0x80090338L) +#define SEC_E_MUST_BE_KDC _HRESULT_TYPEDEF_(0x80090339L) +#define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009033AL) +#define SEC_E_TOO_MANY_PRINCIPALS _HRESULT_TYPEDEF_(0x8009033BL) +#define SEC_E_NO_PA_DATA _HRESULT_TYPEDEF_(0x8009033CL) +#define SEC_E_PKINIT_NAME_MISMATCH _HRESULT_TYPEDEF_(0x8009033DL) +#define SEC_E_SMARTCARD_LOGON_REQUIRED _HRESULT_TYPEDEF_(0x8009033EL) +#define SEC_E_SHUTDOWN_IN_PROGRESS _HRESULT_TYPEDEF_(0x8009033FL) +#define SEC_E_KDC_INVALID_REQUEST _HRESULT_TYPEDEF_(0x80090340L) +#define SEC_E_KDC_UNABLE_TO_REFER _HRESULT_TYPEDEF_(0x80090341L) +#define SEC_E_KDC_UNKNOWN_ETYPE _HRESULT_TYPEDEF_(0x80090342L) +#define SEC_E_UNSUPPORTED_PREAUTH _HRESULT_TYPEDEF_(0x80090343L) +#define SEC_E_DELEGATION_REQUIRED _HRESULT_TYPEDEF_(0x80090345L) +#define SEC_E_BAD_BINDINGS _HRESULT_TYPEDEF_(0x80090346L) +#define SEC_E_MULTIPLE_ACCOUNTS _HRESULT_TYPEDEF_(0x80090347L) +#define SEC_E_NO_KERB_KEY _HRESULT_TYPEDEF_(0x80090348L) +#define SEC_E_CERT_WRONG_USAGE _HRESULT_TYPEDEF_(0x80090349L) +#define SEC_E_DOWNGRADE_DETECTED _HRESULT_TYPEDEF_(0x80090350L) +#define SEC_E_SMARTCARD_CERT_REVOKED _HRESULT_TYPEDEF_(0x80090351L) +#define SEC_E_ISSUING_CA_UNTRUSTED _HRESULT_TYPEDEF_(0x80090352L) +#define SEC_E_REVOCATION_OFFLINE_C _HRESULT_TYPEDEF_(0x80090353L) +#define SEC_E_PKINIT_CLIENT_FAILURE _HRESULT_TYPEDEF_(0x80090354L) +#define SEC_E_SMARTCARD_CERT_EXPIRED _HRESULT_TYPEDEF_(0x80090355L) +#define SEC_E_NO_S4U_PROT_SUPPORT _HRESULT_TYPEDEF_(0x80090356L) +#define SEC_E_CROSSREALM_DELEGATION_FAILURE _HRESULT_TYPEDEF_(0x80090357L) +#define SEC_E_REVOCATION_OFFLINE_KDC _HRESULT_TYPEDEF_(0x80090358L) +#define SEC_E_ISSUING_CA_UNTRUSTED_KDC _HRESULT_TYPEDEF_(0x80090359L) +#define SEC_E_KDC_CERT_EXPIRED _HRESULT_TYPEDEF_(0x8009035AL) +#define SEC_E_KDC_CERT_REVOKED _HRESULT_TYPEDEF_(0x8009035BL) + +#define CRYPT_E_MSG_ERROR _HRESULT_TYPEDEF_(0x80091001L) +#define CRYPT_E_UNKNOWN_ALGO _HRESULT_TYPEDEF_(0x80091002L) +#define CRYPT_E_OID_FORMAT _HRESULT_TYPEDEF_(0x80091003L) +#define CRYPT_E_INVALID_MSG_TYPE _HRESULT_TYPEDEF_(0x80091004L) +#define CRYPT_E_UNEXPECTED_ENCODING _HRESULT_TYPEDEF_(0x80091005L) +#define CRYPT_E_AUTH_ATTR_MISSING _HRESULT_TYPEDEF_(0x80091006L) +#define CRYPT_E_HASH_VALUE _HRESULT_TYPEDEF_(0x80091007L) +#define CRYPT_E_INVALID_INDEX _HRESULT_TYPEDEF_(0x80091008L) +#define CRYPT_E_ALREADY_DECRYPTED _HRESULT_TYPEDEF_(0x80091009L) +#define CRYPT_E_NOT_DECRYPTED _HRESULT_TYPEDEF_(0x8009100AL) +#define CRYPT_E_RECIPIENT_NOT_FOUND _HRESULT_TYPEDEF_(0x8009100BL) +#define CRYPT_E_CONTROL_TYPE _HRESULT_TYPEDEF_(0x8009100CL) +#define CRYPT_E_ISSUER_SERIALNUMBER _HRESULT_TYPEDEF_(0x8009100DL) +#define CRYPT_E_SIGNER_NOT_FOUND _HRESULT_TYPEDEF_(0x8009100EL) +#define CRYPT_E_ATTRIBUTES_MISSING _HRESULT_TYPEDEF_(0x8009100FL) +#define CRYPT_E_STREAM_MSG_NOT_READY _HRESULT_TYPEDEF_(0x80091010L) +#define CRYPT_E_STREAM_INSUFFICIENT_DATA _HRESULT_TYPEDEF_(0x80091011L) +#define CRYPT_I_NEW_PROTECTION_REQUIRED _HRESULT_TYPEDEF_(0x80091012L) + +#define CRYPT_E_BAD_LEN _HRESULT_TYPEDEF_(0x80092001L) +#define CRYPT_E_BAD_ENCODE _HRESULT_TYPEDEF_(0x80092002L) +#define CRYPT_E_FILE_ERROR _HRESULT_TYPEDEF_(0x80092003L) +#define CRYPT_E_NOT_FOUND _HRESULT_TYPEDEF_(0x80092004L) +#define CRYPT_E_EXISTS _HRESULT_TYPEDEF_(0x80092005L) +#define CRYPT_E_NO_PROVIDER _HRESULT_TYPEDEF_(0x80092006L) +#define CRYPT_E_SELF_SIGNED _HRESULT_TYPEDEF_(0x80092007L) +#define CRYPT_E_DELETED_PREV _HRESULT_TYPEDEF_(0x80092008L) +#define CRYPT_E_NO_MATCH _HRESULT_TYPEDEF_(0x80092009L) +#define CRYPT_E_UNEXPECTED_MSG_TYPE _HRESULT_TYPEDEF_(0x8009200AL) +#define CRYPT_E_NO_KEY_PROPERTY _HRESULT_TYPEDEF_(0x8009200BL) +#define CRYPT_E_NO_DECRYPT_CERT _HRESULT_TYPEDEF_(0x8009200CL) +#define CRYPT_E_BAD_MSG _HRESULT_TYPEDEF_(0x8009200DL) +#define CRYPT_E_NO_SIGNER _HRESULT_TYPEDEF_(0x8009200EL) +#define CRYPT_E_PENDING_CLOSE _HRESULT_TYPEDEF_(0x8009200FL) +#define CRYPT_E_REVOKED _HRESULT_TYPEDEF_(0x80092010L) +#define CRYPT_E_NO_REVOCATION_DLL _HRESULT_TYPEDEF_(0x80092011L) +#define CRYPT_E_NO_REVOCATION_CHECK _HRESULT_TYPEDEF_(0x80092012L) +#define CRYPT_E_REVOCATION_OFFLINE _HRESULT_TYPEDEF_(0x80092013L) +#define CRYPT_E_NOT_IN_REVOCATION_DATABASE _HRESULT_TYPEDEF_(0x80092014L) +#define CRYPT_E_INVALID_NUMERIC_STRING _HRESULT_TYPEDEF_(0x80092020L) +#define CRYPT_E_INVALID_PRINTABLE_STRING _HRESULT_TYPEDEF_(0x80092021L) +#define CRYPT_E_INVALID_IA5_STRING _HRESULT_TYPEDEF_(0x80092022L) +#define CRYPT_E_INVALID_X500_STRING _HRESULT_TYPEDEF_(0x80092023L) +#define CRYPT_E_NOT_CHAR_STRING _HRESULT_TYPEDEF_(0x80092024L) +#define CRYPT_E_FILERESIZED _HRESULT_TYPEDEF_(0x80092025L) +#define CRYPT_E_SECURITY_SETTINGS _HRESULT_TYPEDEF_(0x80092026L) +#define CRYPT_E_NO_VERIFY_USAGE_DLL _HRESULT_TYPEDEF_(0x80092027L) +#define CRYPT_E_NO_VERIFY_USAGE_CHECK _HRESULT_TYPEDEF_(0x80092028L) +#define CRYPT_E_VERIFY_USAGE_OFFLINE _HRESULT_TYPEDEF_(0x80092029L) +#define CRYPT_E_NOT_IN_CTL _HRESULT_TYPEDEF_(0x8009202AL) +#define CRYPT_E_NO_TRUSTED_SIGNER _HRESULT_TYPEDEF_(0x8009202BL) +#define CRYPT_E_MISSING_PUBKEY_PARA _HRESULT_TYPEDEF_(0x8009202CL) +#define CRYPT_E_OSS_ERROR _HRESULT_TYPEDEF_(0x80093000L) +#define OSS_MORE_BUF _HRESULT_TYPEDEF_(0x80093001L) +#define OSS_NEGATIVE_UINTEGER _HRESULT_TYPEDEF_(0x80093002L) +#define OSS_PDU_RANGE _HRESULT_TYPEDEF_(0x80093003L) +#define OSS_MORE_INPUT _HRESULT_TYPEDEF_(0x80093004L) +#define OSS_DATA_ERROR _HRESULT_TYPEDEF_(0x80093005L) +#define OSS_BAD_ARG _HRESULT_TYPEDEF_(0x80093006L) +#define OSS_BAD_VERSION _HRESULT_TYPEDEF_(0x80093007L) +#define OSS_OUT_MEMORY _HRESULT_TYPEDEF_(0x80093008L) +#define OSS_PDU_MISMATCH _HRESULT_TYPEDEF_(0x80093009L) +#define OSS_LIMITED _HRESULT_TYPEDEF_(0x8009300AL) +#define OSS_BAD_PTR _HRESULT_TYPEDEF_(0x8009300BL) +#define OSS_BAD_TIME _HRESULT_TYPEDEF_(0x8009300CL) +#define OSS_INDEFINITE_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009300DL) +#define OSS_MEM_ERROR _HRESULT_TYPEDEF_(0x8009300EL) +#define OSS_BAD_TABLE _HRESULT_TYPEDEF_(0x8009300FL) +#define OSS_TOO_LONG _HRESULT_TYPEDEF_(0x80093010L) +#define OSS_CONSTRAINT_VIOLATED _HRESULT_TYPEDEF_(0x80093011L) +#define OSS_FATAL_ERROR _HRESULT_TYPEDEF_(0x80093012L) +#define OSS_ACCESS_SERIALIZATION_ERROR _HRESULT_TYPEDEF_(0x80093013L) +#define OSS_NULL_TBL _HRESULT_TYPEDEF_(0x80093014L) +#define OSS_NULL_FCN _HRESULT_TYPEDEF_(0x80093015L) +#define OSS_BAD_ENCRULES _HRESULT_TYPEDEF_(0x80093016L) +#define OSS_UNAVAIL_ENCRULES _HRESULT_TYPEDEF_(0x80093017L) +#define OSS_CANT_OPEN_TRACE_WINDOW _HRESULT_TYPEDEF_(0x80093018L) +#define OSS_UNIMPLEMENTED _HRESULT_TYPEDEF_(0x80093019L) +#define OSS_OID_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009301AL) +#define OSS_CANT_OPEN_TRACE_FILE _HRESULT_TYPEDEF_(0x8009301BL) +#define OSS_TRACE_FILE_ALREADY_OPEN _HRESULT_TYPEDEF_(0x8009301CL) +#define OSS_TABLE_MISMATCH _HRESULT_TYPEDEF_(0x8009301DL) +#define OSS_TYPE_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009301EL) +#define OSS_REAL_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009301FL) +#define OSS_REAL_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093020L) +#define OSS_OUT_OF_RANGE _HRESULT_TYPEDEF_(0x80093021L) +#define OSS_COPIER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093022L) +#define OSS_CONSTRAINT_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093023L) +#define OSS_COMPARATOR_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093024L) +#define OSS_COMPARATOR_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093025L) +#define OSS_MEM_MGR_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093026L) +#define OSS_PDV_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093027L) +#define OSS_PDV_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093028L) +#define OSS_API_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093029L) +#define OSS_BERDER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009302AL) +#define OSS_PER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009302BL) +#define OSS_OPEN_TYPE_ERROR _HRESULT_TYPEDEF_(0x8009302CL) +#define OSS_MUTEX_NOT_CREATED _HRESULT_TYPEDEF_(0x8009302DL) +#define OSS_CANT_CLOSE_TRACE_FILE _HRESULT_TYPEDEF_(0x8009302EL) +#define CRYPT_E_ASN1_ERROR _HRESULT_TYPEDEF_(0x80093100L) +#define CRYPT_E_ASN1_INTERNAL _HRESULT_TYPEDEF_(0x80093101L) +#define CRYPT_E_ASN1_EOD _HRESULT_TYPEDEF_(0x80093102L) +#define CRYPT_E_ASN1_CORRUPT _HRESULT_TYPEDEF_(0x80093103L) +#define CRYPT_E_ASN1_LARGE _HRESULT_TYPEDEF_(0x80093104L) +#define CRYPT_E_ASN1_CONSTRAINT _HRESULT_TYPEDEF_(0x80093105L) +#define CRYPT_E_ASN1_MEMORY _HRESULT_TYPEDEF_(0x80093106L) +#define CRYPT_E_ASN1_OVERFLOW _HRESULT_TYPEDEF_(0x80093107L) +#define CRYPT_E_ASN1_BADPDU _HRESULT_TYPEDEF_(0x80093108L) +#define CRYPT_E_ASN1_BADARGS _HRESULT_TYPEDEF_(0x80093109L) +#define CRYPT_E_ASN1_BADREAL _HRESULT_TYPEDEF_(0x8009310AL) +#define CRYPT_E_ASN1_BADTAG _HRESULT_TYPEDEF_(0x8009310BL) +#define CRYPT_E_ASN1_CHOICE _HRESULT_TYPEDEF_(0x8009310CL) +#define CRYPT_E_ASN1_RULE _HRESULT_TYPEDEF_(0x8009310DL) +#define CRYPT_E_ASN1_UTF8 _HRESULT_TYPEDEF_(0x8009310EL) +#define CRYPT_E_ASN1_PDU_TYPE _HRESULT_TYPEDEF_(0x80093133L) +#define CRYPT_E_ASN1_NYI _HRESULT_TYPEDEF_(0x80093134L) +#define CRYPT_E_ASN1_EXTENDED _HRESULT_TYPEDEF_(0x80093201L) +#define CRYPT_E_ASN1_NOEOD _HRESULT_TYPEDEF_(0x80093202L) + +#define TRUST_E_CERT_SIGNATURE _HRESULT_TYPEDEF_(0x80096004L) +#define TRUST_E_PROVIDER_UNKNOWN _HRESULT_TYPEDEF_(0x800B0001L) +#define TRUST_E_ACTION_UNKNOWN _HRESULT_TYPEDEF_(0x800B0002L) +#define TRUST_E_SUBJECT_FORM_UNKNOWN _HRESULT_TYPEDEF_(0x800B0003L) +#define TRUST_E_SUBJECT_NOT_TRUSTED _HRESULT_TYPEDEF_(0x800B0004L) + +/* Smart card management error codes */ +#define SCARD_E_NO_SMARTCARD _HRESULT_TYPEDEF_(0x8010000CL) +#define SCARD_E_NO_SUCH_CERTIFICATE _HRESULT_TYPEDEF_(0x8010002CL) +#define SCARD_E_COMM_DATA_LOST _HRESULT_TYPEDEF_(0x8010002FL) + +#define SCARD_W_WRONG_CHV _HRESULT_TYPEDEF_(0x8010006BL) +#define SCARD_W_CHV_BLOCKED _HRESULT_TYPEDEF_(0x8010006CL) +#define SCARD_W_CARD_NOT_AUTHENTICATED _HRESULT_TYPEDEF_(0x8010006FL) + + + #endif
19 years, 4 months
1
0
0
0
[sedwards] 17133: ntdll pending some winerror.h fixes
by sedwards@svn.reactos.com
ntdll pending some winerror.h fixes Added: trunk/reactos/regtests/winetests/ntdll/ Added: trunk/reactos/regtests/winetests/ntdll/atom.c Added: trunk/reactos/regtests/winetests/ntdll/env.c Added: trunk/reactos/regtests/winetests/ntdll/error.c Added: trunk/reactos/regtests/winetests/ntdll/generated.c Added: trunk/reactos/regtests/winetests/ntdll/info.c Added: trunk/reactos/regtests/winetests/ntdll/large_int.c Added: trunk/reactos/regtests/winetests/ntdll/ntdll_test.h Added: trunk/reactos/regtests/winetests/ntdll/ntdll_test.xml Added: trunk/reactos/regtests/winetests/ntdll/path.c Added: trunk/reactos/regtests/winetests/ntdll/reg.c Added: trunk/reactos/regtests/winetests/ntdll/rtl.c Added: trunk/reactos/regtests/winetests/ntdll/rtlbitmap.c Added: trunk/reactos/regtests/winetests/ntdll/rtlstr.c Added: trunk/reactos/regtests/winetests/ntdll/string.c Added: trunk/reactos/regtests/winetests/ntdll/testlist.c Added: trunk/reactos/regtests/winetests/ntdll/time.c _____ Added: trunk/reactos/regtests/winetests/ntdll/atom.c --- trunk/reactos/regtests/winetests/ntdll/atom.c 2005-08-07 01:23:40 UTC (rev 17132) +++ trunk/reactos/regtests/winetests/ntdll/atom.c 2005-08-07 02:16:34 UTC (rev 17133) @@ -0,0 +1,402 @@ +/* Unit test suite for Ntdll atom API functions + * + * Copyright 2003 Gyorgy 'Nog' Jeney + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES + * We use function pointers here as there is no import library for NTDLL on + * windows. + */ + +#define _WIN32_WINNT 0x0501 + +#include <stdio.h> +#include <stdarg.h> +#include "windows.h" +#include "ntstatus.h" +#include "wine/test.h" +#include "wine/unicode.h" +#include "winternl.h" + +/* Function pointers for ntdll calls */ +static HMODULE hntdll = 0; +static NTSTATUS (WINAPI *pRtlCreateAtomTable)(ULONG,PRTL_ATOM_TABLE); +static NTSTATUS (WINAPI *pRtlDestroyAtomTable)(RTL_ATOM_TABLE); +static NTSTATUS (WINAPI *pRtlEmptyAtomTable)(RTL_ATOM_TABLE,BOOLEAN); +static NTSTATUS (WINAPI *pRtlAddAtomToAtomTable)(RTL_ATOM_TABLE,PCWSTR,PRTL_ATOM); +static NTSTATUS (WINAPI *pRtlDeleteAtomFromAtomTable)(RTL_ATOM_TABLE,RTL_ATOM); +static NTSTATUS (WINAPI *pRtlLookupAtomInAtomTable)(RTL_ATOM_TABLE,PCWSTR,PRTL_ATOM); +static NTSTATUS (WINAPI *pRtlPinAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM); +static NTSTATUS (WINAPI *pRtlQueryAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM,PULONG,PULONG,PWSTR,P ULONG); + +static const WCHAR EmptyAtom[] = {0}; +static const WCHAR testAtom1[] = {'H','e','l','l','o',' ','W','o','r','l','d',0}; +static const WCHAR testAtom2[] = {'H','e','l','l','o',' ','W','o','r','l','d','2',0}; +static const WCHAR testAtom3[] = {'H','e','l','l','o',' ','W','o','r','l','d','3',0}; + +static const WCHAR testAtom1Cap[] = {'H','E','L','L','O',' ','W','O','R','L','D',0}; +static const WCHAR testAtom1Low[] = {'h','e','l','l','o',' ','w','o','r','l','d',0}; + +static const WCHAR testAtomInt[] = {'#','1','3','2',0}; +static const WCHAR testAtomIntInv[] = {'#','2','3','4','z',0}; +static const WCHAR testAtomOTT[] = {'#','1','2','3',0}; + +static void InitFunctionPtr(void) +{ + hntdll = LoadLibraryA("ntdll.dll"); + ok(hntdll != 0, "Unable to load ntdll.dll\n"); + + if (hntdll) + { + pRtlCreateAtomTable = (void *)GetProcAddress(hntdll, "RtlCreateAtomTable"); + pRtlDestroyAtomTable = (void *)GetProcAddress(hntdll, "RtlDestroyAtomTable"); + pRtlEmptyAtomTable = (void *)GetProcAddress(hntdll, "RtlEmptyAtomTable"); + pRtlAddAtomToAtomTable = (void *)GetProcAddress(hntdll, "RtlAddAtomToAtomTable"); + pRtlDeleteAtomFromAtomTable = (void *)GetProcAddress(hntdll, "RtlDeleteAtomFromAtomTable"); + pRtlLookupAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlLookupAtomInAtomTable"); + pRtlPinAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlPinAtomInAtomTable"); + pRtlQueryAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlQueryAtomInAtomTable"); + } +} + +static DWORD RtlAtomTestThread(LPVOID Table) +{ + RTL_ATOM_TABLE AtomTable = *(PRTL_ATOM_TABLE)Table; + RTL_ATOM Atom; + NTSTATUS res; + ULONG RefCount = 0, PinCount = 0, Len = 0; + WCHAR Name[64]; + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom); + ok(!res, "Unable to find atom from another thread, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom); + ok(!res, "Unable to lookup pinned atom in table, retval: %lx\n", res); + + res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); + ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %lx\n", res); + + Len = 64; + res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); + ok(!res, "Failed with longenough buffer, retval: %lx\n", res); + ok(RefCount == 1, "Refcount was not 1 but %lx\n", RefCount); + ok(PinCount == 1, "Pincount was not 1 but %lx\n", PinCount); + ok(!strcmpW(Name, testAtom2), "We found wrong atom!!\n"); + ok((strlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + + Len = 64; + res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len); + ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %lx\n", res); + ok(!strcmpW(Name, testAtom2), "Found Wrong atom!\n"); + ok((strlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + return 0; +} + +static void test_NtAtom(void) +{ + RTL_ATOM_TABLE AtomTable = NULL; + NTSTATUS res; + RTL_ATOM Atom1, Atom2, Atom3, testEAtom, testAtom; + HANDLE testThread; + ULONG RefCount = 0, PinCount = 0, Len = 0; + WCHAR Name[64]; + + /* If we pass a non-null string to create atom table, then it thinks that we + * have passed it an already allocated atom table */ + res = pRtlCreateAtomTable(0, &AtomTable); + ok(!res, "RtlCreateAtomTable should succeed with an atom table size of 0\n"); + + if (!res) + { + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %lx\n", res); + } + + AtomTable = NULL; + res = pRtlCreateAtomTable(37, &AtomTable); + ok(!res, "We're unable to create an atom table with a valid table size retval: %lx\n", res); + if (!res) + { + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); + ok(!res, "We were unable to add a simple atom to the atom table, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom); + ok(!res, "We were unable to find capital version of the atom, retval: %lx\n", res); + ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n"); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom); + ok(!res, "Unable to find lowercase version of the atom, retval: %lx\n", res); + ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n"); + + res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom); + ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(!res, "Failed to find totally legitimate atom, retval: %lx\n", res); + ok(testAtom == Atom1, "Found wrong atom!\n"); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2); + ok(!res, "Unable to add other legitimate atom to table, retval: %lx\n", res); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom2); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + testThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)RtlAtomTestThread, &AtomTable, 0, NULL); + WaitForSingleObject(testThread, INFINITE); + + Len = 64; + res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount); + ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount); + ok(!strcmpW(Name, testAtom2), "We found wrong atom\n"); + ok((strlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + + res = pRtlEmptyAtomTable(AtomTable, FALSE); + ok(!res, "Unable to empty atom table, retval %lx\n", res); + + Len = 64; + res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); + ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %lx\n", res); + ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount); + ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount); + ok(!strcmpW(Name, testAtom2), "We found wrong atom\n"); + ok((strlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); + ok(!res, "We can't find our pinned atom!! retval: %lx\n", res); + ok(testAtom == Atom2, "We found wrong atom!!!\n"); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3); + ok(!res, "Unable to add atom to table, retval: %lx\n", res); + + res = pRtlEmptyAtomTable(AtomTable, TRUE); + ok(!res, "Unable to empty atom table, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %lx\n", res); + + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "Can't destroy atom table, retval: %lx\n", res); + } + + AtomTable = NULL; + res = pRtlCreateAtomTable(37, &AtomTable); + ok(!res, "Unable to create atom table, retval: %lx\n", res); + + if (!res) + { + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); + ok(!res, "Unable to add atom to atom table, retval %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(!res, "Can't find previously added atom in table, retval: %lx\n", res); + ok(testAtom == Atom1, "Found wrong atom! retval: %lx\n", res); + + res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); + ok(!res, "Unable to delete atom from table, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); + ok(!res, "Unable to add atom to atom table, retval: %lx\n", res); + + Len = 0; + res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len); + ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %lx\n", res); + ok((strlenW(testAtom1) * sizeof(WCHAR)) == Len, "Got wrong length %lx\n", Len); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom1); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(!res, "Unable to find atom in atom table, retval: %lx\n", res); + ok(testAtom == Atom1, "Wrong atom found\n"); + + res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); + ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %lx\n", res); + + res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); + ok(!res, "Able to find deleted atom in table\n"); + + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "Unable to destroy atom table\n"); + } +} + +/* Test Adding integer atoms to atom table */ +static void test_NtIntAtom(void) +{ + NTSTATUS res; + RTL_ATOM_TABLE AtomTable; + RTL_ATOM testAtom; + ULONG RefCount = 0, PinCount = 0; + int i; + WCHAR Name[64]; + ULONG Len; + + AtomTable = NULL; + res = pRtlCreateAtomTable(37, &AtomTable); + ok(!res, "Unable to create atom table, %lx\n", res); + + if (!res) + { + /* According to the kernel32 functions, integer atoms are only allowd from + * 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */ + res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)0, &testAtom); + ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %lx\n", res); + for (i = 1; i <= 0xbfff; i++) + { + res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); + ok(!res, "Unable to add valid integer atom %i, retval: %lx\n", i, res); + } + + for (i = 1; i <= 0xbfff; i++) + { + res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)i, &testAtom); + ok(!res, "Unable to find int atom %i, retval: %lx\n", i, res); + if (!res) + { + res = pRtlPinAtomInAtomTable(AtomTable, testAtom); + ok(!res, "Unable to pin int atom %i, retval: %lx\n", i, res); + } + } + + for (i = 0xc000; i <= 0xffff; i++) + { + res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); + ok(res, "Able to illeageal integer atom %i, retval: %lx\n", i, res); + } + + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + } + + AtomTable = NULL; + res = pRtlCreateAtomTable(37, &AtomTable); + ok(!res, "Unable to create atom table, %lx\n", res); + if (!res) + { + res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom); + ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom); + ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); + ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); + ok(!res, "Unable to re-add int atom to table, retval: %lx\n", res); + + Len = 64; + res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); + ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount); + ok(!strcmpW(testAtomOTT, Name), "Got wrong atom name\n"); + ok((strlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %ld\n", Len); + + res = pRtlPinAtomInAtomTable(AtomTable, testAtom); + ok(!res, "Unable to pin int atom, retval: %lx\n", res); + + res = pRtlPinAtomInAtomTable(AtomTable, testAtom); + ok(!res, "Unable to pin int atom, retval: %lx\n", res); + + res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); + ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount); + + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + } +} + +/* Tests to see how the pincount and refcount actually works */ +static void test_NtRefPinAtom(void) +{ + RTL_ATOM_TABLE AtomTable; + RTL_ATOM Atom; + ULONG PinCount = 0, RefCount = 0; + NTSTATUS res; + + AtomTable = NULL; + res = pRtlCreateAtomTable(37, &AtomTable); + ok(!res, "Unable to create atom table, %lx\n", res); + + if (!res) + { + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); + ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); + ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + + res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); + ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + + res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount); + ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + res = pRtlPinAtomInAtomTable(AtomTable, Atom); + ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + + res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); + ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); + ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount); + + res = pRtlDestroyAtomTable(AtomTable); + ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + } +} + +START_TEST(atom) +{ + InitFunctionPtr(); + if (pRtlCreateAtomTable) + { + test_NtAtom(); + test_NtIntAtom(); + test_NtRefPinAtom(); + } +} Property changes on: trunk/reactos/regtests/winetests/ntdll/atom.c ___________________________________________________________________ Name: svn:executable + * _____ Added: trunk/reactos/regtests/winetests/ntdll/env.c --- trunk/reactos/regtests/winetests/ntdll/env.c 2005-08-07 01:23:40 UTC (rev 17132) +++ trunk/reactos/regtests/winetests/ntdll/env.c 2005-08-07 02:16:34 UTC (rev 17133) @@ -0,0 +1,298 @@ +/* + * Unit test suite for ntdll path functions + * + * Copyright 2003 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <stdio.h> + +#include "ntdll_test.h" +#include "wine/unicode.h" + +static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, + LPCSTR src, DWORD srclen ); +static NTSTATUS (WINAPI *pRtlCreateEnvironment)(BOOLEAN, PWSTR*); +static NTSTATUS (WINAPI *pRtlDestroyEnvironment)(PWSTR); +static NTSTATUS (WINAPI *pRtlQueryEnvironmentVariable_U)(PWSTR, PUNICODE_STRING, PUNICODE_STRING); +static void (WINAPI *pRtlSetCurrentEnvironment)(PWSTR, PWSTR*); +static NTSTATUS (WINAPI *pRtlSetEnvironmentVariable)(PWSTR*, PUNICODE_STRING, PUNICODE_STRING); +static NTSTATUS (WINAPI *pRtlExpandEnvironmentStrings_U)(LPWSTR, PUNICODE_STRING, PUNICODE_STRING, PULONG); + +static WCHAR small_env[] = {'f','o','o','=','t','o','t','o',0, + 'f','o','=','t','i','t','i',0, + 'f','o','o','o','=','t','u','t','u',0, + 's','r','=','a','n','=','o','u','o',0, + 'g','=','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a', + 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 'a','a','a','a','a','a','a',0, + '=','o','O','H','=','I','I','I',0, + 'n','u','l','=',0, + 0}; + +static void testQuery(void) +{ + struct test + { + const char *var; + int len; + NTSTATUS status; + const char *val; + }; + + static const struct test tests[] = + { + {"foo", 256, STATUS_SUCCESS, "toto"}, + {"FoO", 256, STATUS_SUCCESS, "toto"}, + {"foo=", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, + {"foo ", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, + {"foo", 1, STATUS_BUFFER_TOO_SMALL, "toto"}, + {"foo", 3, STATUS_BUFFER_TOO_SMALL, "toto"}, + {"foo", 4, STATUS_SUCCESS, "toto"}, + {"fooo", 256, STATUS_SUCCESS, "tutu"}, + {"f", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, + {"g", 256, STATUS_SUCCESS, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaa"}, + {"sr=an", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, + {"sr", 256, STATUS_SUCCESS, "an=ouo"}, + {"=oOH", 256, STATUS_SUCCESS, "III"}, + {"", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, + {"nul", 256, STATUS_SUCCESS, ""}, + {NULL, 0, 0, NULL} + }; + + WCHAR bn[257]; + WCHAR bv[257]; + UNICODE_STRING name; + UNICODE_STRING value; + const struct test* test; + NTSTATUS nts; + + for (test = tests; test->var; test++) + { + name.Length = strlen(test->var) * 2; + name.MaximumLength = name.Length + 2; + name.Buffer = bn; + value.Length = 0; + value.MaximumLength = test->len * 2; + value.Buffer = bv; + bv[test->len] = '@'; + + pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 ); + nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value); + ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx\n", + test - tests, test->var, test->status, nts ); + if (nts == test->status) switch (nts) + { + case STATUS_SUCCESS: + pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->val, strlen(test->val)+1 ); + ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s\n", + value.Length, strlen(test->val) * sizeof(WCHAR), test->var ); + ok((value.Length == strlen(test->val) * sizeof(WCHAR) && strncmpW(bv, bn, test->len) == 0) || + strcmpW(bv, bn) == 0, + "Wrong result for %s/%d\n", test->var, test->len); + ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len); + break; + case STATUS_BUFFER_TOO_SMALL: + ok( value.Length == strlen(test->val) * sizeof(WCHAR), + "Wrong returned length %d/%d (too small buffer) for %s\n", + value.Length, strlen(test->val) * sizeof(WCHAR), test->var ); + break; + } + } +} + +static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATUS ret) +{ + WCHAR bvar[256], bval1[256], bval2[256]; + UNICODE_STRING uvar; + UNICODE_STRING uval; + NTSTATUS nts; + + uvar.Length = strlen(var) * sizeof(WCHAR); + uvar.MaximumLength = uvar.Length + sizeof(WCHAR); + uvar.Buffer = bvar; + pRtlMultiByteToUnicodeN( bvar, sizeof(bvar), NULL, var, strlen(var)+1 ); + if (val) + { + uval.Length = strlen(val) * sizeof(WCHAR); + uval.MaximumLength = uval.Length + sizeof(WCHAR); + uval.Buffer = bval1; + pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 ); + } + nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL); + ok(nts == ret, "Setting var %s=%s (%lx/%lx)\n", var, val, nts, ret); + if (nts == STATUS_SUCCESS) + { + uval.Length = 0; + uval.MaximumLength = sizeof(bval2); + uval.Buffer = bval2; + nts = pRtlQueryEnvironmentVariable_U(*env, &uvar, &uval); + switch (nts) + { + case STATUS_SUCCESS: + ok(strcmpW(bval1, bval2) == 0, "Cannot get value written to environment\n"); + break; + case STATUS_VARIABLE_NOT_FOUND: + ok(val == NULL, "Couldn't find variable, but didn't delete it. val = %s\n", val); + break; + default: + ok(0, "Wrong ret %lu for %s\n", nts, var); + break; + } + } +} + +static void testSet(void) +{ + LPWSTR env; + char tmp[16]; + int i; + + ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment\n"); + memmove(env, small_env, sizeof(small_env)); + + testSetHelper(&env, "cat", "dog", STATUS_SUCCESS); + testSetHelper(&env, "cat", "horse", STATUS_SUCCESS); + testSetHelper(&env, "cat", "zz", STATUS_SUCCESS); + testSetHelper(&env, "cat", NULL, STATUS_SUCCESS); + testSetHelper(&env, "cat", NULL, STATUS_VARIABLE_NOT_FOUND); + testSetHelper(&env, "foo", "meouw", STATUS_SUCCESS); + testSetHelper(&env, "me=too", "also", STATUS_INVALID_PARAMETER); + testSetHelper(&env, "me", "too=also", STATUS_SUCCESS); + testSetHelper(&env, "=too", "also", STATUS_SUCCESS); + testSetHelper(&env, "=", "also", STATUS_SUCCESS); + + for (i = 0; i < 128; i++) + { + sprintf(tmp, "zork%03d", i); + testSetHelper(&env, tmp, "is alive", STATUS_SUCCESS); + } + + for (i = 0; i < 128; i++) + { + sprintf(tmp, "zork%03d", i); + testSetHelper(&env, tmp, NULL, STATUS_SUCCESS); + } + testSetHelper(&env, "fOo", NULL, STATUS_SUCCESS); + + ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment\n"); +} + +static void testExpand(void) +{ + static const struct test + { + const char *src; + const char *dst; + } tests[] = + { + {"hello%foo%world", "hellototoworld"}, + {"hello%=oOH%world", "helloIIIworld"}, + {"hello%foo", "hello%foo"}, + {"hello%bar%world", "hello%bar%world"}, + /* + * {"hello%foo%world%=oOH%eeck", "hellototoworldIIIeeck"}, + * Interestingly enough, with a 8 WCHAR buffers, we get on 2k: + * helloIII + * so it seems like strings overflowing the buffer are written + * (troncated) but the write cursor is not advanced :-/ + */ + {NULL, NULL} + }; + + const struct test* test; + NTSTATUS nts; + UNICODE_STRING us_src, us_dst; + WCHAR src[256], dst[256], rst[256]; + ULONG ul; + + for (test = tests; test->src; test++) + { + pRtlMultiByteToUnicodeN(src, sizeof(src), NULL, test->src, strlen(test->src)+1); + pRtlMultiByteToUnicodeN(rst, sizeof(rst), NULL, test->dst, strlen(test->dst)+1); + + us_src.Length = strlen(test->src) * sizeof(WCHAR); + us_src.MaximumLength = us_src.Length + 2; + us_src.Buffer = src; + + us_dst.Length = 0; + us_dst.MaximumLength = 0; + us_dst.Buffer = NULL; + + nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); + ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), + "Wrong returned length for %s: %lu <> %u\n", + test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); + + us_dst.Length = 0; + us_dst.MaximumLength = sizeof(dst); + us_dst.Buffer = dst; + + nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); + ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts); + ok(ul == us_dst.Length + sizeof(WCHAR), + "Wrong returned length for %s: %lu <> %u\n", + test->src, ul, us_dst.Length + sizeof(WCHAR)); + ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), + "Wrong returned length for %s: %lu <> %u\n", + test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); + ok(strcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n", + test->src, test->dst); + + us_dst.Length = 0; + us_dst.MaximumLength = 8 * sizeof(WCHAR); + us_dst.Buffer = dst; + dst[8] = '-'; + nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); + ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts); + ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), + "Wrong returned length for %s (with buffer too small): %lu <> %u\n", + test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); + ok(strncmpW(dst, rst, 8) == 0, + "Wrong result for %s (with buffer too small): expecting %s\n", + test->src, test->dst); + ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]); + } + +} + +START_TEST(env) +{ + HMODULE mod = GetModuleHandleA("ntdll.dll"); + + pRtlMultiByteToUnicodeN = (void *)GetProcAddress(mod,"RtlMultiByteToUnicodeN"); + pRtlCreateEnvironment = (void*)GetProcAddress(mod, "RtlCreateEnvironment"); + pRtlDestroyEnvironment = (void*)GetProcAddress(mod, "RtlDestroyEnvironment"); + pRtlQueryEnvironmentVariable_U = (void*)GetProcAddress(mod, "RtlQueryEnvironmentVariable_U"); + pRtlSetCurrentEnvironment = (void*)GetProcAddress(mod, "RtlSetCurrentEnvironment"); + pRtlSetEnvironmentVariable = (void*)GetProcAddress(mod, "RtlSetEnvironmentVariable"); + pRtlExpandEnvironmentStrings_U = (void*)GetProcAddress(mod, "RtlExpandEnvironmentStrings_U"); + + if (pRtlQueryEnvironmentVariable_U) + testQuery(); + if (pRtlSetEnvironmentVariable) + testSet(); + if (pRtlExpandEnvironmentStrings_U) + testExpand(); +} Property changes on: trunk/reactos/regtests/winetests/ntdll/env.c ___________________________________________________________________ Name: svn:executable + * _____ Added: trunk/reactos/regtests/winetests/ntdll/error.c --- trunk/reactos/regtests/winetests/ntdll/error.c 2005-08-07 01:23:40 UTC (rev 17132) +++ trunk/reactos/regtests/winetests/ntdll/error.c 2005-08-07 02:16:34 UTC (rev 17133) @@ -0,0 +1,950 @@ +/* + * Unit tests for RtlNtStatusToDosError function + * + * Copyright (c) 2002 Andriy Palamarchuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define _WIN32_WINNT 0x0501 + +#include <stdarg.h> +#include <stdio.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS + +#include "wine/test.h" + +#include "windows.h" + +#include "windef.h" +#include "winbase.h" +#include "rpcnterr.h" +#include "winreg.h" +#include "winternl.h" + +/* FIXME!!! this test checks only mappings, defined by MSDN: + *
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q113996&
+ * It is necessary to add other mappings and to test them up to Windows XP. + * + * Some Windows platforms don't know about all the mappings, and in such + * cases they return somewhat strange results (Win98) or a generic error + * like ERROR_MR_MID_NOT_FOUND (NT4). Our tests have to know about these to + * not fail, but we would very much prefer Wine not to return such garbage. + * To you can pass the 'strict' option to this test to force it to only check + * results against the first listed value. This test should pass in strict + * mode on the latest Windows platform (currently XP) and in Wine. + * (of course older Windows platforms will fail to pass the strict mode) + */ + +static ULONG (WINAPI *statustodoserror)(NTSTATUS Status); +static int strict; + +static int prepare_test(void) +{ + HMODULE ntdll; + int argc; + char** argv; + + ntdll = LoadLibraryA("ntdll.dll"); + statustodoserror = (void*)GetProcAddress(ntdll, "RtlNtStatusToDosError"); + if (!statustodoserror) + return 0; + + argc = winetest_get_mainargs(&argv); + strict=(argc >= 3 && strcmp(argv[2],"strict")==0); + return 1; +} + +static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message) +{ + ULONG err; + + err = statustodoserror(win_nt); + ok(err == win32, + "%s (%lx): got %ld, expected %ld\n", + message, win_nt, err, win32); +} + +static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message) +{ + ULONG err; + + err = statustodoserror(win_nt); + ok(err == win32 || + (!strict && err == ERROR_MR_MID_NOT_FOUND), + "%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)\n", + message, win_nt, err, win32); +} + +static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message) +{ + ULONG err; + + err = statustodoserror(win_nt); + ok(err == win32_1 || (!strict && err == win32_2), + "%s (%lx): got %ld, expected %ld or %ld\n", + message, win_nt, err, win32_1, win32_2); +} + +static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message) +{ + ULONG err; + + err = statustodoserror(win_nt); + ok(err == win32_1 || + (!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)), + "%s (%lx): got %ld, expected %ld or %ld\n", + message, win_nt, err, win32_1, win32_2); +} + +#define cmp(status, error) \ + cmp_call(status, error, #status) +#define cmp2(status, error) \ + cmp_call2(status, error, #status) +#define cmp3(status, error1, error2) \ + cmp_call3(status, error1, error2, #status) +#define cmp4(status, error1, error2) \ + cmp_call4(status, error1, error2, #status) + +static void run_error_tests(void) +{ + cmp(STATUS_DATATYPE_MISALIGNMENT, ERROR_NOACCESS); + cmp(STATUS_ACCESS_VIOLATION, ERROR_NOACCESS); + cmp2(STATUS_DATATYPE_MISALIGNMENT_ERROR, ERROR_NOACCESS); + cmp(STATUS_CTL_FILE_NOT_SUPPORTED, ERROR_NOT_SUPPORTED); + cmp(STATUS_PORT_ALREADY_SET, ERROR_INVALID_PARAMETER); + cmp(STATUS_SECTION_NOT_IMAGE, ERROR_INVALID_PARAMETER); + cmp(STATUS_BAD_WORKING_SET_LIMIT, ERROR_INVALID_PARAMETER); + cmp(STATUS_WORKING_SET_LIMIT_RANGE, ERROR_INVALID_PARAMETER); + cmp(STATUS_INCOMPATIBLE_FILE_MAP, ERROR_INVALID_PARAMETER); + cmp(STATUS_PORT_DISCONNECTED, ERROR_INVALID_HANDLE); + cmp(STATUS_NOT_LOCKED, ERROR_NOT_LOCKED); + cmp(STATUS_NOT_MAPPED_VIEW, ERROR_INVALID_ADDRESS); + cmp(STATUS_UNABLE_TO_FREE_VM, ERROR_INVALID_PARAMETER); + cmp(STATUS_UNABLE_TO_DELETE_SECTION, ERROR_INVALID_PARAMETER); + cmp(STATUS_MORE_PROCESSING_REQUIRED, ERROR_MORE_DATA); + cmp(STATUS_INVALID_CID, ERROR_INVALID_PARAMETER); + cmp(STATUS_STACK_OVERFLOW, ERROR_STACK_OVERFLOW); + cmp(STATUS_BAD_INITIAL_STACK, ERROR_STACK_OVERFLOW); + cmp(STATUS_INVALID_VOLUME_LABEL, ERROR_LABEL_TOO_LONG); + cmp(STATUS_SECTION_NOT_EXTENDED, ERROR_OUTOFMEMORY); + cmp(STATUS_NOT_MAPPED_DATA, ERROR_INVALID_ADDRESS); + cmp2(STATUS_NO_LDT, ERROR_INVALID_THREAD_ID); + cmp(STATUS_INFO_LENGTH_MISMATCH, ERROR_BAD_LENGTH); + cmp(STATUS_INVALID_INFO_CLASS, ERROR_INVALID_PARAMETER); + cmp(STATUS_SUSPEND_COUNT_EXCEEDED, ERROR_SIGNAL_REFUSED); + cmp(STATUS_NOTIFY_ENUM_DIR, ERROR_NOTIFY_ENUM_DIR); + cmp(STATUS_REGISTRY_RECOVERED, ERROR_REGISTRY_RECOVERED); + cmp(STATUS_REGISTRY_IO_FAILED, ERROR_REGISTRY_IO_FAILED); + cmp(STATUS_NOT_REGISTRY_FILE, ERROR_NOT_REGISTRY_FILE); + cmp(STATUS_KEY_DELETED, ERROR_KEY_DELETED); + cmp(STATUS_NO_LOG_SPACE, ERROR_NO_LOG_SPACE); + cmp(STATUS_KEY_HAS_CHILDREN, ERROR_KEY_HAS_CHILDREN); + cmp(STATUS_CHILD_MUST_BE_VOLATILE, ERROR_CHILD_MUST_BE_VOLATILE); + cmp(STATUS_REGISTRY_CORRUPT, ERROR_BADDB); + cmp(STATUS_DLL_NOT_FOUND, ERROR_MOD_NOT_FOUND); + cmp(STATUS_DLL_INIT_FAILED, ERROR_DLL_INIT_FAILED); + cmp2(STATUS_INVALID_IMPORT_OF_NON_DLL, ERROR_INVALID_IMPORT_OF_NON_DLL); + cmp(STATUS_ORDINAL_NOT_FOUND, ERROR_INVALID_ORDINAL); + cmp(STATUS_DRIVER_ORDINAL_NOT_FOUND, ERROR_INVALID_ORDINAL); + cmp2(STATUS_DRIVER_UNABLE_TO_LOAD, ERROR_BAD_DRIVER); + cmp(STATUS_ENTRYPOINT_NOT_FOUND, ERROR_PROC_NOT_FOUND); + cmp(STATUS_DRIVER_ENTRYPOINT_NOT_FOUND, ERROR_PROC_NOT_FOUND); + cmp(STATUS_PENDING, ERROR_IO_PENDING); + cmp(STATUS_MORE_ENTRIES, ERROR_MORE_DATA); + cmp(STATUS_INTEGER_OVERFLOW, ERROR_ARITHMETIC_OVERFLOW); + cmp(STATUS_BUFFER_OVERFLOW, ERROR_MORE_DATA); + cmp(STATUS_NO_MORE_FILES, ERROR_NO_MORE_FILES); + cmp(STATUS_NO_INHERITANCE, ERROR_NO_INHERITANCE); + cmp(STATUS_NO_MORE_EAS, ERROR_NO_MORE_ITEMS); + cmp(STATUS_NO_MORE_ENTRIES, ERROR_NO_MORE_ITEMS); + cmp(STATUS_GUIDS_EXHAUSTED, ERROR_NO_MORE_ITEMS); + cmp(STATUS_AGENTS_EXHAUSTED, ERROR_NO_MORE_ITEMS); + cmp(STATUS_UNSUCCESSFUL, ERROR_GEN_FAILURE); + cmp(STATUS_TOO_MANY_LINKS, ERROR_TOO_MANY_LINKS); + cmp(STATUS_NOT_IMPLEMENTED, ERROR_INVALID_FUNCTION); + cmp(STATUS_ILLEGAL_FUNCTION, ERROR_INVALID_FUNCTION); + cmp(STATUS_IN_PAGE_ERROR, ERROR_SWAPERROR); + cmp(STATUS_PAGEFILE_QUOTA, ERROR_PAGEFILE_QUOTA); + cmp(STATUS_COMMITMENT_LIMIT, ERROR_COMMITMENT_LIMIT); + cmp(STATUS_SECTION_TOO_BIG, ERROR_NOT_ENOUGH_MEMORY); + cmp(RPC_NT_SS_IN_NULL_CONTEXT, ERROR_INVALID_HANDLE); + cmp(RPC_NT_INVALID_BINDING, ERROR_INVALID_HANDLE); + cmp(STATUS_INVALID_HANDLE, ERROR_INVALID_HANDLE); + cmp(STATUS_OBJECT_TYPE_MISMATCH, ERROR_INVALID_HANDLE); + cmp(STATUS_FILE_CLOSED, ERROR_INVALID_HANDLE); + cmp(STATUS_INVALID_PORT_HANDLE, ERROR_INVALID_HANDLE); + cmp(STATUS_HANDLE_NOT_CLOSABLE, ERROR_INVALID_HANDLE); + cmp(STATUS_NOT_COMMITTED, ERROR_INVALID_ADDRESS); + cmp(STATUS_PARTIAL_COPY, ERROR_PARTIAL_COPY); + cmp(STATUS_LPC_REPLY_LOST, ERROR_INTERNAL_ERROR); + cmp(STATUS_INVALID_PARAMETER, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_1, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_2, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_3, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_4, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_5, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_6, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_7, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_8, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_9, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_10, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_11, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_12, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PARAMETER_MIX, ERROR_INVALID_PARAMETER); + cmp(STATUS_INVALID_PAGE_PROTECTION, ERROR_INVALID_PARAMETER); + cmp(STATUS_SECTION_PROTECTION, ERROR_INVALID_PARAMETER); + cmp(STATUS_RESOURCE_DATA_NOT_FOUND, ERROR_RESOURCE_DATA_NOT_FOUND); + cmp(STATUS_RESOURCE_TYPE_NOT_FOUND, ERROR_RESOURCE_TYPE_NOT_FOUND); + cmp(STATUS_RESOURCE_NAME_NOT_FOUND, ERROR_RESOURCE_NAME_NOT_FOUND); + cmp(STATUS_RESOURCE_LANG_NOT_FOUND, ERROR_RESOURCE_LANG_NOT_FOUND); + cmp(STATUS_NO_SUCH_DEVICE, ERROR_FILE_NOT_FOUND); + cmp(STATUS_NO_SUCH_FILE, ERROR_FILE_NOT_FOUND); + cmp(STATUS_INVALID_DEVICE_REQUEST, ERROR_INVALID_FUNCTION); + cmp2(STATUS_VOLUME_NOT_UPGRADED, ERROR_INVALID_FUNCTION); + cmp(STATUS_END_OF_FILE, ERROR_HANDLE_EOF); + cmp(STATUS_FILE_FORCED_CLOSED, ERROR_HANDLE_EOF); + cmp(STATUS_WRONG_VOLUME, ERROR_WRONG_DISK); + cmp(STATUS_NO_MEDIA, ERROR_NO_MEDIA_IN_DRIVE); + cmp(STATUS_NO_MEDIA_IN_DEVICE, ERROR_NOT_READY); + cmp(STATUS_VOLUME_DISMOUNTED, ERROR_NOT_READY); + cmp(STATUS_NONEXISTENT_SECTOR, ERROR_SECTOR_NOT_FOUND); + cmp(STATUS_WORKING_SET_QUOTA, ERROR_WORKING_SET_QUOTA); + cmp(STATUS_NO_MEMORY, ERROR_NOT_ENOUGH_MEMORY); + cmp(STATUS_CONFLICTING_ADDRESSES, ERROR_INVALID_ADDRESS); + cmp(STATUS_INVALID_SYSTEM_SERVICE, ERROR_INVALID_FUNCTION); + cmp(STATUS_THREAD_IS_TERMINATING, ERROR_ACCESS_DENIED); + cmp(STATUS_PROCESS_IS_TERMINATING, ERROR_ACCESS_DENIED); + cmp(STATUS_INVALID_LOCK_SEQUENCE, ERROR_ACCESS_DENIED); + cmp(STATUS_INVALID_VIEW_SIZE, ERROR_ACCESS_DENIED); + cmp(STATUS_ALREADY_COMMITTED, ERROR_ACCESS_DENIED); + cmp(STATUS_ACCESS_DENIED, ERROR_ACCESS_DENIED); + cmp(STATUS_FILE_IS_A_DIRECTORY, ERROR_ACCESS_DENIED); + cmp(STATUS_CANNOT_DELETE, ERROR_ACCESS_DENIED); + cmp(STATUS_INVALID_COMPUTER_NAME, ERROR_INVALID_COMPUTERNAME); + cmp(STATUS_FILE_DELETED, ERROR_ACCESS_DENIED); + cmp2(STATUS_FILE_RENAMED, ERROR_ACCESS_DENIED); + cmp(STATUS_DELETE_PENDING, ERROR_ACCESS_DENIED); + cmp(STATUS_PORT_CONNECTION_REFUSED, ERROR_ACCESS_DENIED); + cmp(STATUS_NO_SUCH_PRIVILEGE, ERROR_NO_SUCH_PRIVILEGE); + cmp(STATUS_PRIVILEGE_NOT_HELD, ERROR_PRIVILEGE_NOT_HELD); + cmp(STATUS_CANNOT_IMPERSONATE, ERROR_CANNOT_IMPERSONATE); + cmp(STATUS_LOGON_FAILURE, ERROR_LOGON_FAILURE); + cmp2(STATUS_MUTUAL_AUTHENTICATION_FAILED, ERROR_MUTUAL_AUTH_FAILED); + cmp2(STATUS_TIME_DIFFERENCE_AT_DC, ERROR_TIME_SKEW); + cmp2(STATUS_PKINIT_FAILURE, ERROR_PKINIT_FAILURE); + cmp2(STATUS_SMARTCARD_SUBSYSTEM_FAILURE, ERROR_SMARTCARD_SUBSYSTEM_FAILURE); + cmp2(STATUS_DOWNGRADE_DETECTED, ERROR_DOWNGRADE_DETECTED); + cmp2(STATUS_SMARTCARD_CERT_REVOKED, SEC_E_SMARTCARD_CERT_REVOKED); + cmp2(STATUS_ISSUING_CA_UNTRUSTED, SEC_E_ISSUING_CA_UNTRUSTED); + cmp2(STATUS_REVOCATION_OFFLINE_C, SEC_E_REVOCATION_OFFLINE_C); + cmp2(STATUS_PKINIT_CLIENT_FAILURE, SEC_E_PKINIT_CLIENT_FAILURE); + cmp2(STATUS_SMARTCARD_CERT_EXPIRED, SEC_E_SMARTCARD_CERT_EXPIRED); + cmp2(STATUS_NO_KERB_KEY, SEC_E_NO_KERB_KEY); + cmp2(STATUS_CURRENT_DOMAIN_NOT_ALLOWED, ERROR_CURRENT_DOMAIN_NOT_ALLOWED); + cmp2(STATUS_SMARTCARD_WRONG_PIN, SCARD_W_WRONG_CHV); + cmp2(STATUS_SMARTCARD_CARD_BLOCKED, SCARD_W_CHV_BLOCKED); + cmp2(STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED,SCARD_W_CARD_NOT_AUTHENTICA TED); + cmp2(STATUS_SMARTCARD_NO_CARD, SCARD_E_NO_SMARTCARD); + cmp2(STATUS_SMARTCARD_NO_KEY_CONTAINER, NTE_NO_KEY); + cmp2(STATUS_SMARTCARD_NO_CERTIFICATE, SCARD_E_NO_SUCH_CERTIFICATE); + cmp2(STATUS_SMARTCARD_NO_KEYSET, NTE_BAD_KEYSET); + cmp2(STATUS_SMARTCARD_IO_ERROR, SCARD_E_COMM_DATA_LOST); + cmp(STATUS_ACCOUNT_RESTRICTION, ERROR_ACCOUNT_RESTRICTION); + cmp(STATUS_INVALID_LOGON_HOURS, ERROR_INVALID_LOGON_HOURS); + cmp(STATUS_INVALID_WORKSTATION, ERROR_INVALID_WORKSTATION); + cmp(STATUS_BUFFER_TOO_SMALL, ERROR_INSUFFICIENT_BUFFER); + cmp(STATUS_UNABLE_TO_DECOMMIT_VM, ERROR_INVALID_ADDRESS); + cmp(STATUS_DISK_CORRUPT_ERROR, ERROR_DISK_CORRUPT); + cmp(STATUS_FT_MISSING_MEMBER, ERROR_IO_DEVICE); + cmp(STATUS_FT_ORPHANING, ERROR_IO_DEVICE); + cmp(STATUS_VARIABLE_NOT_FOUND, ERROR_ENVVAR_NOT_FOUND); + cmp(STATUS_OBJECT_NAME_INVALID, ERROR_INVALID_NAME); + cmp(STATUS_OBJECT_NAME_NOT_FOUND, ERROR_FILE_NOT_FOUND); [truncated at 1000 lines; 9790 more skipped]
19 years, 4 months
1
0
0
0
[ros-diffs] [sedwards] 17132: updated winternl.h, PSDK fixes, etc...
by sedwards@svn.reactos.com
updated winternl.h, PSDK fixes, etc... Modified: trunk/reactos/boot/freeldr/freeldr/include/rtl.h Modified: trunk/reactos/lib/crt/except/unwind.c Modified: trunk/reactos/w32api/include/winbase.h Modified: trunk/reactos/w32api/include/winnt.h Modified: trunk/reactos/w32api/include/winternl.h _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/rtl.h --- trunk/reactos/boot/freeldr/freeldr/include/rtl.h 2005-08-07 00:26:13 UTC (rev 17131) +++ trunk/reactos/boot/freeldr/freeldr/include/rtl.h 2005-08-07 01:23:40 UTC (rev 17132) @@ -33,9 +33,6 @@ void * memset(void *src, int val, size_t count); #define RtlCompareMemory(Source1, Source2, Length) memcmp(Source1, Source2, Length) -#define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length) -#define RtlFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length) -#define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length) //////////////////////////////////////////////////////////////////////// /////////////// // _____ Modified: trunk/reactos/lib/crt/except/unwind.c --- trunk/reactos/lib/crt/except/unwind.c 2005-08-07 00:26:13 UTC (rev 17131) +++ trunk/reactos/lib/crt/except/unwind.c 2005-08-07 01:23:40 UTC (rev 17132) @@ -1,5 +1,4 @@ #include "precomp.h" -#include <excpt.h> #include <winternl.h> /* _____ Modified: trunk/reactos/w32api/include/winbase.h --- trunk/reactos/w32api/include/winbase.h 2005-08-07 00:26:13 UTC (rev 17131) +++ trunk/reactos/w32api/include/winbase.h 2005-08-07 01:23:40 UTC (rev 17132) @@ -518,10 +518,13 @@ #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 #ifndef RC_INVOKED +#ifndef _FILETIME_ +#define _FILETIME_ typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME,*PFILETIME,*LPFILETIME; +#endif typedef struct _BY_HANDLE_FILE_INFORMATION { DWORD dwFileAttributes; FILETIME ftCreationTime; @@ -1104,10 +1107,6 @@ BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL); BOOL WINAPI CopyFileExA(LPCSTR,LPCSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD); BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD); -#define RtlMoveMemory memmove -#define RtlCopyMemory memcpy -#define RtlFillMemory(d,l,f) memset((d), (f), (l)) -#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) #define MoveMemory RtlMoveMemory #define CopyMemory RtlCopyMemory #define FillMemory RtlFillMemory _____ Modified: trunk/reactos/w32api/include/winnt.h --- trunk/reactos/w32api/include/winnt.h 2005-08-07 00:26:13 UTC (rev 17131) +++ trunk/reactos/w32api/include/winnt.h 2005-08-07 01:23:40 UTC (rev 17132) @@ -262,14 +262,6 @@ #define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 #define FILE_VALID_SET_FLAGS 0x00000036 -#define FILE_SUPERSEDE 0x00000000 -#define FILE_OPEN 0x00000001 -#define FILE_CREATE 0x00000002 -#define FILE_OPEN_IF 0x00000003 -#define FILE_OVERWRITE 0x00000004 -#define FILE_OVERWRITE_IF 0x00000005 -#define FILE_MAXIMUM_DISPOSITION 0x00000005 - #define FILE_DIRECTORY_FILE 0x00000001 #define FILE_WRITE_THROUGH 0x00000002 #define FILE_SEQUENTIAL_ONLY 0x00000004 @@ -3495,6 +3487,11 @@ SIZE_T Length ); +#define RtlMoveMemory memmove +#define RtlCopyMemory memcpy +#define RtlFillMemory(d,l,f) memset((d), (f), (l)) +#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) + #if defined(__GNUC__) static __inline__ PVOID GetCurrentFiber(void) _____ Modified: trunk/reactos/w32api/include/winternl.h --- trunk/reactos/w32api/include/winternl.h 2005-08-07 00:26:13 UTC (rev 17131) +++ trunk/reactos/w32api/include/winternl.h 2005-08-07 01:23:40 UTC (rev 17132) @@ -18,11 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_WINTERNAL_H -#define __WINE_WINTERNAL_H +#ifndef __WINE_WINTERNL_H +#define __WINE_WINTERNL_H #include <windef.h> -#include <wine/winnt.h> #ifdef __cplusplus extern "C" { @@ -33,7 +32,7 @@ * Fundamental types and data structures */ -typedef LONG NTSTATUS, *PNTSTATUS; +typedef LONG NTSTATUS; typedef CONST char *PCSZ; @@ -62,6 +61,50 @@ typedef const UNICODE_STRING *PCUNICODE_STRING; +#ifndef _FILETIME_ +#define _FILETIME_ +/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */ +typedef struct _FILETIME +{ +#ifdef WORDS_BIGENDIAN + DWORD dwHighDateTime; + DWORD dwLowDateTime; +#else + DWORD dwLowDateTime; + DWORD dwHighDateTime; +#endif +} FILETIME, *PFILETIME, *LPFILETIME; +#endif /* _FILETIME_ */ + +/* + * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as + * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined + * in winbase.h, however we need to define them seperately so + * winternl.h doesn't depend on winbase.h. They are used by + * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation. + * The names are guessed; if anybody knows the real names, let me know. + */ +typedef struct _RTL_SYSTEM_TIME { + WORD wYear; + WORD wMonth; + WORD wDayOfWeek; + WORD wDay; + WORD wHour; + WORD wMinute; + WORD wSecond; + WORD wMilliseconds; +} RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME; + +typedef struct _RTL_TIME_ZONE_INFORMATION { + LONG Bias; + WCHAR StandardName[32]; + RTL_SYSTEM_TIME StandardDate; + LONG StandardBias; + WCHAR DaylightName[32]; + RTL_SYSTEM_TIME DaylightDate; + LONG DaylightBias; +} RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION; + typedef struct _CLIENT_ID { HANDLE UniqueProcess; @@ -84,14 +127,14 @@ typedef struct tagRTL_BITMAP { ULONG SizeOfBitMap; /* Number of bits in the bitmap */ - LPBYTE BitMapBuffer; /* Bitmap data, assumed sized to a DWORD boundary */ + PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */ } RTL_BITMAP, *PRTL_BITMAP; typedef const RTL_BITMAP *PCRTL_BITMAP; typedef struct tagRTL_BITMAP_RUN { - ULONG StartOfRun; /* Bit position at which run starts - FIXME: Name? */ - ULONG SizeOfRun; /* Size of the run in bits - FIXME: Name? */ + ULONG StartingIndex; /* Bit position at which run starts */ + ULONG NumberOfBits; /* Size of the run in bits */ } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN; typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN; @@ -102,13 +145,12 @@ ULONG Size; ULONG Flags; ULONG DebugFlags; - HANDLE hConsole; - ULONG ProcessGroup; + HANDLE ConsoleHandle; + ULONG ConsoleFlags; HANDLE hStdInput; HANDLE hStdOutput; HANDLE hStdError; - UNICODE_STRING CurrentDirectoryName; - HANDLE CurrentDirectoryHandle; + CURDIR CurrentDirectory; UNICODE_STRING DllPath; UNICODE_STRING ImagePathName; UNICODE_STRING CommandLine; @@ -142,37 +184,79 @@ LIST_ENTRY InInitializationOrderModuleList; } PEB_LDR_DATA, *PPEB_LDR_DATA; +typedef struct _GDI_TEB_BATCH +{ + ULONG Offset; + HANDLE HDC; + ULONG Buffer[0x136]; +} GDI_TEB_BATCH; + /*********************************************************************** * PEB data structure */ typedef struct _PEB { - BYTE Reserved1[2]; /* 00 */ - BYTE BeingDebugged; /* 02 */ - BYTE Reserved2[5]; /* 03 */ - HMODULE ImageBaseAddress; /* 08 */ - PPEB_LDR_DATA LdrData; /* 0c */ - RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */ - PVOID __pad_14; /* 14 */ - HANDLE ProcessHeap; /* 18 */ - BYTE __pad_1c[36]; /* 1c */ - PRTL_BITMAP TlsBitmap; /* 40 */ - ULONG TlsBitmapBits[2]; /* 44 */ - BYTE __pad_4c[104]; /* 4c */ - ULONG ImageSubSystem; /* b4 */ - BYTE __pad_b8[48]; /* b8 */ - PVOID Reserved3[59]; /* e8 */ - ULONG SessionId; /* 1d4 */ + BOOLEAN InheritedAddressSpace; /* 00 */ + BOOLEAN ReadImageFileExecOptions; /* 01 */ + BOOLEAN BeingDebugged; /* 02 */ + BOOLEAN SpareBool; /* 03 */ + HANDLE Mutant; /* 04 */ + HMODULE ImageBaseAddress; /* 08 */ + PPEB_LDR_DATA LdrData; /* 0c */ + RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */ + PVOID SubSystemData; /* 14 */ + HANDLE ProcessHeap; /* 18 */ + PRTL_CRITICAL_SECTION FastPebLock; /* 1c */ + PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 20 */ + PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 24 */ + ULONG EnvironmentUpdateCount; /* 28 */ + PVOID KernelCallbackTable; /* 2c */ + PVOID EventLogSection; /* 30 */ + PVOID EventLog; /* 34 */ + PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 38 */ + ULONG TlsExpansionCounter; /* 3c */ + PRTL_BITMAP TlsBitmap; /* 40 */ + ULONG TlsBitmapBits[2]; /* 44 */ + PVOID ReadOnlySharedMemoryBase; /* 4c */ + PVOID ReadOnlySharedMemoryHeap; /* 50 */ + PVOID *ReadOnlyStaticServerData; /* 54 */ + PVOID AnsiCodePageData; /* 58 */ + PVOID OemCodePageData; /* 5c */ + PVOID UnicodeCaseTableData; /* 60 */ + ULONG NumberOfProcessors; /* 64 */ + ULONG NtGlobalFlag; /* 68 */ + BYTE Spare2[4]; /* 6c */ + LARGE_INTEGER CriticalSectionTimeout; /* 70 */ + ULONG HeapSegmentReserve; /* 78 */ + ULONG HeapSegmentCommit; /* 7c */ + ULONG HeapDeCommitTotalFreeThreshold; /* 80 */ + ULONG HeapDeCommitFreeBlockThreshold; /* 84 */ + ULONG NumberOfHeaps; /* 88 */ + ULONG MaximumNumberOfHeaps; /* 8c */ + PVOID *ProcessHeaps; /* 90 */ + PVOID GdiSharedHandleTable; /* 94 */ + PVOID ProcessStarterHelper; /* 98 */ + PVOID GdiDCAttributeList; /* 9c */ + PVOID LoaderLock; /* a0 */ + ULONG OSMajorVersion; /* a4 */ + ULONG OSMinorVersion; /* a8 */ + ULONG OSBuildNumber; /* ac */ + ULONG OSPlatformId; /* b0 */ + ULONG ImageSubSystem; /* b4 */ + ULONG ImageSubSystemMajorVersion; /* b8 */ + ULONG ImageSubSystemMinorVersion; /* bc */ + ULONG ImageProcessAffinityMask; /* c0 */ + ULONG GdiHandleBuffer[34]; /* c4 */ + ULONG PostProcessInitRoutine; /* 14c */ + PRTL_BITMAP TlsExpansionBitmap; /* 150 */ + ULONG TlsExpansionBitmapBits[32]; /* 154 */ + ULONG SessionId; /* 1d4 */ } PEB, *PPEB; /*********************************************************************** * TEB data structure */ -#if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */ -# define WINE_NO_TEB -#endif - #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */ # ifndef WINE_TEB_DEFINED # define WINE_TEB_DEFINED @@ -185,19 +269,56 @@ PVOID ThreadLocalStoragePointer; /* 02c */ PPEB Peb; /* 030 */ ULONG LastErrorValue; /* 034 */ - BYTE __pad038[140]; /* 038 */ + ULONG CountOfOwnedCriticalSections;/* 038 */ + PVOID CsrClientThread; /* 03c */ + PVOID Win32ThreadInfo; /* 040 */ + ULONG Win32ClientInfo[31]; /* 044 used for user32 private data in Wine */ + PVOID WOW32Reserved; /* 0c0 */ ULONG CurrentLocale; /* 0c4 */ - BYTE __pad0c8[1752]; /* 0c8 */ - PVOID Reserved2[278]; /* 7a0 */ + ULONG FpSoftwareStatusRegister; /* 0c8 */ + PVOID SystemReserved1[54]; /* 0cc used for kernel32 private data in Wine */ + PVOID Spare1; /* 1a4 */ + LONG ExceptionCode; /* 1a8 */ + BYTE SpareBytes1[40]; /* 1ac */ + PVOID SystemReserved2[10]; /* 1d4 used for ntdll private data in Wine */ + GDI_TEB_BATCH GdiTebBatch; /* 1fc */ + ULONG gdiRgn; /* 6dc */ + ULONG gdiPen; /* 6e0 */ + ULONG gdiBrush; /* 6e4 */ + CLIENT_ID RealClientId; /* 6e8 */ + HANDLE GdiCachedProcessHandle; /* 6f0 */ + ULONG GdiClientPID; /* 6f4 */ + ULONG GdiClientTID; /* 6f8 */ + PVOID GdiThreadLocaleInfo; /* 6fc */ + PVOID UserReserved[5]; /* 700 */ + PVOID glDispachTable[280]; /* 714 */ + ULONG glReserved1[26]; /* b74 */ + PVOID glReserved2; /* bdc */ + PVOID glSectionInfo; /* be0 */ + PVOID glSection; /* be4 */ + PVOID glTable; /* be8 */ + PVOID glCurrentRC; /* bec */ + PVOID glContext; /* bf0 */ + ULONG LastStatusValue; /* bf4 */ UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */ WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */ PVOID DeallocationStack; /* e0c */ PVOID TlsSlots[64]; /* e10 */ LIST_ENTRY TlsLinks; /* f10 */ - PVOID Reserved4[26]; /* f18 */ - PVOID ReservedForOle; /* f80 Windows 2000 only */ - PVOID Reserved5[4]; /* f84 */ - PVOID TlsExpansionSlots; /* f94 */ + PVOID Vdm; /* f18 */ + PVOID ReservedForNtRpc; /* f1c */ + PVOID DbgSsReserved[2]; /* f20 */ + ULONG HardErrorDisabled; /* f28 */ + PVOID Instrumentation[16]; /* f2c */ + PVOID WinSockData; /* f6c */ + ULONG GdiBatchCount; /* f70 */ + ULONG Spare2; /* f74 */ + ULONG Spare3; /* f78 */ + ULONG Spare4; /* f7c */ + PVOID ReservedForOle; /* f80 */ + ULONG WaitingOnLoaderLock; /* f84 */ + PVOID Reserved5[3]; /* f88 */ + PVOID *TlsExpansionSlots; /* f94 */ } TEB, *PTEB; # endif /* WINE_TEB_DEFINED */ #endif /* WINE_NO_TEB */ @@ -246,7 +367,54 @@ FileMaximumInformation } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; -#include <pshpack8.h> +typedef struct _FILE_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + WCHAR FileName[ANYSIZE_ARRAY]; +} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION; + +typedef struct _FILE_FULL_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + ULONG EaSize; + WCHAR FileName[ANYSIZE_ARRAY]; +} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION, + FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION; + +typedef struct _FILE_BOTH_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + ULONG EaSize; + CHAR ShortNameLength; + WCHAR ShortName[12]; + WCHAR FileName[ANYSIZE_ARRAY]; +} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION, + FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION; + typedef struct _FILE_BASIC_INFORMATION { LARGE_INTEGER CreationTime; LARGE_INTEGER LastAccessTime; @@ -254,7 +422,6 @@ LARGE_INTEGER ChangeTime; ULONG FileAttributes; } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; -#include <poppack.h> typedef struct _FILE_STANDARD_INFORMATION { LARGE_INTEGER AllocationSize; @@ -264,6 +431,41 @@ BOOLEAN Directory; } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION; +typedef struct _FILE_INTERNAL_INFORMATION { + LARGE_INTEGER IndexNumber; +} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION; + +typedef struct _FILE_EA_INFORMATION { + ULONG EaSize; +} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION; + +typedef struct _FILE_ACCESS_INFORMATION { + ACCESS_MASK AccessFlags; +} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION; + +typedef struct _FILE_NAME_INFORMATION { + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; + +typedef struct _FILE_RENAME_INFORMATION { + BOOLEAN Replace; + HANDLE RootDir; + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION; + +typedef struct _FILE_NAMES_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION; + +typedef struct _FILE_DISPOSITION_INFORMATION { + BOOLEAN DoDeleteFile; +} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; + typedef struct _FILE_POSITION_INFORMATION { LARGE_INTEGER CurrentByteOffset; } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION; @@ -272,6 +474,14 @@ ULONG AlignmentRequirement; } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION; +typedef struct _FILE_ALLOCATION_INFORMATION { + LARGE_INTEGER AllocationSize; +} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION; + +typedef struct _FILE_END_OF_FILE_INFORMATION { + LARGE_INTEGER EndOfFile; +} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; + typedef struct _FILE_NETWORK_OPEN_INFORMATION { LARGE_INTEGER CreationTime; LARGE_INTEGER LastAccessTime; @@ -290,6 +500,10 @@ CHAR EaName[1]; } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION; +typedef struct _FILE_MODE_INFORMATION { + ULONG Mode; +} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION; + typedef struct _FILE_STREAM_INFORMATION { ULONG NextEntryOffset; @@ -299,12 +513,37 @@ WCHAR StreamName[1]; } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION; -struct _FILE_ATTRIBUTE_TAG_INFORMATION +typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION { ULONG FileAttributes; ULONG ReparseTag; } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION; +typedef struct _FILE_MAILSLOT_QUERY_INFORMATION { + ULONG MaximumMessageSize; + ULONG MailslotQuota; + ULONG NextMessageSize; + ULONG MessagesAvailable; + LARGE_INTEGER ReadTimeout; +} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION; + +typedef struct _FILE_MAILSLOT_SET_INFORMATION { + LARGE_INTEGER ReadTimeout; +} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION; + +typedef struct _FILE_ALL_INFORMATION +{ + FILE_BASIC_INFORMATION BasicInformation; + FILE_STANDARD_INFORMATION StandardInformation; + FILE_INTERNAL_INFORMATION InternalInformation; + FILE_EA_INFORMATION EaInformation; + FILE_ACCESS_INFORMATION AccessInformation; + FILE_POSITION_INFORMATION PositionInformation; + FILE_MODE_INFORMATION ModeInformation; + FILE_ALIGNMENT_INFORMATION AlignmentInformation; + FILE_NAME_INFORMATION NameInformation; +} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION; + typedef enum _FSINFOCLASS { FileFsVolumeInformation = 1, FileFsLabelInformation, @@ -367,17 +606,23 @@ ProcessSessionInformation = 24, ProcessForegroundInformation = 25, ProcessWow64Information = 26, + ProcessImageFileName = 27, + ProcessLUIDDeviceMapsEnabled = 28, + ProcessBreakOnTermination = 29, + ProcessDebugObjectHandle = 30, + ProcessDebugFlags = 31, + ProcessHandleTracing = 32, MaxProcessInfoClass -} PROCESSINFOCLASS; +} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS; typedef enum _SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 } SECTION_INHERIT; -typedef enum SYSTEM_INFORMATION_CLASS { +typedef enum _SYSTEM_INFORMATION_CLASS { SystemBasicInformation = 0, - Unknown1, + SystemCpuInformation = 1, SystemPerformanceInformation = 2, SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */ Unknown4, @@ -387,22 +632,49 @@ SystemProcessorPerformanceInformation = 8, Unknown9, Unknown10, - SystemDriverInformation, + SystemModuleInformation = 11, Unknown12, Unknown13, Unknown14, Unknown15, - SystemHandleList, + SystemHandleInformation = 16, Unknown17, - Unknown18, + SystemPageFileInformation = 18, Unknown19, Unknown20, - SystemCacheInformation, + SystemCacheInformation = 21, Unknown22, SystemInterruptInformation = 23, + SystemDpcBehaviourInformation = 24, + SystemFullMemoryInformation = 25, + SystemNotImplemented6 = 25, + SystemLoadImage = 26, + SystemUnloadImage = 27, + SystemTimeAdjustmentInformation = 28, + SystemTimeAdjustment = 28, + SystemSummaryMemoryInformation = 29, + SystemNotImplemented7 = 29, + SystemNextEventIdInformation = 30, + SystemNotImplemented8 = 30, + SystemEventIdsInformation = 31, + SystemCrashDumpInformation = 32, SystemExceptionInformation = 33, + SystemCrashDumpStateInformation = 34, + SystemKernelDebuggerInformation = 35, + SystemContextSwitchInformation = 36, SystemRegistryQuotaInformation = 37, - SystemLookasideInformation = 45 + SystemCurrentTimeZoneInformation = 44, + SystemTimeZoneInformation = 44, + SystemLookasideInformation = 45, + SystemSetTimeSlipEvent = 46, + SystemCreateSession = 47, + SystemDeleteSession = 48, + SystemInvalidInfoClass4 = 49, + SystemRangeStartInformation = 50, + SystemVerifierInformation = 51, + SystemAddVerifier = 52, + SystemSessionProcessesInformation = 53, + SystemInformationClassMax } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS; typedef enum _TIMER_TYPE { @@ -441,16 +713,47 @@ LONG BasePriority; } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION; +typedef struct _KERNEL_USER_TIMES { + LARGE_INTEGER CreateTime; + LARGE_INTEGER ExitTime; + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; +} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES; typedef enum _WINSTATIONINFOCLASS { WinStationInformation = 8 } WINSTATIONINFOCLASS; -typedef enum -{ - MemoryBasicInformation = 0 +typedef enum _MEMORY_INFORMATION_CLASS { + MemoryBasicInformation, + MemoryWorkingSetList, + MemorySectionName, + MemoryBasicVlmInformation } MEMORY_INFORMATION_CLASS; +typedef enum _MUTANT_INFORMATION_CLASS +{ + MutantBasicInformation +} MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS; + +typedef struct _MUTANT_BASIC_INFORMATION { + LONG CurrentCount; + BOOLEAN OwnedByCaller; + BOOLEAN AbandonedState; +} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION; + +typedef enum _TIMER_INFORMATION_CLASS +{ + TimerBasicInformation = 0 +} TIMER_INFORMATION_CLASS; + +typedef struct _TIMER_BASIC_INFORMATION +{ + LARGE_INTEGER RemainingTime; + BOOLEAN TimerState; +} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION; + + /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */ typedef enum { @@ -504,8 +807,7 @@ */ /* This is used by NtQuerySystemInformation */ -/* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */ -typedef struct { +typedef struct _SYSTEM_THREAD_INFORMATION{ FILETIME ftKernelTime; FILETIME ftUserTime; FILETIME ftCreateTime; @@ -518,22 +820,9 @@ DWORD dwContextSwitches; DWORD dwThreadState; DWORD dwWaitReason; -} THREADINFO, *PTHREADINFO; + DWORD dwUnknown; +} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION; -/* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */ -typedef struct _THREAD_INFO{ - DWORD Unknown1[6]; - DWORD ThreadID; - DWORD Unknown2[3]; - DWORD Status; - DWORD WaitReason; - DWORD Unknown3[4]; -} THREAD_INFO, PTHREAD_INFO; - -/********************************************************************** * - * Types and data structures - */ - typedef struct _IO_STATUS_BLOCK { union { NTSTATUS Status; @@ -640,34 +929,6 @@ #endif } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; -typedef struct _PROCESS_INFO { - DWORD Offset; /* 00 offset to next PROCESS_INFO ok*/ - DWORD ThreadCount; /* 04 number of ThreadInfo member ok */ - DWORD Unknown1[6]; - FILETIME CreationTime; /* 20 */ - DWORD Unknown2[5]; - PWCHAR ProcessName; /* 3c ok */ - DWORD BasePriority; - DWORD ProcessID; /* 44 ok*/ - DWORD ParentProcessID; - DWORD HandleCount; - DWORD Unknown3[2]; /* 50 */ - ULONG PeakVirtualSize; - ULONG VirtualSize; - ULONG PageFaultCount; - ULONG PeakWorkingSetSize; - ULONG WorkingSetSize; - ULONG QuotaPeakPagedPoolUsage; - ULONG QuotaPagedPoolUsage; - ULONG QuotaPeakNonPagedPoolUsage; - ULONG QuotaNonPagedPoolUsage; - ULONG PagefileUsage; - ULONG PeakPagefileUsage; - DWORD PrivateBytes; - DWORD Unknown6[4]; - THREAD_INFO ati[ANYSIZE_ARRAY]; /* 94 size=0x40*/ -} PROCESS_INFO, PPROCESS_INFO; - typedef struct _RTL_HEAP_DEFINITION { ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */ @@ -690,6 +951,7 @@ } RTL_RWLOCK, *LPRTL_RWLOCK; /* System Information Class 0x00 */ + typedef struct _SYSTEM_BASIC_INFORMATION { #ifdef __WINESRC__ DWORD dwUnknown1; @@ -712,16 +974,117 @@ #endif } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION; +/* System Information Class 0x01 */ + +typedef struct _SYSTEM_CPU_INFORMATION { + WORD Architecture; + WORD Level; + WORD Revision; /* combination of CPU model and stepping */ + WORD Reserved; /* always zero */ + DWORD FeatureSet; /* see bit flags below */ +} SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION; + +/* definitions of bits in the Feature set for the x86 processors */ +#define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */ +#define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */ +#define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/ +#define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */ +#define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */ +#define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */ +#define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */ +#define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */ +#define CPU_FEATURE_X86 0x00000200 /* seems to be alway ON, on the '86 */ +#define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */ +#define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */ +#define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */ +#define CPU_FEATURE_SSE 0x00002000 /* SSE extenstions (ext. MMX) */ +#define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available + (FIXME: needs to be confirmed) */ +#define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */ +#define CPU_FEATURE_DS 0x00020000 /* Debug Store */ +#define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */ + +/* System Information Class 0x02 */ + +typedef struct _SYSTEM_PERFORMANCE_INFORMATION { + BYTE Reserved1[312]; +} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; + +/* System Information Class 0x03 */ + +typedef struct _SYSTEM_TIMEOFDAY_INFORMATION { +#ifdef __WINESRC__ + LARGE_INTEGER liKeBootTime; + LARGE_INTEGER liKeSystemTime; + LARGE_INTEGER liExpTimeZoneBias; + ULONG uCurrentTimeZoneId; + DWORD dwUnknown1[5]; +#else + BYTE Reserved1[48]; +#endif +} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */ + +/* System Information Class 0x08 */ + +typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { +#ifdef __WINESRC__ + LARGE_INTEGER liIdleTime; + LARGE_INTEGER liKernelTime; + LARGE_INTEGER liUserTime; + DWORD dwSpare[5]; +#else + LARGE_INTEGER IdleTime; + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER Reserved1[2]; + ULONG Reserved2; +#endif +} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; + +/* System Information Class 0x0b */ + +typedef struct _SYSTEM_DRIVER_INFORMATION { + PVOID pvAddress; + DWORD dwUnknown1; + DWORD dwUnknown2; + DWORD dwEntryIndex; + DWORD dwUnknown3; + char szName[MAX_PATH + 1]; +} SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION; + +/* System Information Class 0x10 */ + +typedef struct _SYSTEM_HANDLE_ENTRY { + ULONG OwnerPid; + BYTE ObjectType; + BYTE HandleFlags; + USHORT HandleValue; + PVOID ObjectPointer; + ULONG AccessMask; +} SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY; + +typedef struct _SYSTEM_HANDLE_INFORMATION { + ULONG Count; + SYSTEM_HANDLE_ENTRY Handle[1]; +} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION; + /* System Information Class 0x15 */ -typedef struct { + +typedef struct _SYSTEM_CACHE_INFORMATION { ULONG CurrentSize; ULONG PeakSize; ULONG PageFaultCount; ULONG MinimumWorkingSet; ULONG MaximumWorkingSet; ULONG unused[4]; -} SYSTEM_CACHE_INFORMATION; +} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION; +/* System Information Class 0x17 */ + +typedef struct _SYSTEM_INTERRUPT_INFORMATION { + BYTE Reserved1[24]; +} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION; + typedef struct _SYSTEM_CONFIGURATION_INFO { union { ULONG OemId; @@ -741,16 +1104,6 @@ WORD ProcessorRevision; } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO; -/* System Information Class 0x0b */ -typedef struct { - PVOID pvAddress; - DWORD dwUnknown1; - DWORD dwUnknown2; - DWORD dwEntryIndex; - DWORD dwUnknown3; - char szName[MAX_PATH + 1]; -} SYSTEM_DRIVER_INFORMATION; - typedef struct _SYSTEM_EXCEPTION_INFORMATION { BYTE Reserved1[16]; } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION; @@ -759,68 +1112,45 @@ BYTE Reserved1[32]; } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION; -typedef struct _SYSTEM_INTERRUPT_INFORMATION { - BYTE Reserved1[24]; -} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION; +typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION { + BOOLEAN DebuggerEnabled; + BOOLEAN DebuggerNotPresent; +} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION; -/* System Information Class 0x10 */ -typedef struct { - USHORT dwPID; - USHORT dwCreatorBackTraceIndex; - BYTE bObjectType; - BYTE bHandleAttributes; - USHORT usHandleOffset; - DWORD dwKeObject; - ULONG ulGrantedAccess; -} HANDLEINFO, *PHANDLEINFO; /* FIXME: SYSTEM_HANDLE_INFORMATION? */ +/* System Information Class 0x05 */ -typedef struct _SYSTEM_PERFORMANCE_INFORMATION { - BYTE Reserved1[312]; -} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; +typedef struct _VM_COUNTERS_ { + SIZE_T PeakVirtualSize; + SIZE_T VirtualSize; + ULONG PageFaultCount; + SIZE_T PeakWorkingSetSize; + SIZE_T WorkingSetSize; + SIZE_T QuotaPeakPagedPoolUsage; + SIZE_T QuotaPagedPoolUsage; + SIZE_T QuotaPeakNonPagedPoolUsage; + SIZE_T QuotaNonPagedPoolUsage; + SIZE_T PagefileUsage; + SIZE_T PeakPagefileUsage; +} VM_COUNTERS, *PVM_COUNTERS; -/* System Information Class 0x02 */ -typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { -#ifdef __WINESRC__ - LARGE_INTEGER liIdleTime; - DWORD dwSpare[10]; -#else - LARGE_INTEGER IdleTime; - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER Reserved1[2]; - ULONG Reserved2; -#endif -} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; - -/* System Information Class 0x05 */ typedef struct _SYSTEM_PROCESS_INFORMATION { #ifdef __WINESRC__ DWORD dwOffset; DWORD dwThreadCount; DWORD dwUnknown1[6]; FILETIME ftCreationTime; - DWORD dwUnknown2[5]; - WCHAR *pszProcessName; + FILETIME ftUserTime; + FILETIME ftKernelTime; + UNICODE_STRING ProcessName; DWORD dwBasePriority; DWORD dwProcessID; DWORD dwParentProcessID; DWORD dwHandleCount; DWORD dwUnknown3; DWORD dwUnknown4; - DWORD dwVirtualBytesPeak; - DWORD dwVirtualBytes; - DWORD dwPageFaults; - DWORD dwWorkingSetPeak; - DWORD dwWorkingSet; - DWORD dwUnknown5; - DWORD dwPagedPool; - DWORD dwUnknown6; - DWORD dwNonPagedPool; - DWORD dwPageFileBytesPeak; - DWORD dwPrivateBytes; - DWORD dwPageFileBytes; - DWORD dwUnknown7[4]; - THREADINFO ti[1]; + VM_COUNTERS vmCounters; + IO_COUNTERS ioCounters; + SYSTEM_THREAD_INFORMATION ti[1]; #else ULONG NextEntryOffset; BYTE Reserved1[52]; @@ -847,19 +1177,6 @@ BOOLEAN TimeAdjustmentDisabled; } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT; -/* System Information Class 0x03 */ -typedef struct _SYSTEM_TIMEOFDAY_INFORMATION { -#ifdef __WINESRC__ - LARGE_INTEGER liKeBootTime; - LARGE_INTEGER liKeSystemTime; - LARGE_INTEGER liExpTimeZoneBias; - ULONG uCurrentTimeZoneId; - DWORD dwReserved; -#else - BYTE Reserved1[48]; -#endif -} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */ - typedef struct _TIME_FIELDS { CSHORT Year; CSHORT Month; @@ -877,20 +1194,6 @@ BYTE Reserved3[1140]; } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW; -typedef struct _VM_COUNTERS_ { - ULONG PeakVirtualSize; - ULONG VirtualSize; [truncated at 1000 lines; 1024 more skipped]
19 years, 4 months
1
0
0
0
[sedwards] 17131: DCX_USESTYLE is a wineism. Dont use it in a header
by sedwards@svn.reactos.com
DCX_USESTYLE is a wineism. Dont use it in a header Modified: trunk/reactos/w32api/include/winuser.h _____ Modified: trunk/reactos/w32api/include/winuser.h --- trunk/reactos/w32api/include/winuser.h 2005-08-07 00:25:26 UTC (rev 17130) +++ trunk/reactos/w32api/include/winuser.h 2005-08-07 00:26:13 UTC (rev 17131) @@ -1736,7 +1736,6 @@ #define DCX_EXCLUDERGN 64 #define DCX_INTERSECTRGN 128 #define DCX_VALIDATE 0x200000 -#define DCX_USESTYLE 0x00010000 #define GMDI_GOINTOPOPUPS 2 #define GMDI_USEDISABLED 1 #define FKF_AVAILABLE 2
19 years, 4 months
1
0
0
0
[sedwards] 17130: added local define for DCX_USESTYLE
by sedwards@svn.reactos.com
added local define for DCX_USESTYLE Modified: trunk/reactos/regtests/winetests/user32/dce.c _____ Modified: trunk/reactos/regtests/winetests/user32/dce.c --- trunk/reactos/regtests/winetests/user32/dce.c 2005-08-07 00:21:24 UTC (rev 17129) +++ trunk/reactos/regtests/winetests/user32/dce.c 2005-08-07 00:25:26 UTC (rev 17130) @@ -33,6 +33,8 @@ #include "wine/test.h" +#define DCX_USESTYLE 0x00010000 + static HWND hwnd_cache, hwnd_owndc, hwnd_classdc, hwnd_classdc2; /* test behavior of DC attributes with various GetDC/ReleaseDC combinations */
19 years, 4 months
1
0
0
0
[sedwards] 17129: added DCX_USESTYLE
by sedwards@svn.reactos.com
added DCX_USESTYLE Modified: trunk/reactos/w32api/include/winuser.h _____ Modified: trunk/reactos/w32api/include/winuser.h --- trunk/reactos/w32api/include/winuser.h 2005-08-07 00:06:29 UTC (rev 17128) +++ trunk/reactos/w32api/include/winuser.h 2005-08-07 00:21:24 UTC (rev 17129) @@ -1736,6 +1736,7 @@ #define DCX_EXCLUDERGN 64 #define DCX_INTERSECTRGN 128 #define DCX_VALIDATE 0x200000 +#define DCX_USESTYLE 0x00010000 #define GMDI_GOINTOPOPUPS 2 #define GMDI_USEDISABLED 1 #define FKF_AVAILABLE 2
19 years, 4 months
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200