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

static BOOLEAN AddProvider ( IN PCUNICODE_STRING  FileSystem,
IN PWCHAR  DllFile 
) [static]

Definition at line 37 of file init.c.

Referenced by InitializeFmIfsOnce().

{
    PIFS_PROVIDER Provider = NULL;
    ULONG RequiredSize;
    HMODULE hMod = NULL;
    BOOLEAN ret = FALSE;

    hMod = LoadLibraryW(DllFile);
    if (!hMod)
        goto cleanup;

    RequiredSize = FIELD_OFFSET(IFS_PROVIDER, Name)
        + FileSystem->Length + sizeof(UNICODE_NULL);
    Provider = (PIFS_PROVIDER)RtlAllocateHeap(
        RtlGetProcessHeap(),
        0,
        RequiredSize);
    if (!Provider)
        goto cleanup;
    RtlZeroMemory(Provider, RequiredSize);

    /* Get function pointers */
    Provider->ChkdskEx = (CHKDSKEX)GetProcAddress(hMod, "ChkdskEx");
    //Provider->Extend = (EXTEND)GetProcAddress(hMod, "Extend");
    Provider->FormatEx = (FORMATEX)GetProcAddress(hMod, "FormatEx");

    RtlCopyMemory(Provider->Name, FileSystem->Buffer, FileSystem->Length);

    InsertTailList(&ProviderListHead, &Provider->ListEntry);
    ret = TRUE;

cleanup:
    if (!ret)
    {
        if (hMod)
            FreeLibrary(hMod);
        if (Provider)
            RtlFreeHeap(RtlGetProcessHeap(), 0, Provider);
    }
    return ret;
}

Generated on Sun May 27 2012 05:08:58 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.