Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 31 of file misc.c.
Referenced by SetupDiCallClassInstaller(), and SetupDiGetClassDevPropertySheetsW().
{ HMODULE hModule = NULL; LPSTR FunctionNameA = NULL; PWCHAR Comma; DWORD rc; *ModulePointer = NULL; *FunctionPointer = NULL; Comma = strchrW(InstallerName, ','); if (!Comma) { rc = ERROR_INVALID_PARAMETER; goto cleanup; } /* Load library */ *Comma = '\0'; hModule = LoadLibraryW(InstallerName); *Comma = ','; if (!hModule) { rc = GetLastError(); goto cleanup; } /* Skip comma spaces */ while (*Comma == ',' || isspaceW(*Comma)) Comma++; /* W->A conversion for function name */ FunctionNameA = pSetupUnicodeToMultiByte(Comma, CP_ACP); if (!FunctionNameA) { rc = GetLastError(); goto cleanup; } /* Search function */ *FunctionPointer = GetProcAddress(hModule, FunctionNameA); if (!*FunctionPointer) { rc = GetLastError(); goto cleanup; } *ModulePointer = hModule; rc = ERROR_SUCCESS; cleanup: if (rc != ERROR_SUCCESS && hModule) FreeLibrary(hModule); MyFree(FunctionNameA); return rc; }