Commit 96a93ee6 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

mpr: Enumerate connections capability before looking for functions entry points.

parent d961f5ac
......@@ -178,6 +178,7 @@ static void _tryLoadProvider(PCWSTR provider)
TRACE("loaded lib %p\n", hLib);
if (getCaps)
{
DWORD connectCap;
PWNetProvider provider =
&providerTable->table[providerTable->numProviders];
......@@ -211,9 +212,13 @@ static void _tryLoadProvider(PCWSTR provider)
WARN("Couldn't load enumeration functions\n");
}
}
provider->addConnection = MPR_GETPROC(NPAddConnection);
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
connectCap = getCaps(WNNC_CONNECTION);
if (connectCap & WNNC_CON_ADDCONNECTION)
provider->addConnection = MPR_GETPROC(NPAddConnection);
if (connectCap & WNNC_CON_ADDCONNECTION3)
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
if (connectCap & WNNC_CON_CANCELCONNECTION)
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
TRACE("NPAddConnection %p\n", provider->addConnection);
TRACE("NPAddConnection3 %p\n", provider->addConnection3);
TRACE("NPCancelConnection %p\n", provider->cancelConnection);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment