Changeset 584 for trunk/src


Ignore:
Timestamp:
Aug 19, 1999, 6:53:57 PM (26 years ago)
Author:
phaller
Message:

Add: added ODINWRAP support to MPR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mpr/MPR.CPP

    r97 r584  
    1 /* $Id: MPR.CPP,v 1.3 1999-06-10 17:06:06 phaller Exp $ */
     1/* $Id: MPR.CPP,v 1.4 1999-08-19 16:52:23 phaller Exp $ */
    22
    33/*
     
    55 * Project Odin Software License can be found in LICENSE.TXT
    66 *
    7  */
    8 /*
    97 * MPR apis
    10  *
    11  * 1998/06/12
    128 *
    139 * Copyright 1998 Patrick Haller
    1410 */
     11
    1512/*****************************************************************************
    1613 * Name      : MPR.CPP
     
    2320#include <wnet.h>
    2421#include <string.h>
    25 #include "misc.h"
     22#include <odinwrap.h>
     23#include <heapstring.h>
     24#include <misc.h>
    2625#include "mpr.h"
    2726
     
    2928// MPR.DLL of Windows NT
    3029
    31 // WIN32API MultinetGetConnectionPerformanceA
    32 // WIN32API MultinetGetConnectionPerformanceW
    33 // WIN32API MultinetGetErrorTextA
    34 // WIN32API MultinetGetErrorTextW
    35 // WIN32API RestoreConnectionA0
    36 // WIN32API WNetClearConnections
    37 // WIN32API WNetConnectionDialog1A
    38 // WIN32API WNetConnectionDialog1W
    39 // WIN32API WNetConnectionDialog2
    40 // WIN32API WNetDirectoryNotifyA
    41 // WIN32API WNetDirectoryNotifyW
    42 // WIN32API WNetDisconnectDialog1A
    43 // WIN32API WNetDisconnectDialog1W
    44 // WIN32API WNetDisconnectDialog2
    45 // WIN32API WNetFMXEditPerm         FileManager Extensions ?
    46 // WIN32API WNetFMXGetPermCaps
    47 // WIN32API WNetFMXGetPermHelp
    48 // WIN32API WNetFormatNetworkNameA
    49 // WIN32API WNetFormatNetworkNameW
    50 // WIN32API WNetGetConnection2A
    51 // WIN32API WNetGetConnection2W
    52 // WIN32API WNetGetConnection3A
    53 // WIN32API WNetGetConnection3W
    54 // WIN32API WNetGetDirectoryTypeA
    55 // WIN32API WNetGetDirectoryTypeW
    56 // WIN32API WNetGetHomeDirectoryW   NT specific
    57 // WIN32API WNetGetNetworkInformationA
    58 // WIN32API WNetGetNetworkInformationW
    59 // WIN32API WNetGetPropertyTextA
    60 // WIN32API WNetGetPropertyTextW
    61 // WIN32API WNetGetProviderNameA
    62 // WIN32API WNetGetProviderNameW
    63 // WIN32API WNetGetSearchDialog
    64 // WIN32API WNetLogonNotify
    65 // WIN32API WNetPasswordChangeNotify
    66 // WIN32API WNetPropertyDialogA
    67 // WIN32API WNetPropertyDialogW
    68 // WIN32API WNetRestoreConnectionW
    69 // WIN32API WNetSetConnectionA
    70 // WIN32API WNetSetConnectionW
    71 // WIN32API WNetSetLastErrorA      PH: implemented
    72 // WIN32API WNetSetLastErrorW      PH: implemented
    73 // WIN32API WNetSupportGlobalEnum
    74 // WIN32API WNetUseConnectionA
    75 // WIN32API WNetUseConnectionW
    76 
     30// MultinetGetConnectionPerformanceA
     31// MultinetGetConnectionPerformanceW
     32// MultinetGetErrorTextA
     33// MultinetGetErrorTextW
     34// RestoreConnectionA0
     35// WNetClearConnections
     36// WNetConnectionDialog1A
     37// WNetConnectionDialog1W
     38// WNetConnectionDialog2
     39// WNetDirectoryNotifyA
     40// WNetDirectoryNotifyW
     41// WNetDisconnectDialog1A
     42// WNetDisconnectDialog1W
     43// WNetDisconnectDialog2
     44// WNetFMXEditPerm         FileManager Extensions ?
     45// WNetFMXGetPermCaps
     46// WNetFMXGetPermHelp
     47// WNetFormatNetworkNameA
     48// WNetFormatNetworkNameW
     49// WNetGetConnection2A
     50// WNetGetConnection2W
     51// WNetGetConnection3A
     52// WNetGetConnection3W
     53// WNetGetDirectoryTypeA
     54// WNetGetDirectoryTypeW
     55// WNetGetHomeDirectoryW   NT specific
     56// WNetGetNetworkInformationA
     57// WNetGetNetworkInformationW
     58// WNetGetPropertyTextA
     59// WNetGetPropertyTextW
     60// WNetGetProviderNameA
     61// WNetGetProviderNameW
     62// WNetGetSearchDialog
     63// WNetLogonNotify
     64// WNetPasswordChangeNotify
     65// WNetPropertyDialogA
     66// WNetPropertyDialogW
     67// WNetRestoreConnectionW
     68// WNetSetConnectionA
     69// WNetSetConnectionW
     70// WNetSetLastErrorA      PH: implemented
     71// WNetSetLastErrorW      PH: implemented
     72// WNetSupportGlobalEnum
     73// WNetUseConnectionA
     74// WNetUseConnectionW
     75
     76
     77ODINDEBUGCHANNEL(MPR)
    7778
    7879/****************************************************************************
     
    8889
    8990/*****************************************************************************
    90  * Name      : DWORD WIN32API WNetAddConnection2A
    91  * Purpose   : The WNetAddConnection2 function makes a connection to a network
     91 *             WNetAddConnection2, makes a connection to a network
    9292 *             resource. The function can redirect a local device to the network
    9393 *             resource.
     
    106106 *****************************************************************************/
    107107
    108 DWORD WIN32API OS2WNetAddConnection2A(LPNETRESOURCEA lpNetResource,
    109                                       LPCSTR        lpPassword,
    110                                       LPCSTR        lpUsername,
    111                                       DWORD          fdwConnection)
    112 {
    113   dprintf(("MPR:WNetAddConnection2A (%08x,%s,%s,%08x) not implemented.\n",
    114            lpNetResource,
    115            lpPassword,
    116            lpUsername,
    117            fdwConnection));
    118 
    119   return (ERROR_NO_NETWORK);
    120 }
    121 
    122 
    123 /*****************************************************************************
    124  * Name      : DWORD WIN32API WNetAddConnection2W
    125  * Purpose   : The WNetAddConnection2 function makes a connection to a network
     108ODINFUNCTION4(DWORD, OS2WNetAddConnection2A,
     109              LPNETRESOURCEA, lpNetResource,
     110              LPCSTR, lpPassword,
     111              LPCSTR, lpUsername,
     112              DWORD, fdwConnection)
     113{
     114  dprintf(("MPR:WNetAddConnection2A not implemented.\n"));
     115  return (ERROR_NO_NETWORK);
     116}
     117
     118
     119/*****************************************************************************
     120 *             WNetAddConnection2 makes a connection to a network
    126121 *             resource. The function can redirect a local device to the network
    127122 *             resource.
     
    140135 *****************************************************************************/
    141136
    142 DWORD WIN32API OS2WNetAddConnection2W(LPNETRESOURCEW lpNetResource,
    143                                       LPCWSTR        lpPassword,
    144                                       LPCWSTR        lpUsername,
    145                                       DWORD          fdwConnection)
    146 {
    147   dprintf(("MPR:WNetAddConnection2W (%08x,%s,%s,%08x) not implemented.\n",
    148            lpNetResource,
    149            lpPassword,
    150            lpUsername,
    151            fdwConnection));
    152 
    153   return (ERROR_NO_NETWORK);
    154 }
    155 
    156 
    157 
    158 /*****************************************************************************
    159  * Name      : DWORD WIN32API WNetAddConnection3A
    160  * Purpose   : The WNetAddConnection3 function makes a connection to a network
     137ODINFUNCTION4(DWORD, OS2WNetAddConnection2W,
     138              LPNETRESOURCEW, lpNetResource,
     139              LPCWSTR, lpPassword,
     140              LPCWSTR, lpUsername,
     141              DWORD, fdwConnection)
     142{
     143  dprintf(("MPR:WNetAddConnection2W not implemented.\n"));
     144  return (ERROR_NO_NETWORK);
     145}
     146
     147
     148
     149/*****************************************************************************
     150 *             WNetAddConnection3 makes, aconnection to a network
    161151 *             resource. The function can redirect a local device to the network
    162152 *             resource.
     
    176166 *****************************************************************************/
    177167
    178 DWORD WIN32API OS2WNetAddConnection3A(HWND           hwndOwner,
    179                                       LPNETRESOURCEA lpNetResource,
    180                                       LPCSTR        lpPassword,
    181                                       LPCSTR        lpUsername,
    182                                       DWORD          fdwConnection)
    183 {
    184   dprintf(("MPR:WNetAddConnection3A (%08x,%08x,%s,%s,%08x) not implemented.\n",
    185            hwndOwner,
    186            lpNetResource,
    187            lpPassword,
    188            lpUsername,
    189            fdwConnection));
    190 
    191   return (ERROR_NO_NETWORK);
    192 }
    193 
    194 
    195 /*****************************************************************************
    196  * Name      : DWORD WIN32API WNetAddConnection3W
    197  * Purpose   : The WNetAddConnection3 function makes a connection to a network
     168ODINFUNCTION5(DWORD, OS2WNetAddConnection3A,
     169              HWND, hwndOwner,
     170              LPNETRESOURCEA, lpNetResource,
     171              LPCSTR, lpPassword,
     172              LPCSTR, lpUsername,
     173              DWORD, fdwConnection)
     174{
     175  dprintf(("MPR:WNetAddConnection3A not implemented.\n"));
     176  return (ERROR_NO_NETWORK);
     177}
     178
     179
     180/*****************************************************************************
     181 *             WNetAddConnection3 makes, connection to a network
    198182 *             resource. The function can redirect a local device to the network
    199183 *             resource.
     
    213197 *****************************************************************************/
    214198
    215 DWORD WIN32API OS2WNetAddConnection3W(HWND           hwndOwner,
    216                                       LPNETRESOURCEW lpNetResource,
    217                                       LPCWSTR        lpPassword,
    218                                       LPCWSTR        lpUsername,
    219                                       DWORD          fdwConnection)
    220 {
    221   dprintf(("MPR:WNetAddConnection3W (%08x,%08x,%s,%s,%08x) not implemented.\n",
    222            hwndOwner,
    223            lpNetResource,
    224            lpPassword,
    225            lpUsername,
    226            fdwConnection));
    227 
    228   return (ERROR_NO_NETWORK);
    229 }
    230 
    231 
    232 /*****************************************************************************
    233  * Name      : DWORD WIN32API WNetAddConnectionA
    234  * Purpose   : The WNetAddConnection function makes a connection to a network
     199ODINFUNCTION5(DWORD, OS2WNetAddConnection3W,
     200              HWND, hwndOwner,
     201              LPNETRESOURCEW, lpNetResource,
     202              LPCWSTR, lpPassword,
     203              LPCWSTR, lpUsername,
     204              DWORD, fdwConnection)
     205{
     206  dprintf(("MPR:WNetAddConnection3W not implemented.\n"));
     207  return (ERROR_NO_NETWORK);
     208}
     209
     210
     211/*****************************************************************************
     212 *             WNetAddConnectionA makes a connection to a network
    235213 *             resource. The function can redirect a local device to the network
    236214 *             resource.
     
    246224 *****************************************************************************/
    247225
    248 DWORD WIN32API OS2WNetAddConnectionA(LPCSTR lpRemoteName,
    249                                      LPCSTR lpPassword,
    250                                      LPCSTR lpUsername)
    251 {
    252   dprintf(("MPR:WNetAddConnectionA (%s,%s,%s) not implemented.\n",
    253            lpRemoteName,
    254            lpPassword,
    255            lpUsername));
    256 
    257   return (ERROR_NO_NETWORK);
    258 }
    259 
    260 
    261 /*****************************************************************************
    262  * Name      : DWORD WIN32API WNetAddConnectionW
    263  * Purpose   : The WNetAddConnection function makes a connection to a network
     226ODINFUNCTION3(DWORD, OS2WNetAddConnectionA,
     227              LPCSTR, lpRemoteName,
     228              LPCSTR, lpPassword,
     229              LPCSTR, lpUsername)
     230{
     231  dprintf(("MPR:WNetAddConnectionA not implemented.\n"));
     232  return (ERROR_NO_NETWORK);
     233}
     234
     235
     236/*****************************************************************************
     237 *             WNetAddConnection makes a connection to a network
    264238 *             resource. The function can redirect a local device to the network
    265239 *             resource.
     
    275249 *****************************************************************************/
    276250
    277 DWORD WIN32API OS2WNetAddConnectionW(LPCWSTR lpRemoteName,
    278                                      LPCWSTR lpPassword,
    279                                      LPCWSTR lpUsername)
    280 {
    281   dprintf(("MPR:WNetAddConnectionW (%s,%s,%s) not implemented.\n",
    282            lpRemoteName,
    283            lpPassword,
    284            lpUsername));
    285 
    286   return (ERROR_NO_NETWORK);
    287 }
    288 
    289 
    290 /*****************************************************************************
    291  * Name      : DWORD WIN32API WNetCancelConnection2A
    292  * Purpose   : The WNetCancelConnection2 function breaks an existing network
     251ODINFUNCTION3(DWORD, OS2WNetAddConnectionW,
     252              LPCWSTR, lpRemoteName,
     253              LPCWSTR, lpPassword,
     254              LPCWSTR, lpUsername)
     255{
     256  dprintf(("MPR:WNetAddConnectionW not implemented.\n"));
     257  return (ERROR_NO_NETWORK);
     258}
     259
     260
     261/*****************************************************************************
     262 *             The WNetCancelConnection2 function breaks an existing network
    293263 *             connection. It can also be used to remove remembered network
    294264 *             connections that are not currently connected. This function
     
    305275 *****************************************************************************/
    306276
    307 DWORD WIN32API OS2WNetCancelConnection2A(LPTSTR lpszName,
    308                                          DWORD  fdwConnection,
    309                                          BOOL   fForce)
    310 {
    311   dprintf(("MPR:WNetCancelConnection2A (%s,%08x,%u) not implemented.\n",
    312            lpszName,
    313            fdwConnection,
    314            fForce));
    315 
     277ODINFUNCTION3(DWORD, OS2WNetCancelConnection2A,
     278              LPTSTR, lpszName,
     279              DWORD, fdwConnection,
     280              BOOL, fForce)
     281{
     282  dprintf(("MPR:WNetCancelConnection2A not implemented.\n"));
    316283  return (ERROR_NOT_CONNECTED);
    317284}
     
    319286
    320287/*****************************************************************************
    321  * Name      : DWORD WIN32API WNetCancelConnection2W
    322  * Purpose   : The WNetCancelConnection2 function breaks an existing network
     288 *             The WNetCancelConnection2 function breaks an existing network
    323289 *             connection. It can also be used to remove remembered network
    324290 *             connections that are not currently connected. This function
     
    335301 *****************************************************************************/
    336302
    337 DWORD WIN32API OS2WNetCancelConnection2W(LPWSTR lpszName,
    338                                          DWORD  fdwConnection,
    339                                          BOOL   fForce)
    340 {
    341   dprintf(("MPR:WNetCancelConnection2W (%s,%08x,%u) not implemented.\n",
    342            lpszName,
    343            fdwConnection,
    344            fForce));
    345 
     303ODINFUNCTION3(DWORD, OS2WNetCancelConnection2W,
     304              LPWSTR, lpszName,
     305              DWORD, fdwConnection,
     306              BOOL, fForce)
     307{
     308  dprintf(("MPR:WNetCancelConnection2W not implemented.\n"));
    346309  return (ERROR_NOT_CONNECTED);
    347310}
     
    349312
    350313/*****************************************************************************
    351  * Name      : DWORD WIN32API WNetCancelConnectionA
    352  * Purpose   : The WNetCancelConnection2 function breaks an existing network
     314 *             The WNetCancelConnection2 function breaks an existing network
    353315 *             connection.
    354316 * Parameters: LPTSTR lpszName      address of resource name to disconnect
     
    362324 *****************************************************************************/
    363325
    364 DWORD WIN32API OS2WNetCancelConnectionA(LPTSTR lpszName,
    365                                         BOOL   fForce)
    366 {
    367   dprintf(("MPR:WNetCancelConnectionA (%s,%08x,%u) not implemented.\n",
    368            lpszName,
    369            fForce));
    370 
     326ODINFUNCTION2(DWORD, OS2WNetCancelConnectionA,
     327              LPTSTR, lpszName,
     328              BOOL, fForce)
     329{
     330  dprintf(("MPR:WNetCancelConnectionA not implemented.\n"));
    371331  return (ERROR_NOT_CONNECTED);
    372332}
     
    374334
    375335/*****************************************************************************
    376  * Name      : DWORD WIN32API WNetCancelConnectionW
    377  * Purpose   : The WNetCancelConnection2 function breaks an existing network
     336 *             The WNetCancelConnection2 function breaks an existing network
    378337 *             connection.
    379338 * Parameters: LPTSTR lpszName      address of resource name to disconnect
     
    387346 *****************************************************************************/
    388347
    389 DWORD WIN32API OS2WNetCancelConnectionW(LPWSTR lpszName,
    390                                         BOOL   fForce)
    391 {
    392   dprintf(("MPR:WNetCancelConnectionW (%s,%08x,%u) not implemented.\n",
    393            lpszName,
    394            fForce));
    395 
     348ODINFUNCTION2(DWORD, OS2WNetCancelConnectionW,
     349              LPWSTR, lpszName,
     350              BOOL, fForce)
     351{
     352  dprintf(("MPR:WNetCancelConnectionW not implemented.\n"));
    396353  return (ERROR_NOT_CONNECTED);
    397354}
     
    399356
    400357/*****************************************************************************
    401  * Name      : DWORD WIN32API WNetCloseEnum
     358 *
    402359 * Purpose   : The WNetCloseEnum function ends a network resource enumeration
    403360 *               started by the WNetOpenEnum function.
     
    411368 *****************************************************************************/
    412369
    413 DWORD WIN32API OS2WNetCloseEnum (HANDLE hEnum)
    414 {
    415   dprintf(("MPR:WNetCloseEnum (%08x) not implemented.\n",
    416            hEnum));
    417 
    418   return (ERROR_NO_NETWORK);
    419 }
    420 
    421 
    422 /*****************************************************************************
    423  * Name      : DWORD WIN32API WNetConnectionDialog
    424  * Purpose   : The WNetConnectionDialog function starts a general browsing
     370ODINFUNCTION1(DWORD, OS2WNetCloseEnum,
     371              HANDLE, hEnum)
     372{
     373  dprintf(("MPR:WNetCloseEnum not implemented.\n"));
     374  return (ERROR_NO_NETWORK);
     375}
     376
     377
     378/*****************************************************************************
     379 *             The WNetConnectionDialog function starts a general browsing
    425380 *             dialog box for connecting to network resources.
    426381 * Parameters: HWND  hwnd            handle of window owning dialog box
     
    434389 *****************************************************************************/
    435390
    436 DWORD WIN32API OS2WNetConnectionDialog (HWND  hwnd,
    437                                         DWORD fdwResourceType)
    438 {
    439   dprintf(("MPR:WNetConnectionDialog (%08x,%08x) not implemented.\n",
    440            hwnd,
    441            fdwResourceType));
    442 
    443   return (ERROR_NO_NETWORK);
    444 }
    445 
    446 
    447 /*****************************************************************************
    448  * Name      : DWORD WIN32API WNetDisconnectDialog
    449  * Purpose   : The WNetDisconnectDialog function starts a general browsing
     391ODINFUNCTION2(DWORD, OS2WNetConnectionDialog,
     392              HWND, hwnd,
     393              DWORD, fdwResourceType)
     394{
     395  dprintf(("MPR:WNetConnectionDialog not implemented.\n"));
     396  return (ERROR_NO_NETWORK);
     397}
     398
     399
     400/*****************************************************************************
     401 *             The WNetDisconnectDialog function starts a general browsing
    450402 *             dialog box for disconnecting from network resources.
    451403 * Parameters: HWND  hwnd            handle of window owning dialog box
     
    459411 *****************************************************************************/
    460412
    461 DWORD WIN32API OS2WNetDisconnectDialog (HWND  hwnd,
    462                                         DWORD fdwResourceType)
    463 {
    464   dprintf(("MPR:WNetDisconnectDialog (%08x,%08x) not implemented.\n",
    465            hwnd,
    466            fdwResourceType));
    467 
    468   return (ERROR_NO_NETWORK);
    469 }
    470 
    471 
    472 /*****************************************************************************
    473  * Name      : DWORD WIN32API WNetEnumResourceA
    474  * Purpose   : The WNetEnumResource function continues a network-resource
    475  *               enumeration started by the WNetOpenEnum function.
     413ODINFUNCTION2(DWORD, OS2WNetDisconnectDialog,
     414              HWND, hwnd,
     415              DWORD, fdwResourceType)
     416{
     417  dprintf(("MPR:WNetDisconnectDialog not implemented.\n"));
     418  return (ERROR_NO_NETWORK);
     419}
     420
     421
     422/*****************************************************************************
     423 *             The WNetEnumResource function continues a network-resource
     424 *             enumeration started by the WNetOpenEnum function.
    476425 * Parameters: HANDLE  hEnum      handle of enumeration
    477426 *             LPDWORD lpcEntries address of entries to list
     
    486435 *****************************************************************************/
    487436
    488 DWORD WIN32API OS2WNetEnumResourceA (HANDLE  hEnum,
    489                                      LPDWORD lpcEntries,
    490                                      LPVOID  lpvBuffer,
    491                                      LPDWORD lpcBuffer)
    492 {
    493   dprintf(("MPR:WNetEnumResourceA (%08x,%08x,%08x,%08x) not implemented.\n",
    494            hEnum,
    495            lpcEntries,
    496            lpvBuffer,
    497            lpcBuffer));
    498 
    499   return (ERROR_NO_NETWORK);
    500 }
    501 
    502 
    503 /*****************************************************************************
    504  * Name      : DWORD WIN32API WNetEnumResourceW
    505  * Purpose   : The WNetEnumResource function continues a network-resource
    506  *               enumeration started by the WNetOpenEnum function.
     437ODINFUNCTION4(DWORD, OS2WNetEnumResourceA,
     438              HANDLE, hEnum,
     439              LPDWORD, lpcEntries,
     440              LPVOID, lpvBuffer,
     441              LPDWORD, lpcBuffer)
     442{
     443  dprintf(("MPR:WNetEnumResourceA not implemented.\n"));
     444  return (ERROR_NO_NETWORK);
     445}
     446
     447
     448/*****************************************************************************
     449 *             The WNetEnumResource, functioncontinues a network-resource
     450 *             enumeration started by the WNetOpenEnum function.
    507451 * Parameters: HANDLE  hEnum      handle of enumeration
    508452 *             LPDWORD lpcEntries address of entries to list
     
    517461 *****************************************************************************/
    518462
    519 DWORD WIN32API OS2WNetEnumResourceW (HANDLE  hEnum,
    520                                      LPDWORD lpcEntries,
    521                                      LPVOID  lpvBuffer,
    522                                      LPDWORD lpcBuffer)
    523 {
    524   dprintf(("MPR:WNetEnumResourceW (%08x,%08x,%08x,%08x) not implemented.\n",
    525            hEnum,
    526            lpcEntries,
    527            lpvBuffer,
    528            lpcBuffer));
    529 
    530   return (ERROR_NO_NETWORK);
    531 }
    532 
    533 
    534 /*****************************************************************************
    535  * Name      : DWORD WIN32API WNetGetConnectionA
    536  * Purpose   : The WNetGetConnection function retrieves the name of the network
    537  *               resource associated with a local device.
     463ODINFUNCTION4(DWORD, OS2WNetEnumResourceW,
     464              HANDLE, hEnum,
     465              LPDWORD, lpcEntries,
     466              LPVOID, lpvBuffer,
     467              LPDWORD, lpcBuffer)
     468{
     469  dprintf(("MPR:WNetEnumResourceW not implemented.\n"));
     470  return (ERROR_NO_NETWORK);
     471}
     472
     473
     474/*****************************************************************************
     475 *             The WNetGetConnection function retrieves the name of the network
     476 *             resource associated with a local device.
    538477 * Parameters: LPTSTR  lpszLocalName  address of local name
    539478 *             LPTSTR  lpszRemoteName address of buffer for remote name
     
    547486 *****************************************************************************/
    548487
    549 DWORD WIN32API OS2WNetGetConnectionA (LPTSTR lpszLocalName,
    550                                       LPTSTR lpszRemoteName,
    551                                       LPDWORD lpcchBuffer)
    552 {
    553   dprintf(("MPR:WNetGetConnectionA (%s,%s,%08x) not implemented.\n",
    554            lpszLocalName,
    555            lpszRemoteName,
    556            lpcchBuffer));
    557 
    558   return (ERROR_NO_NETWORK);
    559 }
    560 
    561 
    562 /*****************************************************************************
    563  * Name      : DWORD WIN32API WNetGetConnectionW
    564  * Purpose   : The WNetGetConnection function retrieves the name of the network
    565  *               resource associated with a local device.
     488ODINFUNCTION3(DWORD, OS2WNetGetConnectionA,
     489              LPTSTR, lpszLocalName,
     490              LPTSTR, lpszRemoteName,
     491              LPDWORD, lpcchBuffer)
     492{
     493  dprintf(("MPR:WNetGetConnectionA not implemented.\n"));
     494  return (ERROR_NO_NETWORK);
     495}
     496
     497
     498/*****************************************************************************
     499 *             The WNetGetConnection function retrieves the name of the network
     500 *             resource associated with a local device.
    566501 * Parameters: LPWSTR  lpszLocalName  address of local name
    567502 *             LPWSTR  lpszRemoteName address of buffer for remote name
     
    575510 *****************************************************************************/
    576511
    577 DWORD WIN32API OS2WNetGetConnectionW (LPWSTR lpszLocalName,
    578                                       LPWSTR lpszRemoteName,
    579                                       LPDWORD lpcchBuffer)
    580 {
    581   dprintf(("MPR:WNetGetConnectionW (%s,%s,%08x) not implemented.\n",
    582            lpszLocalName,
    583            lpszRemoteName,
    584            lpcchBuffer));
    585 
    586   return (ERROR_NO_NETWORK);
    587 }
    588 
    589 
    590 /*****************************************************************************
    591  * Name      : DWORD WIN32API WNetGetLastErrorA
    592  * Purpose   : The WNetGetLastError function retrieves the most recent extended
     512ODINFUNCTION3(DWORD, OS2WNetGetConnectionW,
     513              LPWSTR, lpszLocalName,
     514              LPWSTR, lpszRemoteName,
     515              LPDWORD, lpcchBuffer)
     516{
     517  dprintf(("MPR:WNetGetConnectionW not implemented.\n"));
     518  return (ERROR_NO_NETWORK);
     519}
     520
     521
     522/*****************************************************************************
     523 *            The WNetGetLastError function retrieves, themost recent extended
    593524 *               error code set by a Windows network function.
    594525 * Parameters: LPDWORD lpdwErrorCode   address of error code
     
    605536 *****************************************************************************/
    606537
    607 DWORD WIN32API OS2WNetGetLastErrorA (LPDWORD lpdwErrorCode,
    608                                      LPTSTR  lpszDescription,
    609                                      DWORD   cchDescription,
    610                                      LPTSTR  lpszName,
    611                                      DWORD   cchName)
    612 {
    613   dprintf(("MPR:WNetGetLastErrorA (%08x,%08x,%08x,%08x,%80x).\n",
    614            lpdwErrorCode,
    615            lpszDescription,
    616            cchDescription,
    617            lpszName,
    618            cchName));
    619 
     538ODINFUNCTION5(DWORD, OS2WNetGetLastErrorA,
     539              LPDWORD, lpdwErrorCode,
     540              LPTSTR, lpszDescription,
     541              DWORD, cchDescription,
     542              LPTSTR, lpszName,
     543              DWORD, cchName)
     544{
    620545  if ( (lpdwErrorCode   == NULL) ||                     /* check parameters */
    621546       (lpszDescription == NULL) ||
     
    640565
    641566/*****************************************************************************
    642  * Name      : DWORD WIN32API WNetGetLastErrorW
    643  * Purpose   : The WNetGetLastError function retrieves the most recent extended
     567 *            The WNetGetLastError function retrieves, themost recent extended
    644568 *               error code set by a Windows network function.
    645569 * Parameters: LPDWORD lpdwErrorCode   address of error code
     
    656580 *****************************************************************************/
    657581
    658 DWORD WIN32API OS2WNetGetLastErrorW (LPDWORD lpdwErrorCode,
    659                                      LPWSTR  lpszDescription,
    660                                      DWORD   cchDescription,
    661                                      LPWSTR  lpszName,
    662                                      DWORD   cchName)
    663 {
    664   dprintf(("MPR:WNetGetLastErrorA (%08x,%08x,%08x,%08x,%80x) not correctly implemented.\n",
    665            lpdwErrorCode,
    666            lpszDescription,
    667            cchDescription,
    668            lpszName,
    669            cchName));
    670 
     582ODINFUNCTION5(DWORD, OS2WNetGetLastErrorW,
     583              LPDWORD, lpdwErrorCode,
     584              LPWSTR, lpszDescription,
     585              DWORD, cchDescription,
     586              LPWSTR, lpszName,
     587              DWORD, cchName)
     588{
    671589  if ( (lpdwErrorCode   == NULL) ||                     /* check parameters */
    672590       (lpszDescription == NULL) ||
     
    680598  lpszDescription[cchDescription - 1] = 0;     /* ensure string termination */
    681599
    682   strncpy ((LPTSTR)lpszName,                        /* return provider name */
    683             "OS/2 LAN",                      /* that's our default provider */
     600  lstrcpynW(lpszName,                               /* return provider name */
     601            (LPCWSTR)L"OS/2 LAN",            /* that's our default provider */
    684602            cchName);
    685603  lpszName[cchName - 1] = 0;                   /* ensure string termination */
     
    690608
    691609/*****************************************************************************
    692  * Name      : DWORD WIN32API WNetGetResourceInformationA
    693610 * Purpose   : The WNetGetResourceInformation function retrieves enumeration
    694611 *             information for a network resource. You typically use this
     
    713630 *****************************************************************************/
    714631
    715 DWORD WIN32API OS2WNetGetResourceInformationA(LPNETRESOURCEA lpNetResource,
    716                                               LPVOID         lpBuffer,
    717                                               LPDWORD        cbBuffer,
    718                                               LPTSTR         *lplpSystem)
    719 {
    720   dprintf(("MPR:WNetGetResourceInformationA (%08x,%08x,%08x,%08x) not implemented.\n",
    721            lpNetResource,
    722            lpBuffer,
    723            cbBuffer,
    724            lplpSystem));
    725 
     632ODINFUNCTION4(DWORD, OS2WNetGetResourceInformationA,
     633              LPNETRESOURCEA, lpNetResource,
     634              LPVOID, lpBuffer,
     635              LPDWORD, cbBuffer,
     636              LPTSTR *, lplpSystem)
     637{
     638  dprintf(("MPR:WNetGetResourceInformationA not implemented.\n"));
    726639  return (WN_NO_NETWORK);
    727640}
     
    729642
    730643/*****************************************************************************
    731  * Name      : DWORD WIN32API WNetGetResourceInformationW
    732644 * Purpose   : The WNetGetResourceInformation function retrieves enumeration
    733645 *             information for a network resource. You typically use this
     
    752664 *****************************************************************************/
    753665
    754 DWORD WIN32API OS2WNetGetResourceInformationW(LPNETRESOURCEW lpNetResource,
    755                                               LPVOID         lpBuffer,
    756                                               LPDWORD        cbBuffer,
    757                                               LPWSTR         *lplpSystem)
     666ODINFUNCTION4(DWORD, OS2WNetGetResourceInformationW,
     667              LPNETRESOURCEW, lpNetResource,
     668              LPVOID, lpBuffer,
     669              LPDWORD, cbBuffer,
     670              LPWSTR *, lplpSystem)
    758671{
    759672  dprintf(("MPR:WNetGetResourceInformationW (%08x,%08x,%08x,%08x) not implemented.\n",
     
    768681
    769682/*****************************************************************************
    770  * Name      : DWORD WIN32API WNetGetResourceParentA
    771  * Purpose   : The WNetGetResourceParent function lets you navigate up from a
     683 *             The WNetGetResourceParent function lets you navigate up from a
    772684 *             resource. It enables browsing to commence based on the name of
    773685 *             a network resource. This function also allows navigating up from
     
    784696 *****************************************************************************/
    785697
    786 DWORD WIN32API OS2WNetGetResourceParentA(LPNETRESOURCEA lpNetResource,
    787                                          LPVOID         lpBuffer,
    788                                          LPDWORD        lpBufferSize)
    789 {
    790   dprintf(("MPR:WNetGetResourceParentA (%08x,%08x,%u) not implemented.\n",
    791            lpNetResource,
    792            lpBuffer,
    793            lpBufferSize));
    794 
     698ODINFUNCTION3(DWORD, OS2WNetGetResourceParentA,
     699              LPNETRESOURCEA, lpNetResource,
     700              LPVOID, lpBuffer,
     701              LPDWORD, lpBufferSize)
     702{
     703  dprintf(("MPR:WNetGetResourceParentA not implemented.\n"));
    795704  return (WN_ACCESS_DENIED);
    796705}
     
    798707
    799708/*****************************************************************************
    800  * Name      : DWORD WIN32API WNetGetResourceParentW
    801  * Purpose   : The WNetGetResourceParent function lets you navigate up from a
     709 *             The WNetGetResourceParent function lets you navigate up from a
    802710 *             resource. It enables browsing to commence based on the name of
    803711 *             a network resource. This function also allows navigating up from
     
    814722 *****************************************************************************/
    815723
    816 DWORD WIN32API OS2WNetGetResourceParentW(LPNETRESOURCEW lpNetResource,
    817                                          LPVOID         lpBuffer,
    818                                          LPDWORD        lpBufferSize)
    819 {
    820   dprintf(("MPR:WNetGetResourceParentW (%08x,%08x,%u) not implemented.\n",
    821            lpNetResource,
    822            lpBuffer,
    823            lpBufferSize));
    824 
     724ODINFUNCTION3(DWORD, OS2WNetGetResourceParentW,
     725              LPNETRESOURCEW, lpNetResource,
     726              LPVOID, lpBuffer,
     727              LPDWORD, lpBufferSize)
     728{
     729  dprintf(("MPR:WNetGetResourceParentW not implemented.\n"));
    825730  return (WN_ACCESS_DENIED);
    826731}
     
    828733
    829734/*****************************************************************************
    830  * Name      : DWORD WIN32API WNetGetUniversalNameA
    831  * Purpose   : The WNetGetUniversalName function takes a drive-based path for
     735 *            The WNetGetUniversalName, functiontakes a drive-based path for
    832736 *             a network resource and obtains a data structure that contains a
    833737 *             more universal form of the name.
     
    844748 *****************************************************************************/
    845749
    846 DWORD WIN32API OS2WNetGetUniversalNameA(LPCSTR lpLocalPath,
    847                                         DWORD   dwInfoLevel,
    848                                         LPVOID  lpBuffer,
    849                                         LPDWORD lpBufferSize)
    850 {
    851   dprintf(("MPR:WNetGetUniversalNameA (%s,%08x,%08x,%08x) not implemented.\n",
    852            lpLocalPath,
    853            dwInfoLevel,
    854            lpBuffer,
    855            lpBufferSize));
    856 
    857   return (ERROR_NO_NETWORK);
    858 }
    859 
    860 
    861 /*****************************************************************************
    862  * Name      : DWORD WIN32API WNetGetUniversalNameW
    863  * Purpose   : The WNetGetUniversalName function takes a drive-based path for
     750ODINFUNCTION4(DWORD, OS2WNetGetUniversalNameA,
     751              LPCSTR, lpLocalPath,
     752              DWORD, dwInfoLevel,
     753              LPVOID, lpBuffer,
     754              LPDWORD, lpBufferSize)
     755{
     756  dprintf(("MPR:WNetGetUniversalNameA not implemented.\n"));
     757  return (ERROR_NO_NETWORK);
     758}
     759
     760
     761/*****************************************************************************
     762 *             The WNetGetUniversalName, functiontakes a drive-based path for
    864763 *             a network resource and obtains a data structure that contains a
    865764 *             more universal form of the name.
     
    876775 *****************************************************************************/
    877776
    878 DWORD WIN32API OS2WNetGetUniversalNameW(LPCWSTR lpLocalPath,
    879                                         DWORD   dwInfoLevel,
    880                                         LPVOID  lpBuffer,
    881                                         LPDWORD lpBufferSize)
    882 {
    883   dprintf(("MPR:WNetGetUniversalNameW (%s,%08x,%08x,%08x) not implemented.\n",
    884            lpLocalPath,
    885            dwInfoLevel,
    886            lpBuffer,
    887            lpBufferSize));
    888 
    889   return (ERROR_NO_NETWORK);
    890 }
    891 
    892 
    893 /*****************************************************************************
    894  * Name      : DWORD WIN32API WNetGetUserA
    895  * Purpose   : The WNetGetUser function retrieves the current default user name
     777ODINFUNCTION4(DWORD, OS2WNetGetUniversalNameW,
     778              LPCWSTR, lpLocalPath,
     779              DWORD, dwInfoLevel,
     780              LPVOID, lpBuffer,
     781              LPDWORD, lpBufferSize)
     782{
     783  dprintf(("MPR:WNetGetUniversalNameW not implemented.\n"));
     784  return (ERROR_NO_NETWORK);
     785}
     786
     787
     788/*****************************************************************************
     789 *             The WNetGetUser function retrieves the current default user name
    896790 *             or the user name used to establish a network connection.
    897791 * Parameters: LPTSTR  lpszLocalName address of local name to get user name for
     
    906800 *****************************************************************************/
    907801
    908 DWORD WIN32API OS2WNetGetUserA(LPTSTR  lpszLocalName,
    909                                LPTSTR  lpszUserName,
    910                                LPDWORD lpcchBuffer)
    911 {
    912   dprintf(("MPR:WNetGetUserA (%s,%s,%08x) not implemented.\n",
    913            lpszLocalName,
    914            lpszUserName,
    915            lpcchBuffer));
    916 
    917   return (ERROR_NO_NETWORK);
    918 }
    919 
    920 
    921 /*****************************************************************************
    922  * Name      : DWORD WIN32API WNetGetUserW
    923  * Purpose   : The WNetGetUser function retrieves the current default user name
     802ODINFUNCTION3(DWORD, OS2WNetGetUserA,
     803              LPTSTR, lpszLocalName,
     804              LPTSTR, lpszUserName,
     805              LPDWORD, lpcchBuffer)
     806{
     807  dprintf(("MPR:WNetGetUserA not implemented.\n"));
     808  return (ERROR_NO_NETWORK);
     809}
     810
     811
     812/*****************************************************************************
     813 *             The WNetGetUser function retrieves the current default user name
    924814 *             or the user name used to establish a network connection.
    925815 * Parameters: LPWSTR  lpszLocalName address of local name to get user name for
     
    934824 *****************************************************************************/
    935825
    936 DWORD WIN32API OS2WNetGetUserW(LPWSTR  lpszLocalName,
    937                                LPWSTR  lpszUserName,
    938                                LPDWORD lpcchBuffer)
    939 {
    940   dprintf(("MPR:WNetGetUserW (%s,%s,%08x) not implemented.\n",
    941            lpszLocalName,
    942            lpszUserName,
    943            lpcchBuffer));
    944 
    945   return (ERROR_NO_NETWORK);
    946 }
    947 
    948 
    949 /*****************************************************************************
    950  * Name      : DWORD WIN32API WNetOpenEnumA
    951  * Purpose   : The WNetOpenEnum function starts an enumeration of network
     826ODINFUNCTION3(DWORD, OS2WNetGetUserW,
     827              LPWSTR, lpszLocalName,
     828              LPWSTR, lpszUserName,
     829              LPDWORD, lpcchBuffer)
     830{
     831  dprintf(("MPR:WNetGetUserW not implemented.\n"));
     832  return (ERROR_NO_NETWORK);
     833}
     834
     835
     836/*****************************************************************************
     837 *             The WNetOpenEnum function starts, anenumeration of network
    952838 *             resources or existing connections.
    953839 * Parameters: DWORD          fdwScope      scope of enumeration
     
    964850 *****************************************************************************/
    965851
    966 DWORD WIN32API OS2WNetOpenEnumA(DWORD          fdwScope,
    967                                 DWORD          fdwType,
    968                                 DWORD          fdwUsage,
    969                                 LPNETRESOURCEA lpNetResource,
    970                                 LPHANDLE       lphEnum)
    971 {
    972   dprintf(("MPR:WNetOpenEnumA (%08x,%08x,%08x,%08x,%08x) not implemented.\n",
    973            fdwScope,
    974            fdwType,
    975            fdwUsage,
    976            lpNetResource,
    977            lphEnum));
    978 
    979   return (ERROR_NO_NETWORK);
    980 }
    981 
    982 
    983 /*****************************************************************************
    984  * Name      : DWORD WIN32API WNetOpenEnumW
    985  * Purpose   : The WNetOpenEnum function starts an enumeration of network
     852ODINFUNCTION5(DWORD, OS2WNetOpenEnumA,
     853              DWORD, fdwScope,
     854              DWORD, fdwType,
     855              DWORD, fdwUsage,
     856              LPNETRESOURCEA, lpNetResource,
     857              LPHANDLE, lphEnum)
     858{
     859  dprintf(("MPR:WNetOpenEnumA not implemented.\n"));
     860  return (ERROR_NO_NETWORK);
     861}
     862
     863
     864/*****************************************************************************
     865 *             The WNetOpenEnum function starts, anenumeration of network
    986866 *             resources or existing connections.
    987867 * Parameters: DWORD          fdwScope      scope of enumeration
     
    998878 *****************************************************************************/
    999879
    1000 DWORD WIN32API OS2WNetOpenEnumW(DWORD          fdwScope,
    1001                                 DWORD          fdwType,
    1002                                 DWORD          fdwUsage,
    1003                                 LPNETRESOURCEW lpNetResource,
    1004                                 LPHANDLE       lphEnum)
    1005 {
    1006   dprintf(("MPR:WNetOpenEnumW (%08x,%08x,%08x,%08x,%08x) not implemented.\n",
    1007            fdwScope,
    1008            fdwType,
    1009            fdwUsage,
    1010            lpNetResource,
    1011            lphEnum));
    1012 
    1013   return (ERROR_NO_NETWORK);
    1014 }
    1015 
    1016 
    1017 /*****************************************************************************
    1018  * Name      : DWORD WIN32API WNetSetLastErrorA
    1019  * Purpose   : The WNetSetLastError function is used to set the error code status
     880ODINFUNCTION5(DWORD, OS2WNetOpenEnumW,
     881              DWORD, fdwScope,
     882              DWORD, fdwType,
     883              DWORD, fdwUsage,
     884              LPNETRESOURCEW, lpNetResource,
     885              LPHANDLE, lphEnum)
     886{
     887  dprintf(("MPR:WNetOpenEnumW not implemented.\n"));
     888  return (ERROR_NO_NETWORK);
     889}
     890
     891
     892/*****************************************************************************
     893 *             The WNetSetLastError function is used to set the error code status
    1020894 *             of this module.
    1021895 * Parameters: DWORD   dwErrorCode     error code
     
    1030904 *****************************************************************************/
    1031905
    1032 DWORD WIN32API OS2WNetSetLastErrorA (DWORD   dwErrorCode,
    1033                                      LPTSTR  lpszDescription,
    1034                                      LPTSTR  lpszName)
    1035 {
    1036   dprintf(("MPR:WNetSetLastErrorA (%08x,%s,%s) not implemented correctly.\n",
    1037            dwErrorCode,
    1038            lpszDescription,
    1039            lpszName));
    1040 
     906ODINFUNCTION3(DWORD, OS2WNetSetLastErrorA,
     907              DWORD, dwErrorCode,
     908              LPTSTR, lpszDescription,
     909              LPTSTR, lpszName)
     910{
     911  dprintf(("MPR:WNetSetLastErrorA not implemented correctly.\n"));
    1041912  MPRGLOBALS.dwLastError = dwErrorCode;
    1042 
    1043913  return (NO_ERROR);
    1044914}
     
    1047917
    1048918/*****************************************************************************
    1049  * Name      : DWORD WIN32API WNetSetLastErrorW
    1050  * Purpose   : The WNetSetLastError function is used to set the error code status
     919 *             The WNetSetLastError function is used to set the error code status
    1051920 *             of this module.
    1052921 * Parameters: DWORD   dwErrorCode     error code
     
    1061930 *****************************************************************************/
    1062931
    1063 DWORD WIN32API OS2WNetSetLastErrorW (DWORD   dwErrorCode,
    1064                                      LPWSTR  lpszDescription,
    1065                                      LPWSTR  lpszName)
    1066 {
    1067   dprintf(("MPR:WNetSetLastErrorW (%08x,%s,%s) not implemented correctly.\n",
    1068            dwErrorCode,
    1069            lpszDescription,
    1070            lpszName));
    1071 
     932ODINFUNCTION3(DWORD, OS2WNetSetLastErrorW,
     933              DWORD, dwErrorCode,
     934              LPWSTR, lpszDescription,
     935              LPWSTR, lpszName)
     936{
     937  dprintf(("MPR:WNetSetLastErrorW not implemented correctly.\n"));
    1072938  MPRGLOBALS.dwLastError = dwErrorCode;
    1073 
    1074939  return (NO_ERROR);
    1075940}
    1076941
     942
Note: See TracChangeset for help on using the changeset viewer.