[MPR]
[reactos.git] / reactos / dll / win32 / mpr / mpr_ros.diff
1 Index: mpr.spec
2 ===================================================================
3 --- mpr.spec (revision 49877)
4 +++ mpr.spec (working copy)
5 @@ -1,23 +1,23 @@
6 # ordinal exports
7 - 1 stub @
8 - 2 stub @
9 - 3 stub @
10 - 4 stub @
11 - 5 stub @
12 - 6 stub @
13 - 7 stub @
14 - 8 stub @
15 - 9 stub @
16 -12 stub @
17 -13 stub @
18 -14 stub @
19 -15 stub @
20 -16 stub @
21 -17 stub @
22 -18 stub @
23 -19 stub @
24 -20 stub @
25 -21 stub @
26 + 1 stub MPR_1
27 + 2 stub MPR_2
28 + 3 stub MPR_3
29 + 4 stub MPR_4
30 + 5 stub MPR_5
31 + 6 stub MPR_6
32 + 7 stub MPR_7
33 + 8 stub MPR_8
34 + 9 stub MPR_9
35 +12 stub MPR_12
36 +13 stub MPR_13
37 +14 stub MPR_14
38 +15 stub MPR_15
39 +16 stub MPR_16
40 +17 stub MPR_17
41 +18 stub MPR_18
42 +19 stub MPR_19
43 +20 stub MPR_20
44 +21 stub MPR_21
45 22 stdcall @(long) MPR_Alloc
46 23 stdcall @(ptr long) MPR_ReAlloc
47 24 stdcall @(ptr) MPR_Free
48 Index: wnet.c
49 ===================================================================
50 --- wnet.c (revision 71983)
51 +++ wnet.c (working copy)
52 @@ -48,6 +48,9 @@
53 PF_NPGetResourceInformation getResourceInformation;
54 PF_NPAddConnection addConnection;
55 PF_NPAddConnection3 addConnection3;
56 +#ifdef __REACTOS__
57 + PF_NPGetConnection getConnection;
58 +#endif
59 } WNetProvider, *PWNetProvider;
60
61 typedef struct _WNetProviderTable
62 @@ -196,6 +199,9 @@
63 }
64 provider->addConnection = MPR_GETPROC(NPAddConnection);
65 provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
66 +#ifdef __REACTOS__
67 + provider->getConnection = MPR_GETPROC(NPGetConnection);
68 +#endif
69 TRACE("NPAddConnection %p\n", provider->addConnection);
70 TRACE("NPAddConnection3 %p\n", provider->addConnection3);
71 providerTable->numProviders++;
72 @@ -1949,6 +1955,7 @@
73 /* find the network connection for a given drive; helper for WNetGetConnection */
74 static DWORD get_drive_connection( WCHAR letter, LPWSTR remote, LPDWORD size )
75 {
76 +#ifndef __REACTOS__
77 char buffer[1024];
78 struct mountmgr_unix_drive *data = (struct mountmgr_unix_drive *)buffer;
79 HANDLE mgr;
80 @@ -1991,6 +1998,32 @@
81 }
82 CloseHandle( mgr );
83 return ret;
84 +#else
85 + DWORD ret = WN_NO_NETWORK;
86 + DWORD index;
87 + WCHAR local[3] = {letter, ':', 0};
88 +
89 + if (providerTable != NULL)
90 + {
91 + for (index = 0; index < providerTable->numProviders; index++)
92 + {
93 + if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
94 + WNNC_CON_GETCONNECTIONS)
95 + {
96 + if (providerTable->table[index].getConnection)
97 + ret = providerTable->table[index].getConnection(
98 + local, remote, size);
99 + else
100 + ret = WN_NO_NETWORK;
101 + if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
102 + break;
103 + }
104 + }
105 + }
106 + if (ret)
107 + SetLastError(ret);
108 + return ret;
109 +#endif
110 }
111
112 /**************************************************************************