本文整理汇总了C++中Sys_UnloadLibrary函数的典型用法代码示例。如果您正苦于以下问题:C++ Sys_UnloadLibrary函数的具体用法?C++ Sys_UnloadLibrary怎么用?C++ Sys_UnloadLibrary使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Sys_UnloadLibrary函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SCR_CaptureVideo_Ogg_CloseDLL
void SCR_CaptureVideo_Ogg_CloseDLL(void)
{
Sys_UnloadLibrary (&ve_dll);
Sys_UnloadLibrary (&vo_dll);
Sys_UnloadLibrary (&th_dll);
Sys_UnloadLibrary (&og_dll);
}
示例2: PNG_CloseLibrary
/*
====================
PNG_CloseLibrary
Unload the PNG DLL
====================
*/
void PNG_CloseLibrary (void)
{
#ifndef LINK_TO_LIBPNG
Sys_UnloadLibrary (&png14_dll);
Sys_UnloadLibrary (&png_dll);
#endif
}
示例3: intptr_t
/*
=================
Sys_LoadGameDll
Used to load a development dll instead of a virtual machine
=================
*/
void *Sys_LoadGameDll(const char *name,
intptr_t (QDECL **entryPoint)(intptr_t, ...),
intptr_t (*systemcalls)(intptr_t, ...))
{
void *libHandle;
void (*dllEntry)(intptr_t (*syscallptr)(intptr_t, ...));
assert(name);
Com_DPrintf( "Loading DLL file: %s\n", name);
libHandle = Sys_LoadLibrary(name);
if(!libHandle)
{
Com_Printf("Sys_LoadGameDll(%s) failed:\n\"%s\"\n", name, Sys_LibraryError());
return NULL;
}
dllEntry = Sys_LoadFunction( libHandle, "dllEntry" );
*entryPoint = Sys_LoadFunction( libHandle, "vmMain" );
if ( !*entryPoint || !dllEntry )
{
Com_Printf ( "Sys_LoadGameDll(%s) failed to find vmMain function:\n\"%s\" !\n", name, Sys_LibraryError( ) );
Sys_UnloadLibrary(libHandle);
return NULL;
}
Com_DPrintf ( "Sys_LoadGameDll(%s) found vmMain function at %p\n", name, *entryPoint );
dllEntry( systemcalls );
return libHandle;
}
示例4: Sys_UnloadGame
/*
=================
Sys_UnloadGame
=================
*/
void Sys_UnloadGame (void)
{
Com_Printf("------ Unloading Game ------\n");
if (game_library)
Sys_UnloadLibrary (game_library);
game_library = NULL;
}
示例5: CL_cURL_Shutdown
/*
=================
CL_cURL_Shutdown
=================
*/
void CL_cURL_Shutdown( void )
{
CL_cURL_Cleanup();
#ifdef USE_CURL_DLOPEN
if(cURLLib)
{
Sys_UnloadLibrary(cURLLib);
cURLLib = NULL;
}
qcurl_easy_init = NULL;
qcurl_easy_setopt = NULL;
qcurl_easy_perform = NULL;
qcurl_easy_cleanup = NULL;
qcurl_easy_getinfo = NULL;
qcurl_easy_duphandle = NULL;
qcurl_easy_reset = NULL;
qcurl_multi_init = NULL;
qcurl_multi_add_handle = NULL;
qcurl_multi_remove_handle = NULL;
qcurl_multi_fdset = NULL;
qcurl_multi_perform = NULL;
qcurl_multi_cleanup = NULL;
qcurl_multi_info_read = NULL;
qcurl_multi_strerror = NULL;
#endif /* USE_CURL_DLOPEN */
}
示例6: Com_sprintf
void *Sys_LoadLegacyGameDll( const char *name, VMMainProc **vmMain, SystemCallProc *systemcalls )
{
void *libHandle = NULL;
char filename[MAX_OSPATH];
Com_sprintf (filename, sizeof(filename), "%s" ARCH_STRING DLL_EXT, name);
if (!Sys_UnpackDLL(filename))
{
Com_DPrintf( "Sys_LoadLegacyGameDll: Failed to unpack %s from PK3.\n", filename );
return NULL;
}
#if defined(MACOS_X) && !defined(_JK2EXE)
//First, look for the old-style mac .bundle that's inside a pk3
//It's actually zipped, and the zipfile has the same name as 'name'
libHandle = Sys_LoadMachOBundle( name );
#endif
if (!libHandle) {
char *basepath = Cvar_VariableString( "fs_basepath" );
char *homepath = Cvar_VariableString( "fs_homepath" );
char *cdpath = Cvar_VariableString( "fs_cdpath" );
char *gamedir = Cvar_VariableString( "fs_game" );
#ifdef MACOS_X
char *apppath = Cvar_VariableString( "fs_apppath" );
#endif
const char *searchPaths[] = {
homepath,
#ifdef MACOS_X
apppath,
#endif
basepath,
cdpath,
};
size_t numPaths = ARRAY_LEN( searchPaths );
libHandle = Sys_LoadDllFromPaths( filename, gamedir, searchPaths, numPaths, SEARCH_PATH_BASE | SEARCH_PATH_MOD, __FUNCTION__ );
if ( !libHandle )
return NULL;
}
typedef void QDECL DllEntryProc( SystemCallProc *syscallptr );
DllEntryProc *dllEntry = (DllEntryProc *)Sys_LoadFunction( libHandle, "dllEntry" );
*vmMain = (VMMainProc *)Sys_LoadFunction( libHandle, "vmMain" );
if ( !*vmMain || !dllEntry ) {
Com_DPrintf ( "Sys_LoadLegacyGameDll(%s) failed to find vmMain function:\n...%s!\n", name, Sys_LibraryError() );
Sys_UnloadLibrary( libHandle );
return NULL;
}
Com_DPrintf ( "Sys_LoadLegacyGameDll(%s) found vmMain function at 0x%" PRIxPTR "\n", name, *vmMain );
dllEntry( systemcalls );
return libHandle;
}
示例7: Sys_UnloadDll
/*
=================
Sys_UnloadDll
=================
*/
void Sys_UnloadDll( void *dllHandle ) {
if( !dllHandle ) {
Com_Printf("Sys_UnloadDll(NULL)\n");
return;
}
Sys_UnloadLibrary(dllHandle);
}
示例8: sysunloaddll
void
sysunloaddll(void *dllHandle)
{
if(!dllHandle){
comprintf("sysunloaddll(NULL)\n");
return;
}
Sys_UnloadLibrary(dllHandle);
}
示例9: JVM_JNI_Shutdown
static void JVM_JNI_Shutdown(void)
{
if(javaLib)
{
Sys_UnloadLibrary(javaLib);
javaLib = NULL;
}
QJNI_CreateJavaVM = NULL;
QJNI_GetCreatedJavaVMs = NULL;
}
示例10: intptr_t
/*
=================
Sys_LoadDll
Used to load a development dll instead of a virtual machine
#1 look down current path
#2 look in fs_homepath
#3 look in fs_basepath
=================
*/
void *Sys_LoadDll( const char *name, char *fqpath ,
intptr_t (**entryPoint)(int, ...),
intptr_t (*systemcalls)(intptr_t, ...) )
{
void *libHandle;
void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) );
char fname[MAX_OSPATH];
char *basepath;
char *homepath;
char *pwdpath;
char *gamedir;
assert( name );
Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
// TODO: use fs_searchpaths from files.c
pwdpath = Sys_Cwd();
basepath = Cvar_VariableString( "fs_basepath" );
homepath = Cvar_VariableString( "fs_homepath" );
gamedir = Cvar_VariableString( "fs_game" );
libHandle = Sys_TryLibraryLoad(pwdpath, gamedir, fname, fqpath);
if(!libHandle && homepath)
libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath);
if(!libHandle && basepath)
libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath);
if(!libHandle) {
Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name );
return NULL;
}
dllEntry = Sys_LoadFunction( libHandle, "dllEntry" );
*entryPoint = Sys_LoadFunction( libHandle, "vmMain" );
if ( !*entryPoint || !dllEntry )
{
Com_Printf ( "Sys_LoadDll(%s) failed to find vmMain function:\n\"%s\" !\n", name, Sys_LibraryError( ) );
Sys_UnloadLibrary(libHandle);
return NULL;
}
Com_Printf ( "Sys_LoadDll(%s) found vmMain function at %p\n", name, *entryPoint );
dllEntry( systemcalls );
return libHandle;
}
示例11: Sys_LoadCgame
/*
=================
Sys_LoadCgame
Used to hook up a development dll
=================
*/
void * Sys_LoadCgame( intptr_t (**entryPoint)(int, ...), intptr_t (*systemcalls)(intptr_t, ...) )
{
void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) );
dllEntry = ( void (*)( intptr_t (*)( intptr_t, ... ) ) )Sys_LoadFunction( game_library, "dllEntry" );
*entryPoint = (intptr_t (*)(int,...))Sys_LoadFunction( game_library, "vmMain" );
if ( !*entryPoint || !dllEntry ) {
Sys_UnloadLibrary( game_library );
return NULL;
}
dllEntry( systemcalls );
return game_library;
}
示例12: PNG_OpenLibrary
/*
====================
PNG_OpenLibrary
Try to load the PNG DLL
====================
*/
qboolean PNG_OpenLibrary (void)
{
#ifndef LINK_TO_LIBPNG
const char* dllnames [] =
{
#if WIN32
"libpng16.dll",
"libpng16-16.dll",
"libpng15-15.dll",
"libpng15.dll",
"libpng14-14.dll",
"libpng14.dll",
"libpng12.dll",
#elif defined(MACOSX)
"libpng16.16.dylib",
"libpng15.15.dylib",
"libpng14.14.dylib",
"libpng12.0.dylib",
#else
"libpng16.so",
"libpng16.so.16",
"libpng15.so.15", // WTF libtool guidelines anyone?
"libpng14.so.14", // WTF libtool guidelines anyone?
"libpng12.so.0",
"libpng.so", // FreeBSD
#endif
NULL
};
// Already loaded?
if (png_dll)
return true;
// Load the DLL
if(!Sys_LoadLibrary (dllnames, &png_dll, pngfuncs))
return false;
if(qpng_access_version_number() / 100 >= 104)
if(!Sys_LoadLibrary (dllnames, &png14_dll, png14funcs))
{
Sys_UnloadLibrary (&png_dll);
return false;
}
#endif
return true;
}
示例13: intptr_t
/*
=================
Sys_LoadDll
Used to load a development dll instead of a virtual machine
#1 look in fs_homepath
#2 look in fs_basepath
=================
*/
void *Sys_LoadDll( const char *name,
intptr_t (**entryPoint)(int, ...),
intptr_t (*systemcalls)(intptr_t, ...) )
{
void *libHandle;
void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) );
char fname[MAX_OSPATH];
char *netpath;
assert( name );
Com_sprintf(fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
netpath = FS_FindDll(fname);
if(!netpath) {
Com_Printf( "Sys_LoadDll(%s) could not find it\n", fname );
return NULL;
}
Com_Printf( "Loading DLL file: %s\n", netpath);
libHandle = Sys_LoadLibrary(netpath);
if(!libHandle) {
Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", netpath, Sys_LibraryError() );
return NULL;
}
dllEntry = Sys_LoadFunction( libHandle, "dllEntry" );
*entryPoint = Sys_LoadFunction( libHandle, "vmMain" );
if ( !*entryPoint || !dllEntry )
{
Com_Printf ( "Sys_LoadDll(%s) failed to find vmMain function:\n\"%s\" !\n", name, Sys_LibraryError( ) );
Sys_UnloadLibrary(libHandle);
return NULL;
}
Com_Printf ( "Sys_LoadDll(%s) found vmMain function at %p\n", name, *entryPoint );
dllEntry( systemcalls );
return libHandle;
}
示例14: CL_Gecko_Shutdown
void CL_Gecko_Shutdown( void ) {
int i;
for( i = 0 ; i < MAX_GECKO_INSTANCES ; i++ ) {
clgecko_t *instance = &cl_geckoinstances[ i ];
if( instance->active ) {
cl_gecko_unlinktexture( instance );
}
}
if (cl_geckoembedding != NULL)
{
osgk_release( cl_geckoembedding );
cl_geckoembedding = NULL;
}
if (osgk_dll != NULL)
{
Sys_UnloadLibrary (&osgk_dll);
}
}
示例15: Sys_UnloadDll
/*
=================
Sys_UnloadDll
=================
*/
void Sys_UnloadDll(void *dllHandle)
{
#ifdef __MORPHOS__
void (*morphos_so_deinit)(void);
#endif
if (!dllHandle)
{
Com_Printf("Sys_UnloadDll(NULL)\n");
return;
}
#ifdef __MORPHOS__
morphos_so_deinit = Sys_LoadFunction(dllHandle, "morphos_so_deinit");
if (morphos_so_deinit)
{
morphos_so_deinit();
}
#endif
Sys_UnloadLibrary(dllHandle);
}