[MPR]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 2 Jan 2017 20:16:14 +0000 (20:16 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 2 Jan 2017 20:16:14 +0000 (20:16 +0000)
Import Wine commit:
96a93ee608b2919d1a8f583002e8262ef54a6743, Enumerate connections capability before looking for functions entry points.

svn path=/trunk/; revision=73500

reactos/dll/win32/mpr/mpr_ros.diff
reactos/dll/win32/mpr/wnet.c

index cea15b7..b7f5051 100644 (file)
@@ -59,10 +59,10 @@ Index: wnet.c
  } WNetProvider, *PWNetProvider;\r
  \r
  typedef struct _WNetProviderTable\r
-@@ -214,6 +207,9 @@\r
-                         provider->addConnection = MPR_GETPROC(NPAddConnection);\r
-                         provider->addConnection3 = MPR_GETPROC(NPAddConnection3);\r
-                         provider->cancelConnection = MPR_GETPROC(NPCancelConnection);\r
+@@ -219,6 +212,10 @@\r
+                             provider->addConnection3 = MPR_GETPROC(NPAddConnection3);\r
+                         if (connectCap & WNNC_CON_CANCELCONNECTION)\r
+                             provider->cancelConnection = MPR_GETPROC(NPCancelConnection);\r
 +#ifdef __REACTOS__\r
 +                        if (connectCap & WNNC_CON_GETCONNECTIONS)\r
 +                            provider->getConnection = MPR_GETPROC(NPGetConnection);\r
@@ -70,7 +70,7 @@ Index: wnet.c
                          TRACE("NPAddConnection %p\n", provider->addConnection);\r
                          TRACE("NPAddConnection3 %p\n", provider->addConnection3);\r
                          TRACE("NPCancelConnection %p\n", provider->cancelConnection);\r
-@@ -251,6 +247,85 @@\r
+@@ -256,6 +253,85 @@\r
           debugstr_w(provider));\r
  }\r
  \r
@@ -156,7 +156,7 @@ Index: wnet.c
  void wnetInit(HINSTANCE hInstDll)\r
  {\r
      static const WCHAR providerOrderKey[] = { 'S','y','s','t','e','m','\\',\r
-@@ -329,6 +404,64 @@\r
+@@ -334,6 +410,64 @@\r
          }\r
          RegCloseKey(hKey);\r
      }\r
@@ -221,7 +221,7 @@ Index: wnet.c
  }\r
  \r
  void wnetFree(void)\r
-@@ -1870,6 +2003,43 @@\r
+@@ -1875,6 +2009,43 @@\r
          }\r
      }\r
  \r
@@ -265,7 +265,7 @@ Index: wnet.c
      return ret;\r
  }\r
  \r
-@@ -2061,6 +2231,37 @@\r
+@@ -2066,6 +2237,37 @@\r
              }\r
          }\r
      }\r
@@ -303,7 +303,7 @@ Index: wnet.c
      return ret;\r
  }\r
  \r
-@@ -2188,6 +2389,7 @@\r
+@@ -2193,6 +2395,7 @@\r
  /* find the network connection for a given drive; helper for WNetGetConnection */\r
  static DWORD get_drive_connection( WCHAR letter, LPWSTR remote, LPDWORD size )\r
  {\r
@@ -311,7 +311,7 @@ Index: wnet.c
      char buffer[1024];\r
      struct mountmgr_unix_drive *data = (struct mountmgr_unix_drive *)buffer;\r
      HANDLE mgr;\r
-@@ -2230,6 +2432,32 @@\r
+@@ -2235,6 +2438,32 @@\r
      }\r
      CloseHandle( mgr );\r
      return ret;\r
index 1cdddeb..77c0985 100644 (file)
@@ -209,7 +209,7 @@ static void _tryLoadProvider(PCWSTR provider)
                         if (connectCap & WNNC_CON_ADDCONNECTION)
                             provider->addConnection = MPR_GETPROC(NPAddConnection);
                         if (connectCap & WNNC_CON_ADDCONNECTION3)
-                        provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
+                            provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
                         if (connectCap & WNNC_CON_CANCELCONNECTION)
                             provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
 #ifdef __REACTOS__