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