Author: pschweitzer
Date: Fri Dec 30 20:30:28 2016
New Revision: 73489
URL:
http://svn.reactos.org/svn/reactos?rev=73489&view=rev
Log:
[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
Modified:
trunk/reactos/dll/win32/mpr/mpr_ros.diff
trunk/reactos/dll/win32/mpr/wnet.c
Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_ros.diff…
==============================================================================
--- trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] Fri Dec 30 20:30:28 2016
@@ -64,7 +64,8 @@
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);
Modified: trunk/reactos/dll/win32/mpr/wnet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=7…
==============================================================================
--- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Fri Dec 30 20:30:28 2016
@@ -171,6 +171,7 @@
TRACE("loaded lib %p\n", hLib);
if (getCaps)
{
+ DWORD connectCap;
PWNetProvider provider =
&providerTable->table[providerTable->numProviders];
@@ -204,11 +205,16 @@
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);