fix some MSVC compile problems
[reactos.git] / reactos / lib / crt / process / dll.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/msvcrt/process/dll.c
5 * PURPOSE: Dll support routines
6 * PROGRAMER: Boudewijn Dekker
7 * UPDATE HISTORY:
8 * 04/03/99: Created
9 */
10
11 #include "precomp.h"
12 #include <process.h>
13
14 /*
15 * @implemented
16 */
17 intptr_t _loaddll(char* name)
18 {
19 return (intptr_t) LoadLibraryA(name);
20 }
21
22 /*
23 * @implemented
24 */
25 int _unloaddll(intptr_t handle)
26 {
27 return FreeLibrary((HMODULE) handle);
28 }
29
30 /*
31 * @implemented
32 */
33 FARPROC _getdllprocaddr(intptr_t hModule, char* lpProcName, intptr_t iOrdinal)
34 {
35 if (lpProcName != NULL)
36 return GetProcAddress((HMODULE) hModule, lpProcName);
37 else
38 return GetProcAddress((HMODULE) hModule, (LPSTR)iOrdinal);
39 return (NULL);
40 }