Exemple #1
0
int dlclose( void *handle )
{
    HMODULE hModule = (HMODULE) handle;
    BOOL ret;

    current_error = NULL;

    ret = FreeLibrary( hModule );

    /* If the object was loaded with RTLD_GLOBAL, remove it from list of global
     * objects.
     */
    if( ret )
    {
        HMODULE cur = GetModuleHandle( NULL );
        global_rem( &first_object, hModule );
        if( hModule == cur )
        {
            auto_ref_count--;
            if( auto_ref_count < 0 )
                auto_ref_count = 0;
            if( !auto_ref_count )
                free_auto( );
        }
    }
    else
        save_err_ptr_str( handle );

    /* dlclose's return value in inverted in relation to FreeLibrary's. */
    ret = !ret;

    return (int) ret;
}
Exemple #2
0
int dlclose( void *handle )
{
	HMODULE hModule = (HMODULE) handle;
	BOOL ret;
	current_error = NULL;
	ret = FreeLibrary( hModule );
/* If the object was loaded with RTLD_GLOBAL, remove it from list of global
* objects.
*/
if( ret )
	global_rem( hModule );
else
	save_err_ptr_str( handle );
/* dlclose's return value in inverted in relation to FreeLibrary's. */
ret = !ret;
return (int) ret;
}
Exemple #3
0
int
dlclose(void *handle)
{
	HMODULE hModule = (HMODULE)handle;
	BOOL ret;

	current_error = NULL;

	ret = FreeLibrary(hModule);

	if (ret)
		global_rem( hModule );
	else
		save_err_ptr_str( handle );

	ret = !ret;
	return (int)ret;
}