Added handle_t type to server interface so that we can make handles
pointers later on.
Always use 0 to signal invalid handle in server requests.
diff --git a/loader/elf.c b/loader/elf.c
index 9303a9a..47b1128 100644
--- a/loader/elf.c
+++ b/loader/elf.c
@@ -164,7 +164,7 @@
SNOOP_RegisterDLL(hmod,libname,STUBSIZE/sizeof(ELF_STDCALL_STUB));
- wm = PE_CreateModule( hmod, libname, 0, -1, FALSE );
+ wm = PE_CreateModule( hmod, libname, 0, 0, FALSE );
wm->find_export = ELF_FindExportedFunction;
wm->dlhandle = dlhandle;
return wm;
diff --git a/loader/module.c b/loader/module.c
index a50b5bd..d566e4f 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -1089,7 +1089,7 @@
if ( !MODULE_GetBinaryType( hFile, name, &type ) )
{
CloseHandle( hFile );
- retv = PROCESS_Create( -1, name, tidy_cmdline, lpEnvironment,
+ retv = PROCESS_Create( 0, name, tidy_cmdline, lpEnvironment,
lpProcessAttributes, lpThreadAttributes,
bInheritHandles, dwCreationFlags,
lpStartupInfo, lpProcessInfo, lpCurrentDirectory );
diff --git a/loader/ne/module.c b/loader/ne/module.c
index 5b30d0b..bf3d9a3 100644
--- a/loader/ne/module.c
+++ b/loader/ne/module.c
@@ -1019,7 +1019,7 @@
TDB *pTask;
LPSTR cmdline;
WORD cmdShow;
- HANDLE hThread = -1;
+ HANDLE hThread = 0;
int socket = -1;
/* Load module */
@@ -1074,7 +1074,7 @@
}
}
SERVER_END_REQ;
- if (hThread == -1) return 0;
+ if (!hThread) return 0;
if (!(teb = THREAD_Create( socket, 0, FALSE ))) goto error;
teb->tibflags &= ~TEBF_WIN32;
diff --git a/loader/pe_image.c b/loader/pe_image.c
index 74ab2f8..f68f2b7 100644
--- a/loader/pe_image.c
+++ b/loader/pe_image.c
@@ -533,7 +533,7 @@
* Note: Assumes that the process critical section is held
*/
WINE_MODREF *PE_CreateModule( HMODULE hModule, LPCSTR filename, DWORD flags,
- HFILE hFile, BOOL builtin )
+ HANDLE hFile, BOOL builtin )
{
DWORD load_addr = (DWORD)hModule; /* for RVA */
IMAGE_NT_HEADERS *nt = PE_HEADER(hModule);