mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:21:38 +00:00
[MPR]
Enumerate connections capability before looking for functions entry points. This is a major fix, because it allows VBoxSF to work without a hack, and without necessarily make a connection from the NP to the VBoxSF driver. Already sent upstream. ROSAPPS-303 CORE-11757 svn path=/trunk/; revision=73489
This commit is contained in:
parent
3fb8dc2d64
commit
68bcda65e2
2 changed files with 11 additions and 4 deletions
|
@ -64,7 +64,8 @@ Index: wnet.c
|
|||
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
|
||||
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
|
||||
+#ifdef __REACTOS__
|
||||
+ provider->getConnection = MPR_GETPROC(NPGetConnection);
|
||||
+ if (connectCap & WNNC_CON_GETCONNECTIONS)
|
||||
+ provider->getConnection = MPR_GETPROC(NPGetConnection);
|
||||
+#endif
|
||||
TRACE("NPAddConnection %p\n", provider->addConnection);
|
||||
TRACE("NPAddConnection3 %p\n", provider->addConnection3);
|
||||
|
|
|
@ -171,6 +171,7 @@ static void _tryLoadProvider(PCWSTR provider)
|
|||
TRACE("loaded lib %p\n", hLib);
|
||||
if (getCaps)
|
||||
{
|
||||
DWORD connectCap;
|
||||
PWNetProvider provider =
|
||||
&providerTable->table[providerTable->numProviders];
|
||||
|
||||
|
@ -204,11 +205,16 @@ static void _tryLoadProvider(PCWSTR provider)
|
|||
WARN("Couldn't load enumeration functions\n");
|
||||
}
|
||||
}
|
||||
provider->addConnection = MPR_GETPROC(NPAddConnection);
|
||||
connectCap = getCaps(WNNC_CONNECTION);
|
||||
if (connectCap & WNNC_CON_ADDCONNECTION)
|
||||
provider->addConnection = MPR_GETPROC(NPAddConnection);
|
||||
if (connectCap & WNNC_CON_ADDCONNECTION3)
|
||||
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
|
||||
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
|
||||
if (connectCap & WNNC_CON_CANCELCONNECTION)
|
||||
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
|
||||
#ifdef __REACTOS__
|
||||
provider->getConnection = MPR_GETPROC(NPGetConnection);
|
||||
if (connectCap & WNNC_CON_GETCONNECTIONS)
|
||||
provider->getConnection = MPR_GETPROC(NPGetConnection);
|
||||
#endif
|
||||
TRACE("NPAddConnection %p\n", provider->addConnection);
|
||||
TRACE("NPAddConnection3 %p\n", provider->addConnection3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue