Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 1 | /* |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 2 | * USER Windows Network functions |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 3 | */ |
| 4 | |
Alexandre Julliard | 594997c | 1995-04-30 10:05:20 +0000 | [diff] [blame] | 5 | #include <ctype.h> |
David Luyer | ee517e8 | 1999-02-28 12:27:56 +0000 | [diff] [blame] | 6 | #include <string.h> |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 7 | #include <sys/types.h> |
| 8 | #include <pwd.h> |
| 9 | #include <unistd.h> |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 10 | |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 11 | #include "winbase.h" |
| 12 | #include "wine/winnet16.h" |
Marcus Meissner | 04c3e1d | 1999-02-19 10:37:02 +0000 | [diff] [blame] | 13 | #include "winnetwk.h" |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 14 | #include "debugtools.h" |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 15 | |
Dimitrie O. Paun | 529da54 | 2000-11-27 23:54:25 +0000 | [diff] [blame] | 16 | DEFAULT_DEBUG_CHANNEL(wnet); |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 17 | |
| 18 | /* |
| 19 | * Remote printing |
| 20 | */ |
| 21 | |
| 22 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 23 | * WNetOpenJob [USER.501] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 24 | */ |
| 25 | WORD WINAPI WNetOpenJob16( LPSTR szQueue, LPSTR szJobTitle, WORD nCopies, LPINT16 pfh ) |
| 26 | { |
| 27 | FIXME( "(%s, %s, %d, %p): stub\n", |
| 28 | debugstr_a(szQueue), debugstr_a(szJobTitle), nCopies, pfh ); |
| 29 | return WN16_NET_ERROR; |
| 30 | } |
| 31 | |
| 32 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 33 | * WNetCloseJob [USER.502] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 34 | */ |
| 35 | WORD WINAPI WNetCloseJob16( WORD fh, LPINT16 pidJob, LPSTR szQueue ) |
| 36 | { |
| 37 | FIXME( "(%d, %p, %s): stub\n", fh, pidJob, debugstr_a(szQueue) ); |
| 38 | return WN16_NET_ERROR; |
| 39 | } |
| 40 | |
| 41 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 42 | * WNetWriteJob [USER.524] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 43 | */ |
| 44 | WORD WINAPI WNetWriteJob16( HANDLE16 hJob, LPSTR lpData, LPINT16 lpcbData ) |
| 45 | { |
| 46 | FIXME( "(%04x, %p, %p): stub\n", hJob, lpData, lpcbData ); |
| 47 | return WN16_NET_ERROR; |
| 48 | } |
| 49 | |
| 50 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 51 | * WNetAbortJob [USER.503] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 52 | */ |
| 53 | WORD WINAPI WNetAbortJob16( LPSTR szQueue, WORD wJobId ) |
| 54 | { |
| 55 | FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId ); |
| 56 | return WN16_NET_ERROR; |
| 57 | } |
| 58 | |
| 59 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 60 | * WNetHoldJob [USER.504] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 61 | */ |
| 62 | WORD WINAPI WNetHoldJob16( LPSTR szQueue, WORD wJobId ) |
| 63 | { |
| 64 | FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId ); |
| 65 | return WN16_NET_ERROR; |
| 66 | } |
| 67 | |
| 68 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 69 | * WNetReleaseJob [USER.505] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 70 | */ |
| 71 | WORD WINAPI WNetReleaseJob16( LPSTR szQueue, WORD wJobId ) |
| 72 | { |
| 73 | FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId ); |
| 74 | return WN16_NET_ERROR; |
| 75 | } |
| 76 | |
| 77 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 78 | * WNetCancelJob [USER.506] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 79 | */ |
| 80 | WORD WINAPI WNetCancelJob16( LPSTR szQueue, WORD wJobId ) |
| 81 | { |
| 82 | FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId ); |
| 83 | return WN16_NET_ERROR; |
| 84 | } |
| 85 | |
| 86 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 87 | * WNetSetJobCopies [USER.507] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 88 | */ |
| 89 | WORD WINAPI WNetSetJobCopies16( LPSTR szQueue, WORD wJobId, WORD nCopies ) |
| 90 | { |
| 91 | FIXME( "(%s, %d, %d): stub\n", debugstr_a(szQueue), wJobId, nCopies ); |
| 92 | return WN16_NET_ERROR; |
| 93 | } |
| 94 | |
| 95 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 96 | * WNetWatchQueue [USER.508] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 97 | */ |
| 98 | WORD WINAPI WNetWatchQueue16( HWND16 hWnd, LPSTR szLocal, LPSTR szUser, WORD nQueue ) |
| 99 | { |
| 100 | FIXME( "(%04x, %s, %s, %d): stub\n", |
| 101 | hWnd, debugstr_a(szLocal), debugstr_a(szUser), nQueue ); |
| 102 | return WN16_NET_ERROR; |
| 103 | } |
| 104 | |
| 105 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 106 | * WNetUnwatchQueue [USER.509] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 107 | */ |
| 108 | WORD WINAPI WNetUnwatchQueue16( LPSTR szQueue ) |
| 109 | { |
| 110 | FIXME( "(%s): stub\n", debugstr_a(szQueue) ); |
| 111 | return WN16_NET_ERROR; |
| 112 | } |
| 113 | |
| 114 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 115 | * WNetLockQueueData [USER.510] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 116 | */ |
| 117 | WORD WINAPI WNetLockQueueData16( LPSTR szQueue, LPSTR szUser, |
| 118 | LPQUEUESTRUCT16 *lplpQueueStruct ) |
| 119 | { |
| 120 | FIXME( "(%s, %s, %p): stub\n", |
| 121 | debugstr_a(szQueue), debugstr_a(szUser), lplpQueueStruct ); |
| 122 | return WN16_NET_ERROR; |
| 123 | } |
| 124 | |
| 125 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 126 | * WNetUnlockQueueData [USER.511] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 127 | */ |
| 128 | WORD WINAPI WNetUnlockQueueData16( LPSTR szQueue ) |
| 129 | { |
| 130 | FIXME( "(%s): stub\n", debugstr_a(szQueue) ); |
| 131 | return WN16_NET_ERROR; |
| 132 | } |
| 133 | |
| 134 | |
| 135 | /* |
| 136 | * Connections |
| 137 | */ |
Patrik Stridvall | b4b9fae | 1999-04-19 14:56:29 +0000 | [diff] [blame] | 138 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 139 | /******************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 140 | * WNetAddConnection [USER.517] Directs a local device to net |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 141 | * |
| 142 | * Redirects a local device (either a disk drive or printer port) |
| 143 | * to a shared device on a remote server. |
| 144 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 145 | WORD WINAPI WNetAddConnection16( LPSTR lpNetPath, LPSTR lpPassWord, |
| 146 | LPSTR lpLocalName ) |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 147 | { |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 148 | FIXME( "(%s, %p, %s): stub\n", |
| 149 | debugstr_a(lpNetPath), lpPassWord, debugstr_a(lpLocalName) ); |
| 150 | return WN16_NET_ERROR; |
Andreas Mohr | 1f0f482 | 1998-11-07 12:38:07 +0000 | [diff] [blame] | 151 | } |
| 152 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 153 | /******************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 154 | * WNetCancelConnection [USER.518] undirects a local device |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 155 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 156 | WORD WINAPI WNetCancelConnection16( LPSTR lpName, BOOL16 bForce ) |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 157 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 158 | FIXME( "(%s, %04X): stub\n", debugstr_a(lpName), bForce); |
| 159 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 160 | } |
| 161 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 162 | /******************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 163 | * WNetGetConnection [USER.512] reverse-resolves a local device |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 164 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 165 | WORD WINAPI WNetGetConnection16( LPSTR lpLocalName, |
| 166 | LPSTR lpRemoteName, UINT16 *cbRemoteName ) |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 167 | { |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 168 | char label[32]; |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 169 | |
| 170 | TRACE( "local %s\n", lpLocalName ); |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 171 | switch(GetDriveTypeA(lpLocalName)) |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 172 | { |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 173 | case DRIVE_REMOTE: |
| 174 | GetVolumeInformationA( lpLocalName, label, sizeof(label), NULL, NULL, NULL, NULL, 0 ); |
| 175 | if (strlen(label) + 1 > *cbRemoteName) |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 176 | { |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 177 | *cbRemoteName = strlen(label) + 1; |
| 178 | return WN16_MORE_DATA; |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 179 | } |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 180 | strcpy( lpRemoteName, label ); |
| 181 | *cbRemoteName = strlen(lpRemoteName) + 1; |
| 182 | return WN16_SUCCESS; |
| 183 | case DRIVE_REMOVABLE: |
| 184 | case DRIVE_FIXED: |
| 185 | case DRIVE_CDROM: |
| 186 | TRACE("file is local\n"); |
| 187 | return WN16_NOT_CONNECTED; |
| 188 | default: |
| 189 | return WN16_BAD_LOCALNAME; |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 190 | } |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 191 | } |
Alexandre Julliard | 594997c | 1995-04-30 10:05:20 +0000 | [diff] [blame] | 192 | |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 193 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 194 | * WNetRestoreConnection [USER.523] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 195 | */ |
| 196 | WORD WINAPI WNetRestoreConnection16( HWND16 hwndOwner, LPSTR lpszDevice ) |
| 197 | { |
| 198 | FIXME( "(%04x, %s): stub\n", hwndOwner, debugstr_a(lpszDevice) ); |
| 199 | return WN16_NOT_SUPPORTED; |
| 200 | } |
| 201 | |
| 202 | |
| 203 | /* |
| 204 | * Capabilities |
| 205 | */ |
| 206 | |
| 207 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 208 | * WNetGetCaps [USER.513] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 209 | */ |
| 210 | WORD WINAPI WNetGetCaps16( WORD capability ) |
| 211 | { |
| 212 | switch (capability) |
Alexandre Julliard | 594997c | 1995-04-30 10:05:20 +0000 | [diff] [blame] | 213 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 214 | case WNNC16_SPEC_VERSION: |
| 215 | return 0x30a; /* WfW 3.11 (and apparently other 3.1x) */ |
| 216 | |
| 217 | case WNNC16_NET_TYPE: |
| 218 | /* hi byte = network type, |
| 219 | lo byte = network vendor (Netware = 0x03) [15 types] */ |
| 220 | return WNNC16_NET_MultiNet | WNNC16_SUBNET_WinWorkgroups; |
| 221 | |
| 222 | case WNNC16_DRIVER_VERSION: |
| 223 | /* driver version of vendor */ |
| 224 | return 0x100; /* WfW 3.11 */ |
| 225 | |
| 226 | case WNNC16_USER: |
| 227 | /* 1 = WNetGetUser is supported */ |
| 228 | return 1; |
| 229 | |
| 230 | case WNNC16_CONNECTION: |
| 231 | /* returns mask of the supported connection functions */ |
| 232 | return WNNC16_CON_AddConnection | WNNC16_CON_CancelConnection |
| 233 | | WNNC16_CON_GetConnections /* | WNNC16_CON_AutoConnect */ |
| 234 | | WNNC16_CON_BrowseDialog | WNNC16_CON_RestoreConnection; |
| 235 | |
| 236 | case WNNC16_PRINTING: |
| 237 | /* returns mask of the supported printing functions */ |
| 238 | return WNNC16_PRT_OpenJob | WNNC16_PRT_CloseJob | WNNC16_PRT_HoldJob |
| 239 | | WNNC16_PRT_ReleaseJob | WNNC16_PRT_CancelJob |
| 240 | | WNNC16_PRT_SetJobCopies | WNNC16_PRT_WatchQueue |
| 241 | | WNNC16_PRT_UnwatchQueue | WNNC16_PRT_LockQueueData |
| 242 | | WNNC16_PRT_UnlockQueueData | WNNC16_PRT_AbortJob |
| 243 | | WNNC16_PRT_WriteJob; |
| 244 | |
| 245 | case WNNC16_DIALOG: |
| 246 | /* returns mask of the supported dialog functions */ |
| 247 | return WNNC16_DLG_DeviceMode | WNNC16_DLG_BrowseDialog |
| 248 | | WNNC16_DLG_ConnectDialog | WNNC16_DLG_DisconnectDialog |
| 249 | | WNNC16_DLG_ViewQueueDialog | WNNC16_DLG_PropertyDialog |
| 250 | | WNNC16_DLG_ConnectionDialog |
| 251 | /* | WNNC16_DLG_PrinterConnectDialog |
| 252 | | WNNC16_DLG_SharesDialog | WNNC16_DLG_ShareAsDialog */; |
| 253 | |
| 254 | case WNNC16_ADMIN: |
| 255 | /* returns mask of the supported administration functions */ |
| 256 | /* not sure if long file names is a good idea */ |
| 257 | return WNNC16_ADM_GetDirectoryType |
| 258 | /* | WNNC16_ADM_DirectoryNotify */ /*not yet supported*/ |
| 259 | | WNNC16_ADM_LongNames /* | WNNC16_ADM_SetDefaultDrive */; |
| 260 | |
| 261 | case WNNC16_ERROR: |
| 262 | /* returns mask of the supported error functions */ |
| 263 | return WNNC16_ERR_GetError | WNNC16_ERR_GetErrorText; |
| 264 | |
| 265 | case WNNC16_PRINTMGREXT: |
| 266 | /* returns the Print Manager version in major and |
| 267 | minor format if Print Manager functions are available */ |
| 268 | return 0x30e; /* printman version of WfW 3.11 */ |
| 269 | |
| 270 | case 0xffff: |
| 271 | /* Win 3.11 returns HMODULE of network driver here |
| 272 | FIXME: what should we return ? |
| 273 | logonoff.exe needs it, msmail crashes with wrong value */ |
| 274 | return 0; |
| 275 | |
| 276 | default: |
| 277 | return 0; |
Alexandre Julliard | 594997c | 1995-04-30 10:05:20 +0000 | [diff] [blame] | 278 | } |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 279 | } |
| 280 | |
| 281 | |
| 282 | /* |
| 283 | * Get User |
| 284 | */ |
| 285 | |
| 286 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 287 | * WNetGetUser [USER.516] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 288 | */ |
Ron Gage | 7bfd079 | 2000-03-28 20:41:46 +0000 | [diff] [blame] | 289 | WORD WINAPI WNetGetUser16( LPCSTR lpName, LPSTR szUser, LPINT16 nBufferSize ) |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 290 | { |
Ron Gage | 7bfd079 | 2000-03-28 20:41:46 +0000 | [diff] [blame] | 291 | FIXME( "(%p, %p, %p): stub\n", lpName, szUser, nBufferSize ); |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 292 | return WN16_NOT_SUPPORTED; |
| 293 | } |
| 294 | |
| 295 | |
| 296 | /* |
| 297 | * Browsing |
| 298 | */ |
| 299 | |
| 300 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 301 | * WNetDeviceMode [USER.514] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 302 | */ |
| 303 | WORD WINAPI WNetDeviceMode16( HWND16 hWndOwner ) |
| 304 | { |
| 305 | FIXME( "(%04x): stub\n", hWndOwner ); |
| 306 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 310 | * WNetBrowseDialog [USER.515] |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 311 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 312 | WORD WINAPI WNetBrowseDialog16( HWND16 hParent, WORD nType, LPSTR szPath ) |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 313 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 314 | FIXME( "(%04x, %x, %s): stub\n", hParent, nType, szPath ); |
| 315 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 316 | } |
| 317 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 318 | /******************************************************************** |
Patrik Stridvall | 54fe838 | 2000-04-06 20:21:16 +0000 | [diff] [blame] | 319 | * WNetConnectDialog [USER.525] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 320 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 321 | WORD WINAPI WNetConnectDialog( HWND16 hWndParent, WORD iType ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 322 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 323 | FIXME( "(%04x, %x): stub\n", hWndParent, iType ); |
| 324 | return WN16_SUCCESS; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 328 | * WNetDisconnectDialog [USER.526] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 329 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 330 | WORD WINAPI WNetDisconnectDialog16( HWND16 hwndOwner, WORD iType ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 331 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 332 | FIXME( "(%04x, %x): stub\n", hwndOwner, iType ); |
| 333 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 334 | } |
| 335 | |
| 336 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 337 | * WNetConnectionDialog [USER.527] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 338 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 339 | WORD WINAPI WNetConnectionDialog16( HWND16 hWndParent, WORD iType ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 340 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 341 | FIXME( "(%04x, %x): stub\n", hWndParent, iType ); |
| 342 | return WN16_SUCCESS; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 343 | } |
| 344 | |
| 345 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 346 | * WNetViewQueueDialog [USER.528] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 347 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 348 | WORD WINAPI WNetViewQueueDialog16( HWND16 hwndOwner, LPSTR lpszQueue ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 349 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 350 | FIXME(" (%04x, %s): stub\n", hwndOwner, debugstr_a(lpszQueue) ); |
| 351 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 352 | } |
| 353 | |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 354 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 355 | * WNetPropertyDialog [USER.529] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 356 | */ |
| 357 | WORD WINAPI WNetPropertyDialog16( HWND16 hwndParent, WORD iButton, |
| 358 | WORD nPropSel, LPSTR lpszName, WORD nType ) |
| 359 | { |
| 360 | FIXME( "(%04x, %x, %x, %s, %x ): stub\n", |
| 361 | hwndParent, iButton, nPropSel, debugstr_a(lpszName), nType ); |
| 362 | return WN16_NOT_SUPPORTED; |
| 363 | } |
| 364 | |
| 365 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 366 | * WNetGetPropertyText [USER.532] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 367 | */ |
| 368 | WORD WINAPI WNetGetPropertyText16( WORD iButton, WORD nPropSel, LPSTR lpszName, |
| 369 | LPSTR lpszButtonName, WORD cbButtonName, WORD nType ) |
| 370 | { |
| 371 | FIXME( "(%04x, %04x, %s, %s, %04x): stub\n", |
| 372 | iButton, nPropSel, debugstr_a(lpszName), debugstr_a(lpszButtonName), nType); |
| 373 | return WN16_NOT_SUPPORTED; |
| 374 | } |
| 375 | |
| 376 | |
| 377 | /* |
| 378 | * Admin |
| 379 | */ |
| 380 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 381 | /********************************************************************* |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 382 | * WNetGetDirectoryType [USER.530] Decides whether resource is local |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 383 | * |
| 384 | * RETURNS |
| 385 | * on success, puts one of the following in *lpType: |
| 386 | * - WNDT_NETWORK on a network |
| 387 | * - WNDT_LOCAL local |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 388 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 389 | WORD WINAPI WNetGetDirectoryType16( LPSTR lpName, LPINT16 lpType ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 390 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 391 | UINT type = GetDriveTypeA(lpName); |
Alexandre Julliard | bf67259 | 2000-12-12 00:44:42 +0000 | [diff] [blame] | 392 | if ( type == DRIVE_NO_ROOT_DIR ) |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 393 | type = GetDriveTypeA(NULL); |
Alexandre Julliard | dadf78f | 1998-05-17 17:13:43 +0000 | [diff] [blame] | 394 | |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 395 | *lpType = (type == DRIVE_REMOTE)? WNDT_NETWORK : WNDT_NORMAL; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 396 | |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 397 | TRACE( "%s is %s\n", debugstr_a(lpName), |
| 398 | (*lpType == WNDT_NETWORK)? "WNDT_NETWORK" : "WNDT_NORMAL" ); |
| 399 | return WN16_SUCCESS; |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 400 | } |
| 401 | |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 402 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 403 | * WNetDirectoryNotify [USER.531] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 404 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 405 | WORD WINAPI WNetDirectoryNotify16( HWND16 hwndOwner, LPSTR lpDir, WORD wOper ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 406 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 407 | FIXME( "(%04x, %s, %s): stub\n", hwndOwner, debugstr_a(lpDir), |
| 408 | (wOper == WNDN_MKDIR)? "WNDN_MKDIR" : |
| 409 | (wOper == WNDN_MVDIR)? "WNDN_MVDIR" : |
| 410 | (wOper == WNDN_RMDIR)? "WNDN_RMDIR" : "unknown" ); |
| 411 | return WN16_NOT_SUPPORTED; |
| 412 | } |
| 413 | |
| 414 | |
| 415 | /* |
| 416 | * Error handling |
| 417 | */ |
| 418 | |
| 419 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 420 | * WNetGetError [USER.519] |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 421 | */ |
| 422 | WORD WINAPI WNetGetError16( LPINT16 nError ) |
| 423 | { |
| 424 | FIXME( "(%p): stub\n", nError ); |
| 425 | return WN16_NOT_SUPPORTED; |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 429 | * WNetGetErrorText [USER.520] |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 430 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 431 | WORD WINAPI WNetGetErrorText16( WORD nError, LPSTR lpBuffer, LPINT16 nBufferSize ) |
Alexandre Julliard | fa68b75 | 1995-04-03 16:55:37 +0000 | [diff] [blame] | 432 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 433 | FIXME( "(%x, %p, %p): stub\n", nError, lpBuffer, nBufferSize ); |
| 434 | return WN16_NET_ERROR; |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 435 | } |
| 436 | |
| 437 | /************************************************************************** |
Patrik Stridvall | 01d5e5b | 2001-07-02 19:59:40 +0000 | [diff] [blame] | 438 | * WNetErrorText [USER.499] |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 439 | */ |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 440 | WORD WINAPI WNetErrorText16( WORD nError, LPSTR lpszText, WORD cbText ) |
Alexandre Julliard | 5819953 | 1994-04-21 01:20:00 +0000 | [diff] [blame] | 441 | { |
Ulrich Weigand | bb1984e | 1999-08-07 14:32:33 +0000 | [diff] [blame] | 442 | FIXME("(%x, %p, %x): stub\n", nError, lpszText, cbText ); |
Ulrich Weigand | 73cf91e | 1999-05-17 14:56:23 +0000 | [diff] [blame] | 443 | return FALSE; |
| 444 | } |
| 445 | |