Lines Matching refs:library
39 deDynamicLibrary* library = (deDynamicLibrary*)deCalloc(sizeof(deDynamicLibrary)); in deDynamicLibrary_open() local
40 if (!library) in deDynamicLibrary_open()
43 library->libHandle = dlopen(fileName, RTLD_LAZY); in deDynamicLibrary_open()
44 if (!library->libHandle) in deDynamicLibrary_open()
46 deFree(library); in deDynamicLibrary_open()
50 return library; in deDynamicLibrary_open()
53 void deDynamicLibrary_close (deDynamicLibrary* library) in deDynamicLibrary_close() argument
55 if (library && library->libHandle) in deDynamicLibrary_close()
56 dlclose(library->libHandle); in deDynamicLibrary_close()
57 deFree(library); in deDynamicLibrary_close()
60 deFunctionPtr deDynamicLibrary_getFunction (const deDynamicLibrary* library, const char* symbolName) in deDynamicLibrary_getFunction() argument
69 DE_ASSERT(library && library->libHandle && symbolName); in deDynamicLibrary_getFunction()
70 ptr.objPtr = dlsym(library->libHandle, symbolName); in deDynamicLibrary_getFunction()
88 deDynamicLibrary* library = (deDynamicLibrary*)deCalloc(sizeof(deDynamicLibrary)); in deDynamicLibrary_open() local
89 if (!library) in deDynamicLibrary_open()
92 library->handle = LoadLibrary(fileName); in deDynamicLibrary_open()
93 if (!library->handle) in deDynamicLibrary_open()
95 deFree(library); in deDynamicLibrary_open()
99 return library; in deDynamicLibrary_open()
102 void deDynamicLibrary_close (deDynamicLibrary* library) in deDynamicLibrary_close() argument
104 if (library && library->handle) in deDynamicLibrary_close()
105 FreeLibrary(library->handle); in deDynamicLibrary_close()
106 deFree(library); in deDynamicLibrary_close()
109 deFunctionPtr deDynamicLibrary_getFunction (const deDynamicLibrary* library, const char* symbolName) in deDynamicLibrary_getFunction() argument
111 DE_ASSERT(library && library->handle && symbolName); in deDynamicLibrary_getFunction()
112 return (deFunctionPtr)GetProcAddress(library->handle, symbolName); in deDynamicLibrary_getFunction()