Some small bugfixes, added more PE relocation types (for WinCE mostly),
some console prototypes, -dll is useful for winelib too, regtest compile fixed.
This commit is contained in:
parent
f8db63bbc0
commit
69c0bbea1a
|
@ -266,7 +266,7 @@ GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
|
||||||
{
|
{
|
||||||
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
|
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
|
||||||
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
|
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
|
||||||
return TRUE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -136,17 +136,15 @@ Disassembling programs:
|
||||||
The best, freely available, disassembler for Win16 programs is
|
The best, freely available, disassembler for Win16 programs is
|
||||||
Windows Codeback, archivename wcbxxx.zip, which usually can be found
|
Windows Codeback, archivename wcbxxx.zip, which usually can be found
|
||||||
in the Cica-Mirror subdirectory on the WINE ftpsites. (See ANNOUNCE).
|
in the Cica-Mirror subdirectory on the WINE ftpsites. (See ANNOUNCE).
|
||||||
|
|
||||||
Disassembling win32 programs is possible using the Windows Disassembler 32,
|
Disassembling win32 programs is possible using the Windows Disassembler 32,
|
||||||
which can be found at http://www.winsite.com/ and mirrors by searching for
|
archivename something like w32dsm87.zip (or similar) on ftp.winsite.com
|
||||||
w32dsm87.zip. This file used to be available under the name w32dasm.zip.
|
and mirrors. The shareware version does not allow saving of disassembly
|
||||||
The shareware version does not allow saving of disassembly listings.
|
listings.
|
||||||
|
You can also use the newer (and in the full version better) Interactive
|
||||||
|
Disassembler (IDA) from the ftp sites mentioned at the end of the document.
|
||||||
|
|
||||||
[It also has a bug, it disassembles the dll and immediately after that
|
Understanding disassembled code is mostly a question of exercise.
|
||||||
crashes, leaving a very large file caled 'winsys' in the directory of the
|
|
||||||
disassembled file. This file contains nothing of value (just the disassembly)
|
|
||||||
and can be safely deleted.]
|
|
||||||
|
|
||||||
Understanding disassembled code is just a question of exercise.
|
|
||||||
|
|
||||||
Most code out there uses standard C function entries (for it is usually
|
Most code out there uses standard C function entries (for it is usually
|
||||||
written in C). Win16 function entries usually look like that:
|
written in C). Win16 function entries usually look like that:
|
||||||
|
|
146
include/peexe.h
146
include/peexe.h
|
@ -406,13 +406,157 @@ typedef struct _IMAGE_DEBUG_DIRECTORY {
|
||||||
#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
|
#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
|
||||||
#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
|
#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
|
||||||
|
|
||||||
|
/* generic relocation types */
|
||||||
#define IMAGE_REL_BASED_ABSOLUTE 0
|
#define IMAGE_REL_BASED_ABSOLUTE 0
|
||||||
#define IMAGE_REL_BASED_HIGH 1
|
#define IMAGE_REL_BASED_HIGH 1
|
||||||
#define IMAGE_REL_BASED_LOW 2
|
#define IMAGE_REL_BASED_LOW 2
|
||||||
#define IMAGE_REL_BASED_HIGHLOW 3
|
#define IMAGE_REL_BASED_HIGHLOW 3
|
||||||
#define IMAGE_REL_BASED_HIGHADJ 4
|
#define IMAGE_REL_BASED_HIGHADJ 4
|
||||||
#define IMAGE_REL_BASED_MIPS_JMPADDR 5
|
#define IMAGE_REL_BASED_MIPS_JMPADDR 5
|
||||||
|
#define IMAGE_REL_BASED_SECTION 6
|
||||||
|
#define IMAGE_REL_BASED_REL32 7
|
||||||
|
#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
|
||||||
|
#define IMAGE_REL_BASED_IA64_IMM64 9 /* yes, 9 too */
|
||||||
|
#define IMAGE_REL_BASED_DIR64 10
|
||||||
|
#define IMAGE_REL_BASED_HIGH3ADJ 11
|
||||||
|
|
||||||
|
/* I386 relocation types */
|
||||||
|
#define IMAGE_REL_I386_ABSOLUTE 0
|
||||||
|
#define IMAGE_REL_I386_DIR16 1
|
||||||
|
#define IMAGE_REL_I386_REL16 2
|
||||||
|
#define IMAGE_REL_I386_DIR32 6
|
||||||
|
#define IMAGE_REL_I386_DIR32NB 7
|
||||||
|
#define IMAGE_REL_I386_SEG12 9
|
||||||
|
#define IMAGE_REL_I386_SECTION 10
|
||||||
|
#define IMAGE_REL_I386_SECREL 11
|
||||||
|
#define IMAGE_REL_I386_REL32 20
|
||||||
|
|
||||||
|
/* MIPS relocation types */
|
||||||
|
#define IMAGE_REL_MIPS_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_MIPS_REFHALF 0x0001
|
||||||
|
#define IMAGE_REL_MIPS_REFWORD 0x0002
|
||||||
|
#define IMAGE_REL_MIPS_JMPADDR 0x0003
|
||||||
|
#define IMAGE_REL_MIPS_REFHI 0x0004
|
||||||
|
#define IMAGE_REL_MIPS_REFLO 0x0005
|
||||||
|
#define IMAGE_REL_MIPS_GPREL 0x0006
|
||||||
|
#define IMAGE_REL_MIPS_LITERAL 0x0007
|
||||||
|
#define IMAGE_REL_MIPS_SECTION 0x000A
|
||||||
|
#define IMAGE_REL_MIPS_SECREL 0x000B
|
||||||
|
#define IMAGE_REL_MIPS_SECRELLO 0x000C
|
||||||
|
#define IMAGE_REL_MIPS_SECRELHI 0x000D
|
||||||
|
#define IMAGE_REL_MIPS_JMPADDR16 0x0010
|
||||||
|
#define IMAGE_REL_MIPS_REFWORDNB 0x0022
|
||||||
|
#define IMAGE_REL_MIPS_PAIR 0x0025
|
||||||
|
|
||||||
|
/* ALPHA relocation types */
|
||||||
|
#define IMAGE_REL_ALPHA_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_ALPHA_REFLONG 0x0001
|
||||||
|
#define IMAGE_REL_ALPHA_REFQUAD 0x0002
|
||||||
|
#define IMAGE_REL_ALPHA_GPREL32 0x0003
|
||||||
|
#define IMAGE_REL_ALPHA_LITERAL 0x0004
|
||||||
|
#define IMAGE_REL_ALPHA_LITUSE 0x0005
|
||||||
|
#define IMAGE_REL_ALPHA_GPDISP 0x0006
|
||||||
|
#define IMAGE_REL_ALPHA_BRADDR 0x0007
|
||||||
|
#define IMAGE_REL_ALPHA_HINT 0x0008
|
||||||
|
#define IMAGE_REL_ALPHA_INLINE_REFLONG 0x0009
|
||||||
|
#define IMAGE_REL_ALPHA_REFHI 0x000A
|
||||||
|
#define IMAGE_REL_ALPHA_REFLO 0x000B
|
||||||
|
#define IMAGE_REL_ALPHA_PAIR 0x000C
|
||||||
|
#define IMAGE_REL_ALPHA_MATCH 0x000D
|
||||||
|
#define IMAGE_REL_ALPHA_SECTION 0x000E
|
||||||
|
#define IMAGE_REL_ALPHA_SECREL 0x000F
|
||||||
|
#define IMAGE_REL_ALPHA_REFLONGNB 0x0010
|
||||||
|
#define IMAGE_REL_ALPHA_SECRELLO 0x0011
|
||||||
|
#define IMAGE_REL_ALPHA_SECRELHI 0x0012
|
||||||
|
#define IMAGE_REL_ALPHA_REFQ3 0x0013
|
||||||
|
#define IMAGE_REL_ALPHA_REFQ2 0x0014
|
||||||
|
#define IMAGE_REL_ALPHA_REFQ1 0x0015
|
||||||
|
#define IMAGE_REL_ALPHA_GPRELLO 0x0016
|
||||||
|
#define IMAGE_REL_ALPHA_GPRELHI 0x0017
|
||||||
|
|
||||||
|
/* PowerPC relocation types */
|
||||||
|
#define IMAGE_REL_PPC_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_PPC_ADDR64 0x0001
|
||||||
|
#define IMAGE_REL_PPC_ADDR32 0x0002
|
||||||
|
#define IMAGE_REL_PPC_ADDR24 0x0003
|
||||||
|
#define IMAGE_REL_PPC_ADDR16 0x0004
|
||||||
|
#define IMAGE_REL_PPC_ADDR14 0x0005
|
||||||
|
#define IMAGE_REL_PPC_REL24 0x0006
|
||||||
|
#define IMAGE_REL_PPC_REL14 0x0007
|
||||||
|
#define IMAGE_REL_PPC_TOCREL16 0x0008
|
||||||
|
#define IMAGE_REL_PPC_TOCREL14 0x0009
|
||||||
|
#define IMAGE_REL_PPC_ADDR32NB 0x000A
|
||||||
|
#define IMAGE_REL_PPC_SECREL 0x000B
|
||||||
|
#define IMAGE_REL_PPC_SECTION 0x000C
|
||||||
|
#define IMAGE_REL_PPC_IFGLUE 0x000D
|
||||||
|
#define IMAGE_REL_PPC_IMGLUE 0x000E
|
||||||
|
#define IMAGE_REL_PPC_SECREL16 0x000F
|
||||||
|
#define IMAGE_REL_PPC_REFHI 0x0010
|
||||||
|
#define IMAGE_REL_PPC_REFLO 0x0011
|
||||||
|
#define IMAGE_REL_PPC_PAIR 0x0012
|
||||||
|
#define IMAGE_REL_PPC_SECRELLO 0x0013
|
||||||
|
#define IMAGE_REL_PPC_SECRELHI 0x0014
|
||||||
|
#define IMAGE_REL_PPC_GPREL 0x0015
|
||||||
|
#define IMAGE_REL_PPC_TYPEMASK 0x00FF
|
||||||
|
/* modifier bits */
|
||||||
|
#define IMAGE_REL_PPC_NEG 0x0100
|
||||||
|
#define IMAGE_REL_PPC_BRTAKEN 0x0200
|
||||||
|
#define IMAGE_REL_PPC_BRNTAKEN 0x0400
|
||||||
|
#define IMAGE_REL_PPC_TOCDEFN 0x0800
|
||||||
|
|
||||||
|
/* SH3 ? relocation type */
|
||||||
|
#define IMAGE_REL_SH3_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_SH3_DIRECT16 0x0001
|
||||||
|
#define IMAGE_REL_SH3_DIRECT32 0x0002
|
||||||
|
#define IMAGE_REL_SH3_DIRECT8 0x0003
|
||||||
|
#define IMAGE_REL_SH3_DIRECT8_WORD 0x0004
|
||||||
|
#define IMAGE_REL_SH3_DIRECT8_LONG 0x0005
|
||||||
|
#define IMAGE_REL_SH3_DIRECT4 0x0006
|
||||||
|
#define IMAGE_REL_SH3_DIRECT4_WORD 0x0007
|
||||||
|
#define IMAGE_REL_SH3_DIRECT4_LONG 0x0008
|
||||||
|
#define IMAGE_REL_SH3_PCREL8_WORD 0x0009
|
||||||
|
#define IMAGE_REL_SH3_PCREL8_LONG 0x000A
|
||||||
|
#define IMAGE_REL_SH3_PCREL12_WORD 0x000B
|
||||||
|
#define IMAGE_REL_SH3_STARTOF_SECTION 0x000C
|
||||||
|
#define IMAGE_REL_SH3_SIZEOF_SECTION 0x000D
|
||||||
|
#define IMAGE_REL_SH3_SECTION 0x000E
|
||||||
|
#define IMAGE_REL_SH3_SECREL 0x000F
|
||||||
|
#define IMAGE_REL_SH3_DIRECT32_NB 0x0010
|
||||||
|
|
||||||
|
/* ARM (Archimedes?) relocation types */
|
||||||
|
#define IMAGE_REL_ARM_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_ARM_ADDR32 0x0001
|
||||||
|
#define IMAGE_REL_ARM_ADDR32NB 0x0002
|
||||||
|
#define IMAGE_REL_ARM_BRANCH24 0x0003
|
||||||
|
#define IMAGE_REL_ARM_BRANCH11 0x0004
|
||||||
|
#define IMAGE_REL_ARM_SECTION 0x000E
|
||||||
|
#define IMAGE_REL_ARM_SECREL 0x000F
|
||||||
|
|
||||||
|
/* IA64 relocation types */
|
||||||
|
#define IMAGE_REL_IA64_ABSOLUTE 0x0000
|
||||||
|
#define IMAGE_REL_IA64_IMM14 0x0001
|
||||||
|
#define IMAGE_REL_IA64_IMM22 0x0002
|
||||||
|
#define IMAGE_REL_IA64_IMM64 0x0003
|
||||||
|
#define IMAGE_REL_IA64_DIR32 0x0004
|
||||||
|
#define IMAGE_REL_IA64_DIR64 0x0005
|
||||||
|
#define IMAGE_REL_IA64_PCREL21B 0x0006
|
||||||
|
#define IMAGE_REL_IA64_PCREL21M 0x0007
|
||||||
|
#define IMAGE_REL_IA64_PCREL21F 0x0008
|
||||||
|
#define IMAGE_REL_IA64_GPREL22 0x0009
|
||||||
|
#define IMAGE_REL_IA64_LTOFF22 0x000A
|
||||||
|
#define IMAGE_REL_IA64_SECTION 0x000B
|
||||||
|
#define IMAGE_REL_IA64_SECREL22 0x000C
|
||||||
|
#define IMAGE_REL_IA64_SECREL64I 0x000D
|
||||||
|
#define IMAGE_REL_IA64_SECREL32 0x000E
|
||||||
|
#define IMAGE_REL_IA64_LTOFF64 0x000F
|
||||||
|
#define IMAGE_REL_IA64_DIR32NB 0x0010
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_11 0x0011
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_12 0x0012
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_13 0x0013
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_14 0x0014
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_15 0x0015
|
||||||
|
#define IMAGE_REL_IA64_RESERVED_16 0x0016
|
||||||
|
#define IMAGE_REL_IA64_ADDEND 0x001F
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the structure that appears at the very start of a .DBG file.
|
* This is the structure that appears at the very start of a .DBG file.
|
||||||
|
|
|
@ -142,6 +142,30 @@ typedef struct tagINPUT_RECORD
|
||||||
BOOL32 WINAPI WriteConsoleOutput32A( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
|
BOOL32 WINAPI WriteConsoleOutput32A( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
|
||||||
BOOL32 WINAPI WriteConsoleOutput32W( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
|
BOOL32 WINAPI WriteConsoleOutput32W( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
|
||||||
#define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput)
|
#define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput)
|
||||||
|
BOOL32 WINAPI WriteConsoleInput32A( HANDLE32 handle, INPUT_RECORD *buffer,
|
||||||
|
DWORD count, LPDWORD written );
|
||||||
|
BOOL32 WINAPI WriteConsoleInput32W( HANDLE32 handle, INPUT_RECORD *buffer,
|
||||||
|
DWORD count, LPDWORD written );
|
||||||
|
#define WriteConsoleInput WINELIB_NAME_AW(WriteConsoleInput)
|
||||||
|
BOOL32 WINAPI PeekConsoleInput32A( HANDLE32 handle, LPINPUT_RECORD buffer,
|
||||||
|
DWORD count, LPDWORD read );
|
||||||
|
BOOL32 WINAPI PeekConsoleInput32W( HANDLE32 handle, LPINPUT_RECORD buffer,
|
||||||
|
DWORD count, LPDWORD read );
|
||||||
|
#define PeekConsoleInput WINELIB_NAME_AW(PeekConsoleInput)
|
||||||
|
BOOL32 WINAPI ReadConsole32A( HANDLE32 hConsoleInput, LPVOID lpBuffer,
|
||||||
|
DWORD nNumberOfCharsToRead,
|
||||||
|
LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
|
||||||
|
BOOL32 WINAPI ReadConsole32W( HANDLE32 hConsoleInput, LPVOID lpBuffer,
|
||||||
|
DWORD nNumberOfCharsToRead,
|
||||||
|
LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
|
||||||
|
#define ReadConsole WINELIB_NAME_AW(ReadConsole)
|
||||||
|
BOOL32 WINAPI ReadConsoleInput32A(HANDLE32 hConsoleInput,
|
||||||
|
LPINPUT_RECORD lpBuffer, DWORD nLength,
|
||||||
|
LPDWORD lpNumberOfEventsRead);
|
||||||
|
BOOL32 WINAPI ReadConsoleInput32W(HANDLE32 hConsoleInput,
|
||||||
|
LPINPUT_RECORD lpBuffer, DWORD nLength,
|
||||||
|
LPDWORD lpNumberOfEventsRead);
|
||||||
|
#define ReadConsoleInput WINELIB_NAME_AW(ReadConsoleInput)
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINE__
|
||||||
extern HANDLE32 CONSOLE_OpenHandle( BOOL32 output, DWORD access, LPSECURITY_ATTRIBUTES sa );
|
extern HANDLE32 CONSOLE_OpenHandle( BOOL32 output, DWORD access, LPSECURITY_ATTRIBUTES sa );
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
/* True this when security is implemented */
|
/* True this when security is implemented */
|
||||||
#define CHECK_SAM FALSE
|
#define CHECK_SAM FALSE
|
||||||
|
|
||||||
#define ERROR(s,d) fprintf(stderr, "%s:#%d(Status=%ld)\n", __FUNCTION__,s,d)
|
#define xERROR(s,d) fprintf(stderr, "%s:#%d(Status=%ld)\n", __FUNCTION__,s,d)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTES: These individual routines are listed in alphabetical order.
|
* NOTES: These individual routines are listed in alphabetical order.
|
||||||
|
@ -40,14 +40,14 @@ void TestCloseKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegCloseKey((HKEY)2);
|
lSts = RegCloseKey((HKEY)2);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegCloseKey(HKEY_LOCAL_MACHINE);
|
lSts = RegCloseKey(HKEY_LOCAL_MACHINE);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
|
|
||||||
/* Check twice just for kicks */
|
/* Check twice just for kicks */
|
||||||
lSts = RegCloseKey(HKEY_LOCAL_MACHINE);
|
lSts = RegCloseKey(HKEY_LOCAL_MACHINE);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(3,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -59,14 +59,14 @@ void TestConnectRegistry()
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
lSts = RegConnectRegistry("",(HKEY)2,&hkey);
|
lSts = RegConnectRegistry("",(HKEY)2,&hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(1,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegConnectRegistry("",HKEY_LOCAL_MACHINE,&hkey);
|
lSts = RegConnectRegistry("",HKEY_LOCAL_MACHINE,&hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
|
|
||||||
#if TOO_SLOW
|
#if TOO_SLOW
|
||||||
lSts = RegConnectRegistry("\\\\regtest",HKEY_LOCAL_MACHINE,&hkey);
|
lSts = RegConnectRegistry("\\\\regtest",HKEY_LOCAL_MACHINE,&hkey);
|
||||||
if (lSts != ERROR_BAD_NETPATH) ERROR(3,lSts);
|
if (lSts != ERROR_BAD_NETPATH) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,22 +79,22 @@ void TestCreateKey()
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
lSts = RegCreateKey((HKEY)2,"",&hkey);
|
lSts = RegCreateKey((HKEY)2,"",&hkey);
|
||||||
if (lSts != ERROR_BADKEY) ERROR(1,lSts);
|
if (lSts != ERROR_BADKEY) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"",&hkey);
|
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"",&hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"\\asdf",&hkey);
|
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"\\asdf",&hkey);
|
||||||
if (lSts != ERROR_BAD_PATHNAME) ERROR(3,lSts);
|
if (lSts != ERROR_BAD_PATHNAME) xERROR(3,lSts);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"asdf\\",&hkey);
|
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"asdf\\",&hkey);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(4,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(4,lSts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"\\asdf\\",&hkey);
|
lSts = RegCreateKey(HKEY_LOCAL_MACHINE,"\\asdf\\",&hkey);
|
||||||
if (lSts != ERROR_BAD_PATHNAME) ERROR(5,lSts);
|
if (lSts != ERROR_BAD_PATHNAME) xERROR(5,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -107,19 +107,19 @@ void TestCreateKeyEx()
|
||||||
DWORD dwDisp;
|
DWORD dwDisp;
|
||||||
|
|
||||||
lSts = RegCreateKeyEx((HKEY)2,"",0,"",0,0,NULL,&hkey,&dwDisp);
|
lSts = RegCreateKeyEx((HKEY)2,"",0,"",0,0,NULL,&hkey,&dwDisp);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"",0,0,NULL,&hkey,
|
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"",0,0,NULL,&hkey,
|
||||||
&dwDisp);
|
&dwDisp);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"asdf",0,
|
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"asdf",0,
|
||||||
KEY_ALL_ACCESS,NULL,&hkey,&dwDisp);
|
KEY_ALL_ACCESS,NULL,&hkey,&dwDisp);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(3,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"",0,
|
lSts = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"regtest",0,"",0,
|
||||||
KEY_ALL_ACCESS,NULL,&hkey,&dwDisp);
|
KEY_ALL_ACCESS,NULL,&hkey,&dwDisp);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(4,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(4,lSts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,14 +131,14 @@ void TestDeleteKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegDeleteKey((HKEY)2, "asdf");
|
lSts = RegDeleteKey((HKEY)2, "asdf");
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegDeleteKey(HKEY_CURRENT_USER, "asdf");
|
lSts = RegDeleteKey(HKEY_CURRENT_USER, "asdf");
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(2,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(2,lSts);
|
||||||
|
|
||||||
#if CHECK_SAM
|
#if CHECK_SAM
|
||||||
lSts = RegDeleteKey(HKEY_CURRENT_USER, "");
|
lSts = RegDeleteKey(HKEY_CURRENT_USER, "");
|
||||||
if (lSts != ERROR_ACCESS_DENIED) ERROR(3,lSts);
|
if (lSts != ERROR_ACCESS_DENIED) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,16 +150,16 @@ void TestDeleteValue()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegDeleteValue((HKEY)2, "asdf");
|
lSts = RegDeleteValue((HKEY)2, "asdf");
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegDeleteValue(HKEY_CURRENT_USER, "");
|
lSts = RegDeleteValue(HKEY_CURRENT_USER, "");
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(2,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegDeleteValue(HKEY_CURRENT_USER, "asdf");
|
lSts = RegDeleteValue(HKEY_CURRENT_USER, "asdf");
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(3,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegDeleteValue(HKEY_CURRENT_USER, "\\asdf");
|
lSts = RegDeleteValue(HKEY_CURRENT_USER, "\\asdf");
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(4,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(4,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -175,13 +175,13 @@ void TestEnumKey()
|
||||||
sVal = (char *)malloc(lVal * sizeof(char));
|
sVal = (char *)malloc(lVal * sizeof(char));
|
||||||
|
|
||||||
lSts = RegEnumKey((HKEY)2,3,sVal,lVal);
|
lSts = RegEnumKey((HKEY)2,3,sVal,lVal);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegEnumKey(HKEY_CURRENT_USER,-1,sVal,lVal);
|
lSts = RegEnumKey(HKEY_CURRENT_USER,-1,sVal,lVal);
|
||||||
if (lSts != ERROR_NO_MORE_ITEMS) ERROR(2,lSts);
|
if (lSts != ERROR_NO_MORE_ITEMS) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegEnumKey(HKEY_CURRENT_USER,0,sVal,lVal);
|
lSts = RegEnumKey(HKEY_CURRENT_USER,0,sVal,lVal);
|
||||||
if (lSts != ERROR_MORE_DATA) ERROR(3,lSts);
|
if (lSts != ERROR_MORE_DATA) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -202,13 +202,13 @@ void TestEnumKeyEx()
|
||||||
sClass = (char *)malloc(lLen2 * sizeof(char));
|
sClass = (char *)malloc(lLen2 * sizeof(char));
|
||||||
|
|
||||||
lSts = RegEnumKeyEx((HKEY)2,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
lSts = RegEnumKeyEx((HKEY)2,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegEnumKeyEx(HKEY_LOCAL_MACHINE,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
lSts = RegEnumKeyEx(HKEY_LOCAL_MACHINE,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
||||||
if (lSts != ERROR_MORE_DATA) ERROR(2,lSts);
|
if (lSts != ERROR_MORE_DATA) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegEnumKeyEx(HKEY_LOCAL_MACHINE,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
lSts = RegEnumKeyEx(HKEY_LOCAL_MACHINE,0,sVal,&lLen1,0,sClass,&lLen2,&ft);
|
||||||
if (lSts != ERROR_MORE_DATA) ERROR(3,lSts);
|
if (lSts != ERROR_MORE_DATA) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -229,19 +229,19 @@ void TestEnumValue()
|
||||||
bVal = (char *)malloc(lLen1 * sizeof(char));
|
bVal = (char *)malloc(lLen1 * sizeof(char));
|
||||||
|
|
||||||
lSts = RegEnumValue((HKEY)2,-1,sVal,&lVal,0,&lType,NULL,&lLen1);
|
lSts = RegEnumValue((HKEY)2,-1,sVal,&lVal,0,&lType,NULL,&lLen1);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,-1,sVal,&lVal,0,&lType,NULL,&lLen1);
|
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,-1,sVal,&lVal,0,&lType,NULL,&lLen1);
|
||||||
if (lSts != ERROR_NO_MORE_ITEMS) ERROR(2,lSts);
|
if (lSts != ERROR_NO_MORE_ITEMS) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,0,sVal,&lVal,0,&lType,NULL,&lLen1);
|
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,0,sVal,&lVal,0,&lType,NULL,&lLen1);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(3,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,0,sVal,&lVal,0,NULL,NULL,&lLen1);
|
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,0,sVal,&lVal,0,NULL,NULL,&lLen1);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(4,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(4,lSts);
|
||||||
|
|
||||||
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,1,sVal,&lVal,0,&lType,bVal,&lLen1);
|
lSts = RegEnumValue(HKEY_LOCAL_MACHINE,1,sVal,&lVal,0,&lType,bVal,&lLen1);
|
||||||
if (lSts != ERROR_NO_MORE_ITEMS) ERROR(5,lSts);
|
if (lSts != ERROR_NO_MORE_ITEMS) xERROR(5,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -252,10 +252,10 @@ void TestFlushKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegFlushKey((HKEY)2);
|
lSts = RegFlushKey((HKEY)2);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegFlushKey(HKEY_LOCAL_MACHINE);
|
lSts = RegFlushKey(HKEY_LOCAL_MACHINE);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -271,14 +271,14 @@ void TestGetKeySecurity()
|
||||||
lLen = sizeof(sd);
|
lLen = sizeof(sd);
|
||||||
si = 0;
|
si = 0;
|
||||||
lSts = RegGetKeySecurity((HKEY)2,si,&sd,&lLen);
|
lSts = RegGetKeySecurity((HKEY)2,si,&sd,&lLen);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegGetKeySecurity(HKEY_LOCAL_MACHINE,si,&sd,&lLen);
|
lSts = RegGetKeySecurity(HKEY_LOCAL_MACHINE,si,&sd,&lLen);
|
||||||
if (lSts != ERROR_INSUFFICIENT_BUFFER) ERROR(2,lSts);
|
if (lSts != ERROR_INSUFFICIENT_BUFFER) xERROR(2,lSts);
|
||||||
|
|
||||||
si = GROUP_SECURITY_INFORMATION;
|
si = GROUP_SECURITY_INFORMATION;
|
||||||
lSts = RegGetKeySecurity(HKEY_LOCAL_MACHINE,si,&sd,&lLen);
|
lSts = RegGetKeySecurity(HKEY_LOCAL_MACHINE,si,&sd,&lLen);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(3,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -289,23 +289,23 @@ void TestLoadKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegLoadKey((HKEY)2,"","");
|
lSts = RegLoadKey((HKEY)2,"","");
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegLoadKey(HKEY_CURRENT_USER,"","");
|
lSts = RegLoadKey(HKEY_CURRENT_USER,"","");
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegLoadKey(HKEY_CURRENT_USER,"regtest","");
|
lSts = RegLoadKey(HKEY_CURRENT_USER,"regtest","");
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(3,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegLoadKey(HKEY_CURRENT_USER,"\\regtest","");
|
lSts = RegLoadKey(HKEY_CURRENT_USER,"\\regtest","");
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(4,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(4,lSts);
|
||||||
|
|
||||||
#if CHECK_SAM
|
#if CHECK_SAM
|
||||||
lSts = RegLoadKey(HKEY_CURRENT_USER,"regtest","regtest.dat");
|
lSts = RegLoadKey(HKEY_CURRENT_USER,"regtest","regtest.dat");
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(5,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(5,lSts);
|
||||||
|
|
||||||
lSts = RegLoadKey(HKEY_CURRENT_USER,"\\regtest","regtest.dat");
|
lSts = RegLoadKey(HKEY_CURRENT_USER,"\\regtest","regtest.dat");
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(6,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(6,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,14 +320,14 @@ void TestNotifyChangeKeyValue()
|
||||||
hEvent = (HANDLE)0;
|
hEvent = (HANDLE)0;
|
||||||
|
|
||||||
lSts = RegNotifyChangeKeyValue((HKEY)2, TRUE, REG_NOTIFY_CHANGE_NAME, 0, 0);
|
lSts = RegNotifyChangeKeyValue((HKEY)2, TRUE, REG_NOTIFY_CHANGE_NAME, 0, 0);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegNotifyChangeKeyValue(HKEY_CURRENT_USER, TRUE, REG_NOTIFY_CHANGE_NAME, 0, 1);
|
lSts = RegNotifyChangeKeyValue(HKEY_CURRENT_USER, TRUE, REG_NOTIFY_CHANGE_NAME, 0, 1);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
hEvent = (HANDLE)HKEY_CURRENT_USER;
|
hEvent = (HANDLE)HKEY_CURRENT_USER;
|
||||||
lSts = RegNotifyChangeKeyValue(HKEY_CURRENT_USER, TRUE, REG_NOTIFY_CHANGE_NAME, hEvent, 1);
|
lSts = RegNotifyChangeKeyValue(HKEY_CURRENT_USER, TRUE, REG_NOTIFY_CHANGE_NAME, hEvent, 1);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(3,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -339,17 +339,17 @@ void TestOpenKey()
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
lSts = RegOpenKey((HKEY)72, "",&hkey);
|
lSts = RegOpenKey((HKEY)72, "",&hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(1,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(1,lSts);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
lSts = RegOpenKey((HKEY)2, "regtest",&hkey);
|
lSts = RegOpenKey((HKEY)2, "regtest",&hkey);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegOpenKey(HKEY_CURRENT_USER, "regtest",&hkey);
|
lSts = RegOpenKey(HKEY_CURRENT_USER, "regtest",&hkey);
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(3,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegOpenKey(HKEY_CURRENT_USER, "\\regtest",&hkey);
|
lSts = RegOpenKey(HKEY_CURRENT_USER, "\\regtest",&hkey);
|
||||||
if (lSts != ERROR_BAD_PATHNAME) ERROR(4,lSts);
|
if (lSts != ERROR_BAD_PATHNAME) xERROR(4,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -361,16 +361,16 @@ void TestOpenKeyEx()
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
lSts = RegOpenKeyEx((HKEY)2,"",0,KEY_ALL_ACCESS,&hkey);
|
lSts = RegOpenKeyEx((HKEY)2,"",0,KEY_ALL_ACCESS,&hkey);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"\\regtest",0,KEY_ALL_ACCESS,&hkey);
|
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"\\regtest",0,KEY_ALL_ACCESS,&hkey);
|
||||||
if (lSts != ERROR_BAD_PATHNAME) ERROR(2,lSts);
|
if (lSts != ERROR_BAD_PATHNAME) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"regtest",0,0,&hkey);
|
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"regtest",0,0,&hkey);
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(3,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"regtest\\",0,0,&hkey);
|
lSts = RegOpenKeyEx(HKEY_CURRENT_USER,"regtest\\",0,0,&hkey);
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(4,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(4,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -396,12 +396,12 @@ void TestQueryInfoKey()
|
||||||
lSts = RegQueryInfoKey((HKEY)2,sClass,&lClass,0,&lSubKeys,&lMaxSubLen,
|
lSts = RegQueryInfoKey((HKEY)2,sClass,&lClass,0,&lSubKeys,&lMaxSubLen,
|
||||||
&lMaxClassLen,&lValues,&lMaxValNameLen,&lMaxValLen,
|
&lMaxClassLen,&lValues,&lMaxValNameLen,&lMaxValLen,
|
||||||
&lSecDescLen, &ft);
|
&lSecDescLen, &ft);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegQueryInfoKey(HKEY_CURRENT_USER,sClass,&lClass,0,&lSubKeys,
|
lSts = RegQueryInfoKey(HKEY_CURRENT_USER,sClass,&lClass,0,&lSubKeys,
|
||||||
&lMaxSubLen,&lMaxClassLen,&lValues,&lMaxValNameLen,
|
&lMaxSubLen,&lMaxClassLen,&lValues,&lMaxValNameLen,
|
||||||
&lMaxValLen,&lSecDescLen, &ft);
|
&lMaxValLen,&lSecDescLen, &ft);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -417,16 +417,16 @@ void TestQueryValue()
|
||||||
lLen = strlen(sVal);
|
lLen = strlen(sVal);
|
||||||
|
|
||||||
lSts = RegQueryValue((HKEY)2,"",NULL,&lLen);
|
lSts = RegQueryValue((HKEY)2,"",NULL,&lLen);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegQueryValue(HKEY_CURRENT_USER,"",NULL,&lLen);
|
lSts = RegQueryValue(HKEY_CURRENT_USER,"",NULL,&lLen);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegQueryValue(HKEY_CURRENT_USER,"\\regtest",NULL,&lLen);
|
lSts = RegQueryValue(HKEY_CURRENT_USER,"\\regtest",NULL,&lLen);
|
||||||
if (lSts != ERROR_BAD_PATHNAME) ERROR(3,lSts);
|
if (lSts != ERROR_BAD_PATHNAME) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegQueryValue(HKEY_CURRENT_USER,"",sVal,&lLen);
|
lSts = RegQueryValue(HKEY_CURRENT_USER,"",sVal,&lLen);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(4,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(4,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -443,13 +443,13 @@ void TestQueryValueEx()
|
||||||
sVal = (char *)malloc(lLen * sizeof(char));
|
sVal = (char *)malloc(lLen * sizeof(char));
|
||||||
|
|
||||||
lSts = RegQueryValueEx((HKEY)2,"",0,&lType,sVal,&lLen);
|
lSts = RegQueryValueEx((HKEY)2,"",0,&lType,sVal,&lLen);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegQueryValueEx(HKEY_CURRENT_USER,"",(LPDWORD)1,&lType,sVal,&lLen);
|
lSts = RegQueryValueEx(HKEY_CURRENT_USER,"",(LPDWORD)1,&lType,sVal,&lLen);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegQueryValueEx(HKEY_LOCAL_MACHINE,"",0,&lType,sVal,&lLen);
|
lSts = RegQueryValueEx(HKEY_LOCAL_MACHINE,"",0,&lType,sVal,&lLen);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(3,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -460,14 +460,14 @@ void TestReplaceKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegReplaceKey((HKEY)2,"","","");
|
lSts = RegReplaceKey((HKEY)2,"","","");
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
#if CHECK_SAM
|
#if CHECK_SAM
|
||||||
lSts = RegReplaceKey(HKEY_LOCAL_MACHINE,"","","");
|
lSts = RegReplaceKey(HKEY_LOCAL_MACHINE,"","","");
|
||||||
if (lSts != ERROR_ACCESS_DENIED) ERROR(2,lSts);
|
if (lSts != ERROR_ACCESS_DENIED) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegReplaceKey(HKEY_LOCAL_MACHINE,"Software","","");
|
lSts = RegReplaceKey(HKEY_LOCAL_MACHINE,"Software","","");
|
||||||
if (lSts != ERROR_ACCESS_DENIED) ERROR(3,lSts);
|
if (lSts != ERROR_ACCESS_DENIED) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,13 +479,13 @@ void TestRestoreKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegRestoreKey((HKEY)2,"",0);
|
lSts = RegRestoreKey((HKEY)2,"",0);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegRestoreKey(HKEY_LOCAL_MACHINE,"",0);
|
lSts = RegRestoreKey(HKEY_LOCAL_MACHINE,"",0);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegRestoreKey(HKEY_LOCAL_MACHINE,"a.a",0);
|
lSts = RegRestoreKey(HKEY_LOCAL_MACHINE,"a.a",0);
|
||||||
if (lSts != ERROR_FILE_NOT_FOUND) ERROR(3,lSts);
|
if (lSts != ERROR_FILE_NOT_FOUND) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -496,14 +496,14 @@ void TestSaveKey()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegSaveKey((HKEY)2,"",NULL);
|
lSts = RegSaveKey((HKEY)2,"",NULL);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegSaveKey(HKEY_LOCAL_MACHINE,"",NULL);
|
lSts = RegSaveKey(HKEY_LOCAL_MACHINE,"",NULL);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
#if CHECK_SAM
|
#if CHECK_SAM
|
||||||
lSts = RegSaveKey(HKEY_LOCAL_MACHINE,"a.a",NULL);
|
lSts = RegSaveKey(HKEY_LOCAL_MACHINE,"a.a",NULL);
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(3,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,16 +516,16 @@ void TestSetKeySecurity()
|
||||||
SECURITY_DESCRIPTOR sd;
|
SECURITY_DESCRIPTOR sd;
|
||||||
|
|
||||||
lSts = RegSetKeySecurity((HKEY)2,0,NULL);
|
lSts = RegSetKeySecurity((HKEY)2,0,NULL);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,0,NULL);
|
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,0,NULL);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,OWNER_SECURITY_INFORMATION,NULL);
|
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,OWNER_SECURITY_INFORMATION,NULL);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(3,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(3,lSts);
|
||||||
|
|
||||||
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,OWNER_SECURITY_INFORMATION,&sd);
|
lSts = RegSetKeySecurity(HKEY_LOCAL_MACHINE,OWNER_SECURITY_INFORMATION,&sd);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(4,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(4,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -539,22 +539,22 @@ void TestSetValue()
|
||||||
|
|
||||||
#if MAKE_NT_CRASH
|
#if MAKE_NT_CRASH
|
||||||
lSts = RegSetValue((HKEY)2,"",0,NULL,0);
|
lSts = RegSetValue((HKEY)2,"",0,NULL,0);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(1,lSts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MAKE_NT_CRASH
|
#if MAKE_NT_CRASH
|
||||||
lSts = RegSetValue((HKEY)2,"regtest",0,NULL,0);
|
lSts = RegSetValue((HKEY)2,"regtest",0,NULL,0);
|
||||||
if (lSts != ERROR_INVALID_PARAMETER) ERROR(2,lSts);
|
if (lSts != ERROR_INVALID_PARAMETER) xERROR(2,lSts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MAKE_NT_CRASH
|
#if MAKE_NT_CRASH
|
||||||
lSts = RegSetValue((HKEY)2,"regtest",REG_SZ,NULL,0);
|
lSts = RegSetValue((HKEY)2,"regtest",REG_SZ,NULL,0);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(3,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MAKE_NT_CRASH
|
#if MAKE_NT_CRASH
|
||||||
lSts = RegSetValue(HKEY_LOCAL_MACHINE,"regtest",REG_SZ,NULL,0);
|
lSts = RegSetValue(HKEY_LOCAL_MACHINE,"regtest",REG_SZ,NULL,0);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(4,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(4,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,10 +566,10 @@ void TestSetValueEx()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegSetValueEx((HKEY)2,"",0,0,NULL,0);
|
lSts = RegSetValueEx((HKEY)2,"",0,0,NULL,0);
|
||||||
if (lSts != ERROR_INVALID_HANDLE) ERROR(1,lSts);
|
if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegSetValueEx(HKEY_LOCAL_MACHINE,"",0,0,NULL,0);
|
lSts = RegSetValueEx(HKEY_LOCAL_MACHINE,"",0,0,NULL,0);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -583,13 +583,13 @@ void TestUnLoadKey()
|
||||||
|
|
||||||
#if CHECK_SAM
|
#if CHECK_SAM
|
||||||
lSts = RegUnLoadKey((HKEY)2,"");
|
lSts = RegUnLoadKey((HKEY)2,"");
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(1,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(1,lSts);
|
||||||
|
|
||||||
lSts = RegUnLoadKey(HKEY_LOCAL_MACHINE,"");
|
lSts = RegUnLoadKey(HKEY_LOCAL_MACHINE,"");
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(2,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(2,lSts);
|
||||||
|
|
||||||
lSts = RegUnLoadKey(HKEY_LOCAL_MACHINE,"\\regtest");
|
lSts = RegUnLoadKey(HKEY_LOCAL_MACHINE,"\\regtest");
|
||||||
if (lSts != ERROR_PRIVILEGE_NOT_HELD) ERROR(3,lSts);
|
if (lSts != ERROR_PRIVILEGE_NOT_HELD) xERROR(3,lSts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,14 +602,14 @@ void TestSequence1()
|
||||||
long lSts;
|
long lSts;
|
||||||
|
|
||||||
lSts = RegCreateKey(HKEY_CURRENT_USER,"regtest",&hkey);
|
lSts = RegCreateKey(HKEY_CURRENT_USER,"regtest",&hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(1,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(1,lSts);
|
||||||
|
|
||||||
/* fprintf(stderr, " hkey=0x%x\n", hkey); */
|
/* fprintf(stderr, " hkey=0x%x\n", hkey); */
|
||||||
|
|
||||||
lSts = RegDeleteKey(HKEY_CURRENT_USER, "regtest");
|
lSts = RegDeleteKey(HKEY_CURRENT_USER, "regtest");
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(2,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(2,lSts);
|
||||||
lSts = RegCloseKey(hkey);
|
lSts = RegCloseKey(hkey);
|
||||||
if (lSts != ERROR_SUCCESS) ERROR(3,lSts);
|
if (lSts != ERROR_SUCCESS) xERROR(3,lSts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -271,3 +271,5 @@ type win32
|
||||||
0267 stub LsaICLookupSids
|
0267 stub LsaICLookupSids
|
||||||
0268 stub SystemFunction031
|
0268 stub SystemFunction031
|
||||||
0269 stub I_ScSetServiceBitsA
|
0269 stub I_ScSetServiceBitsA
|
||||||
|
0270 stub EnumServiceGroupA
|
||||||
|
0271 stub EnumServiceGroupW
|
||||||
|
|
|
@ -225,29 +225,16 @@ void X11DRV_MAIN_ParseOptions(int *argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (X11DRV_MAIN_GetResource( db, ".dll", &value))
|
if (X11DRV_MAIN_GetResource( db, ".dll", &value))
|
||||||
{
|
{
|
||||||
/* Hack: store option value in Options to be retrieved */
|
if (Options.dllFlags)
|
||||||
/* later on inside the emulator code. */
|
{
|
||||||
if (!__winelib)
|
/* don't overwrite previous value. Should we
|
||||||
{
|
* automatically add the ',' between multiple DLLs ?
|
||||||
if (Options.dllFlags)
|
*/
|
||||||
{
|
MSG("Only one -dll flag is allowed. Use ',' between multiple DLLs\n");
|
||||||
/* don't overwrite previous value. Should we
|
}
|
||||||
* automatically add the ',' between multiple DLLs ?
|
else Options.dllFlags = xstrdup((char *)value.addr);
|
||||||
*/
|
}
|
||||||
MSG("Only one -dll flag is allowed. Use ',' between multiple DLLs\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Options.dllFlags = xstrdup((char *)value.addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MSG("-dll not supported in Winelib\n" );
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (X11DRV_MAIN_GetResource( db, ".winver", &value))
|
if (X11DRV_MAIN_GetResource( db, ".winver", &value))
|
||||||
VERSION_ParseWinVersion( (char*)value.addr );
|
VERSION_ParseWinVersion( (char*)value.addr );
|
||||||
|
|
Loading…
Reference in New Issue