mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1607990 - Link to WSCGetProviderInfo at compile time. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D59262 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
51c21554f5
commit
dc4c3ca267
@ -99,23 +99,14 @@ LSPAnnotationGatherer::Run() {
|
||||
}
|
||||
|
||||
str.AppendLiteral(" : ");
|
||||
// If WSCGetProviderInfo is available, we should call it to obtain the
|
||||
// category flags for this provider. When present, these flags inform
|
||||
// Windows as to which order to chain the providers.
|
||||
nsModuleHandle ws2_32(LoadLibraryW(L"ws2_32.dll"));
|
||||
if (ws2_32) {
|
||||
decltype(WSCGetProviderInfo)* pWSCGetProviderInfo =
|
||||
reinterpret_cast<decltype(WSCGetProviderInfo)*>(
|
||||
GetProcAddress(ws2_32, "WSCGetProviderInfo"));
|
||||
if (pWSCGetProviderInfo) {
|
||||
DWORD categoryInfo;
|
||||
size_t categoryInfoSize = sizeof(categoryInfo);
|
||||
if (!pWSCGetProviderInfo(
|
||||
&providers[i].ProviderId, ProviderInfoLspCategories,
|
||||
(PBYTE)&categoryInfo, &categoryInfoSize, 0, &err)) {
|
||||
str.AppendPrintf("0x%x", categoryInfo);
|
||||
}
|
||||
}
|
||||
// Call WSCGetProviderInfo to obtain the category flags for this provider.
|
||||
// When present, these flags inform Windows as to which order to chain the
|
||||
// providers.
|
||||
DWORD categoryInfo;
|
||||
size_t categoryInfoSize = sizeof(categoryInfo);
|
||||
if (!WSCGetProviderInfo(&providers[i].ProviderId, ProviderInfoLspCategories,
|
||||
(PBYTE)&categoryInfo, &categoryInfoSize, 0, &err)) {
|
||||
str.AppendPrintf("0x%lx", categoryInfo);
|
||||
}
|
||||
|
||||
str.AppendLiteral(" : ");
|
||||
|
Loading…
Reference in New Issue
Block a user