ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

BOOL WINAPI FreeLibrary ( HINSTANCE  hLibModule)

Definition at line 442 of file loader.c.

Referenced by _mesa_dlclose(), _tryLoadProvider(), _tWinMain(), _unloaddll(), ACTION_CallDllFunction(), add_zone_to_listview(), AddMonitorW(), AddNetIdPage(), AddProvider(), backend_load(), backend_unload_all(), CheckNtMartaPresent(), ClientLoadLibrary(), CloseDriver(), CoFreeLibrary(), CommandLineFromMsiDescriptor(), CommConfigDialogW(), COMPOBJ_DllList_Add(), COMPOBJ_DllList_ReleaseRef(), Control_UnloadApplet(), CPlApplet(), CRYPT_CreateKeyProv(), CRYPT_GetFuncFromDll(), CRYPT_GetFuncFromReg(), CRYPT_LoadProvider(), CRYPT_LoadSIP(), CRYPT_LoadSIPFuncFromKey(), crypt_sip_free(), CryptAcquireContextW(), CryptFreeOIDFunctionAddress(), CryptGetDefaultOIDFunctionAddress(), CryptReleaseContext(), CryptSIPRetrieveSubjectGuid(), DefineDosDeviceW(), DeleteHooks(), DeskCplExtDisplaySaveSettings(), DeviceAdvancedPropertiesW(), DeviceCreateHardwarePageEx(), DeviceProblemWizardW(), DevicePropertiesExW(), DisplayAdvancedSettings(), DllMain(), do_register_dll(), DoDllRegisterServer(), DoDllUnregisterServer(), DoMessageBox(), DP_DestroyDirectPlay2(), DP_InitializeDPLSP(), DP_InitializeDPSP(), DRIVER_TryOpenDriver32(), EndUserApiHook(), EngFreeModule(), ExtractFilesA(), ExtractFilesFromCab(), FGetComponentPath(), free_package_structures(), FreeFunctionPointer(), FreeServices(), get_corversion(), GetDefaultCommConfigW(), GetEventCategory(), GetEventMessage(), GetFileNameFromBrowse(), GetFileNamePreview(), GetFileVersionInfoSizeW(), GetFileVersionInfoW(), GetFunctionPointer(), GetLayoutName(), GetUIVersion(), GuiConsoleHandleNcDestroy(), HardwareDlgProc(), http_release_netconn(), IMM_FreeAllImmHkl(), IMM_GetImmHkl(), init_function_pointers(), init_xpcom(), InitializeAclUiDll(), install_cab(), ITERATE_RegisterTypeLibraries(), LaunchDeviceManager(), load_mono(), LoadAndInitComctl32(), LoadCardBitmaps(), LoadDynamicImports(), LoadGina(), LoadProc(), LoadTheSpoolerDrv(), main(), MLFreeLibrary(), monitor_unload(), MSACM_DllEntryPoint(), msi_destroy_assembly_caches(), msi_destroy_control(), msi_dialog_scrolltext_control(), MSSTYLES_CloseThemeFile(), MSSTYLES_OpenThemeFile(), myAddPrinterDriverEx(), NotifyLogon(), OPENGL32_InitializeDriver(), OPENGL32_UnloadDriver(), OpenGLEnable(), parse_url_from_outside(), PickIconDlg(), PickIconProc(), PlaySoundRoutine(), printm(), process_detach(), profile_items_callback(), propset_private_tests(), rand_s(), reg_install(), register_dll(), register_ocxs_callback(), RegisterDeviceNotificationW(), RegisterOCX(), RegLoadMUIStringW(), ATL::CRegObject::resource_register(), resource_register(), ResProtocol_Start(), RunDlgProc(), RunDLL(), RunFile(), RunLiveCD(), RunNewSetup(), SearchScreenSavers(), SetDefaultCommConfigW(), SHCoCreateInstance(), SHLoadIndirectString(), show_cert_dialog(), ShowAdapterProperties(), ShowMonitorProperties(), SRSetRestorePointA(), SRSetRestorePointW(), TaskManager_OnFileNew(), TLB_PEFile_Release(), UIINSERTOBJECTDLG_AddControl(), unload_mapi_providers(), unload_mspatch(), UnloadAclUiDll(), UnloadAppInitDlls(), UnloadCABINETDll(), UnloadDynamicImports(), UnloadGLUTesselator(), UnloadNtMarta(), UnloadProvider(), UnregisterDeviceNotification(), VersionRegisterClass(), WhichPlatform(), wine_dlclose(), WinMain(), WsNpDelete(), WsNpInitialize(), WspiapiLoad(), WsRasUninitializeAutodial(), WsTpDelete(), and wWinMain().

{
    NTSTATUS Status;
    PIMAGE_NT_HEADERS NtHeaders;

    if (LDR_IS_DATAFILE(hLibModule))
    {
        // FIXME: This SEH should go inside RtlImageNtHeader instead
        _SEH2_TRY
        {
            /* This is a LOAD_LIBRARY_AS_DATAFILE module, check if it's a valid one */
            NtHeaders = RtlImageNtHeader((PVOID)((ULONG_PTR)hLibModule & ~1));
        }
        _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
        {
            NtHeaders = NULL;
        } _SEH2_END

        if (NtHeaders)
        {
            /* Unmap view */
            Status = NtUnmapViewOfSection(NtCurrentProcess(), (PVOID)((ULONG_PTR)hLibModule & ~1));

            /* Unload alternate resource module */
            LdrUnloadAlternateResourceModule(hLibModule);
        }
        else
            Status = STATUS_INVALID_IMAGE_FORMAT;
    }
    else
    {
        /* Just unload it */
        Status = LdrUnloadDll((PVOID)hLibModule);
    }

    /* Check what kind of status we got */
    if (!NT_SUCCESS(Status))
    {
        /* Set last error */
        BaseSetLastNTError(Status);

        /* Return failure */
        return FALSE;
    }

    /* Return success */
    return TRUE;
}

Generated on Sun May 27 2012 04:47:21 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.