1*c2c66affSColin Finck /*
2*c2c66affSColin Finck * Win32 builtin dlls support
3*c2c66affSColin Finck *
4*c2c66affSColin Finck * Copyright 2000 Alexandre Julliard
5*c2c66affSColin Finck *
6*c2c66affSColin Finck * This library is free software; you can redistribute it and/or
7*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public
8*c2c66affSColin Finck * License as published by the Free Software Foundation; either
9*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version.
10*c2c66affSColin Finck *
11*c2c66affSColin Finck * This library is distributed in the hope that it will be useful,
12*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14*c2c66affSColin Finck * Lesser General Public License for more details.
15*c2c66affSColin Finck *
16*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public
17*c2c66affSColin Finck * License along with this library; if not, write to the Free Software
18*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19*c2c66affSColin Finck */
20*c2c66affSColin Finck
21*c2c66affSColin Finck #include "config.h"
22*c2c66affSColin Finck #include "wine/port.h"
23*c2c66affSColin Finck
24*c2c66affSColin Finck #include <assert.h>
25*c2c66affSColin Finck #include <ctype.h>
26*c2c66affSColin Finck #include <fcntl.h>
27*c2c66affSColin Finck #include <limits.h>
28*c2c66affSColin Finck #include <stdarg.h>
29*c2c66affSColin Finck #include <stdlib.h>
30*c2c66affSColin Finck #include <string.h>
31*c2c66affSColin Finck #include <sys/types.h>
32*c2c66affSColin Finck #ifdef HAVE_SYS_MMAN_H
33*c2c66affSColin Finck #include <sys/mman.h>
34*c2c66affSColin Finck #endif
35*c2c66affSColin Finck #ifdef HAVE_SYS_RESOURCE_H
36*c2c66affSColin Finck # include <sys/resource.h>
37*c2c66affSColin Finck #endif
38*c2c66affSColin Finck #ifdef HAVE_UNISTD_H
39*c2c66affSColin Finck # include <unistd.h>
40*c2c66affSColin Finck #endif
41*c2c66affSColin Finck
42*c2c66affSColin Finck #define NONAMELESSUNION
43*c2c66affSColin Finck #define NONAMELESSSTRUCT
44*c2c66affSColin Finck #include "windef.h"
45*c2c66affSColin Finck #include "winbase.h"
46*c2c66affSColin Finck #include "wine/library.h"
47*c2c66affSColin Finck
wine_dlsym(void * handle,const char * symbol,char * error,size_t errorsize)48*c2c66affSColin Finck void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize )
49*c2c66affSColin Finck {
50*c2c66affSColin Finck return GetProcAddress(handle, symbol);
51*c2c66affSColin Finck }
52*c2c66affSColin Finck
wine_dlopen(const char * filename,int flag,char * error,size_t errorsize)53*c2c66affSColin Finck void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize )
54*c2c66affSColin Finck {
55*c2c66affSColin Finck return LoadLibraryA(filename);
56*c2c66affSColin Finck }
57*c2c66affSColin Finck
wine_dlclose(void * handle,char * error,size_t errorsize)58*c2c66affSColin Finck int wine_dlclose( void *handle, char *error, size_t errorsize )
59*c2c66affSColin Finck {
60*c2c66affSColin Finck return FreeLibrary(handle);
61*c2c66affSColin Finck }
62