Release 960114
[wine/gsoc-2012-control.git] / win32 / process.c
blobb8e244db9aae14156bcd51434f8a2c5bb6b77801
1 /*
2 * Win32 kernel functions
4 * Copyright 1995 Martin von Loewis
5 */
7 #include <stdio.h>
8 #include <unistd.h>
9 #include "windows.h"
10 #include "winerror.h"
11 #include "kernel32.h"
12 #include "handle32.h"
13 #include "stddebug.h"
14 #include "debug.h"
16 /***********************************************************************
17 * ExitProcess (KERNEL32.100)
20 void ExitProcess(DWORD status)
22 exit(status);
25 /***********************************************************************
26 * CreateMutexA (KERNEL32.52)
28 WINAPI HANDLE32 CreateMutexA (SECURITY_ATTRIBUTES *sa, BOOL on, const char *a)
30 return 0;
33 /***********************************************************************
34 * ReleaseMutex (KERNEL32.435)
36 WINAPI BOOL ReleaseMutex (HANDLE32 h)
38 return 0;
41 /***********************************************************************
42 * CreateEventA (KERNEL32.43)
44 WINAPI HANDLE32 CreateEventA (SECURITY_ATTRIBUTES *sa, BOOL au, BOOL on, const char
45 *name)
47 return 0;
49 /***********************************************************************
50 * SetEvent (KERNEL32.487)
52 WINAPI BOOL SetEvent (HANDLE32 h)
54 return 0;
56 /***********************************************************************
57 * ResetEvent (KERNEL32.439)
59 WINAPI BOOL ResetEvent (HANDLE32 h)
61 return 0;
63 /***********************************************************************
64 * WaitForSingleObject (KERNEL32.561)
66 DWORD WINAPI WaitForSingleObject(HANDLE32 h, DWORD a)
68 return 0;
70 /***********************************************************************
71 * DuplicateHandle (KERNEL32.78)
73 BOOL WINAPI DuplicateHandle(HANDLE32 a, HANDLE32 b, HANDLE32 c, HANDLE32 * d, DWORD e, BOOL f, DWORD g)
75 *d = b;
76 return 1;
78 /***********************************************************************
79 * GetCurrentProcess (KERNEL32.198)
81 HANDLE32 WINAPI GetCurrentProcess(void)
83 return 0;
86 /***********************************************************************
87 * LoadLibraryA (KERNEL32.365)
88 * copied from LoadLibrary
89 * This does not currently support built-in libraries
91 HANDLE32 WINAPI LoadLibraryA(char *libname)
93 HANDLE handle;
94 dprintf_module( stddeb, "LoadLibrary: (%08x) %s\n", (int)libname, libname);
95 handle = LoadModule( libname, (LPVOID)-1 );
96 if (handle == (HANDLE) -1)
98 char buffer[256];
99 strcpy( buffer, libname );
100 strcat( buffer, ".dll" );
101 handle = LoadModule( buffer, (LPVOID)-1 );
103 /* Obtain module handle and call initialization function */
104 #ifndef WINELIB
105 if (handle >= (HANDLE)32) PE_InitializeDLLs( GetExePtr(handle));
106 #endif
107 return handle;
111 #ifndef WINELIB
112 /***********************************************************************
113 * WIN32_GetProcAddress
115 void* WINAPI WIN32_GetProcAddress(HANDLE32 hModule, char* function)
117 dprintf_module( stddeb, "WIN32_GetProcAddress(%08x,%s)\n",
118 hModule, function);
119 return PE_GetProcAddress(GetExePtr(hModule),function);
121 #endif /* WINELIB */