Index: trunk/src/mpr/MPR.CPP
===================================================================
--- trunk/src/mpr/MPR.CPP	(revision 583)
+++ trunk/src/mpr/MPR.CPP	(revision 584)
@@ -1,3 +1,3 @@
-/* $Id: MPR.CPP,v 1.3 1999-06-10 17:06:06 phaller Exp $ */
+/* $Id: MPR.CPP,v 1.4 1999-08-19 16:52:23 phaller Exp $ */
 
 /*
@@ -5,12 +5,9 @@
  * Project Odin Software License can be found in LICENSE.TXT
  *
- */
-/*
  * MPR apis
- *
- * 1998/06/12
  *
  * Copyright 1998 Patrick Haller
  */
+
 /*****************************************************************************
  * Name      : MPR.CPP
@@ -23,5 +20,7 @@
 #include <wnet.h>
 #include <string.h>
-#include "misc.h"
+#include <odinwrap.h>
+#include <heapstring.h>
+#include <misc.h>
 #include "mpr.h"
 
@@ -29,50 +28,52 @@
 // MPR.DLL of Windows NT
 
-// WIN32API MultinetGetConnectionPerformanceA
-// WIN32API MultinetGetConnectionPerformanceW
-// WIN32API MultinetGetErrorTextA
-// WIN32API MultinetGetErrorTextW
-// WIN32API RestoreConnectionA0
-// WIN32API WNetClearConnections
-// WIN32API WNetConnectionDialog1A
-// WIN32API WNetConnectionDialog1W
-// WIN32API WNetConnectionDialog2
-// WIN32API WNetDirectoryNotifyA
-// WIN32API WNetDirectoryNotifyW
-// WIN32API WNetDisconnectDialog1A
-// WIN32API WNetDisconnectDialog1W
-// WIN32API WNetDisconnectDialog2
-// WIN32API WNetFMXEditPerm         FileManager Extensions ?
-// WIN32API WNetFMXGetPermCaps
-// WIN32API WNetFMXGetPermHelp
-// WIN32API WNetFormatNetworkNameA
-// WIN32API WNetFormatNetworkNameW
-// WIN32API WNetGetConnection2A
-// WIN32API WNetGetConnection2W
-// WIN32API WNetGetConnection3A
-// WIN32API WNetGetConnection3W
-// WIN32API WNetGetDirectoryTypeA
-// WIN32API WNetGetDirectoryTypeW
-// WIN32API WNetGetHomeDirectoryW   NT specific
-// WIN32API WNetGetNetworkInformationA
-// WIN32API WNetGetNetworkInformationW
-// WIN32API WNetGetPropertyTextA
-// WIN32API WNetGetPropertyTextW
-// WIN32API WNetGetProviderNameA
-// WIN32API WNetGetProviderNameW
-// WIN32API WNetGetSearchDialog
-// WIN32API WNetLogonNotify
-// WIN32API WNetPasswordChangeNotify
-// WIN32API WNetPropertyDialogA
-// WIN32API WNetPropertyDialogW
-// WIN32API WNetRestoreConnectionW
-// WIN32API WNetSetConnectionA
-// WIN32API WNetSetConnectionW
-// WIN32API WNetSetLastErrorA      PH: implemented
-// WIN32API WNetSetLastErrorW      PH: implemented
-// WIN32API WNetSupportGlobalEnum
-// WIN32API WNetUseConnectionA
-// WIN32API WNetUseConnectionW
-
+// MultinetGetConnectionPerformanceA
+// MultinetGetConnectionPerformanceW
+// MultinetGetErrorTextA
+// MultinetGetErrorTextW
+// RestoreConnectionA0
+// WNetClearConnections
+// WNetConnectionDialog1A
+// WNetConnectionDialog1W
+// WNetConnectionDialog2
+// WNetDirectoryNotifyA
+// WNetDirectoryNotifyW
+// WNetDisconnectDialog1A
+// WNetDisconnectDialog1W
+// WNetDisconnectDialog2
+// WNetFMXEditPerm         FileManager Extensions ?
+// WNetFMXGetPermCaps
+// WNetFMXGetPermHelp
+// WNetFormatNetworkNameA
+// WNetFormatNetworkNameW
+// WNetGetConnection2A
+// WNetGetConnection2W
+// WNetGetConnection3A
+// WNetGetConnection3W
+// WNetGetDirectoryTypeA
+// WNetGetDirectoryTypeW
+// WNetGetHomeDirectoryW   NT specific
+// WNetGetNetworkInformationA
+// WNetGetNetworkInformationW
+// WNetGetPropertyTextA
+// WNetGetPropertyTextW
+// WNetGetProviderNameA
+// WNetGetProviderNameW
+// WNetGetSearchDialog
+// WNetLogonNotify
+// WNetPasswordChangeNotify
+// WNetPropertyDialogA
+// WNetPropertyDialogW
+// WNetRestoreConnectionW
+// WNetSetConnectionA
+// WNetSetConnectionW
+// WNetSetLastErrorA      PH: implemented
+// WNetSetLastErrorW      PH: implemented
+// WNetSupportGlobalEnum
+// WNetUseConnectionA
+// WNetUseConnectionW
+
+
+ODINDEBUGCHANNEL(MPR)
 
 /****************************************************************************
@@ -88,6 +89,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnection2A
- * Purpose   : The WNetAddConnection2 function makes a connection to a network
+ *             WNetAddConnection2, makes a connection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -106,22 +106,17 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnection2A(LPNETRESOURCEA lpNetResource,
-                                      LPCSTR        lpPassword,
-                                      LPCSTR        lpUsername,
-                                      DWORD          fdwConnection)
-{
-  dprintf(("MPR:WNetAddConnection2A (%08x,%s,%s,%08x) not implemented.\n",
-           lpNetResource,
-           lpPassword,
-           lpUsername,
-           fdwConnection));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnection2W
- * Purpose   : The WNetAddConnection2 function makes a connection to a network
+ODINFUNCTION4(DWORD, OS2WNetAddConnection2A,
+              LPNETRESOURCEA, lpNetResource,
+              LPCSTR, lpPassword,
+              LPCSTR, lpUsername,
+              DWORD, fdwConnection)
+{
+  dprintf(("MPR:WNetAddConnection2A not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             WNetAddConnection2 makes a connection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -140,23 +135,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnection2W(LPNETRESOURCEW lpNetResource,
-                                      LPCWSTR        lpPassword,
-                                      LPCWSTR        lpUsername,
-                                      DWORD          fdwConnection)
-{
-  dprintf(("MPR:WNetAddConnection2W (%08x,%s,%s,%08x) not implemented.\n",
-           lpNetResource,
-           lpPassword,
-           lpUsername,
-           fdwConnection));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnection3A
- * Purpose   : The WNetAddConnection3 function makes a connection to a network
+ODINFUNCTION4(DWORD, OS2WNetAddConnection2W,
+              LPNETRESOURCEW, lpNetResource,
+              LPCWSTR, lpPassword,
+              LPCWSTR, lpUsername,
+              DWORD, fdwConnection)
+{
+  dprintf(("MPR:WNetAddConnection2W not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+
+/*****************************************************************************
+ *             WNetAddConnection3 makes, aconnection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -176,24 +166,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnection3A(HWND           hwndOwner,
-                                      LPNETRESOURCEA lpNetResource,
-                                      LPCSTR        lpPassword,
-                                      LPCSTR        lpUsername,
-                                      DWORD          fdwConnection)
-{
-  dprintf(("MPR:WNetAddConnection3A (%08x,%08x,%s,%s,%08x) not implemented.\n",
-           hwndOwner,
-           lpNetResource,
-           lpPassword,
-           lpUsername,
-           fdwConnection));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnection3W
- * Purpose   : The WNetAddConnection3 function makes a connection to a network
+ODINFUNCTION5(DWORD, OS2WNetAddConnection3A,
+              HWND, hwndOwner,
+              LPNETRESOURCEA, lpNetResource,
+              LPCSTR, lpPassword,
+              LPCSTR, lpUsername,
+              DWORD, fdwConnection)
+{
+  dprintf(("MPR:WNetAddConnection3A not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             WNetAddConnection3 makes, connection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -213,24 +197,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnection3W(HWND           hwndOwner,
-                                      LPNETRESOURCEW lpNetResource,
-                                      LPCWSTR        lpPassword,
-                                      LPCWSTR        lpUsername,
-                                      DWORD          fdwConnection)
-{
-  dprintf(("MPR:WNetAddConnection3W (%08x,%08x,%s,%s,%08x) not implemented.\n",
-           hwndOwner,
-           lpNetResource,
-           lpPassword,
-           lpUsername,
-           fdwConnection));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnectionA
- * Purpose   : The WNetAddConnection function makes a connection to a network
+ODINFUNCTION5(DWORD, OS2WNetAddConnection3W,
+              HWND, hwndOwner,
+              LPNETRESOURCEW, lpNetResource,
+              LPCWSTR, lpPassword,
+              LPCWSTR, lpUsername,
+              DWORD, fdwConnection)
+{
+  dprintf(("MPR:WNetAddConnection3W not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             WNetAddConnectionA makes a connection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -246,20 +224,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnectionA(LPCSTR lpRemoteName,
-                                     LPCSTR lpPassword,
-                                     LPCSTR lpUsername)
-{
-  dprintf(("MPR:WNetAddConnectionA (%s,%s,%s) not implemented.\n",
-           lpRemoteName,
-           lpPassword,
-           lpUsername));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetAddConnectionW
- * Purpose   : The WNetAddConnection function makes a connection to a network
+ODINFUNCTION3(DWORD, OS2WNetAddConnectionA,
+              LPCSTR, lpRemoteName,
+              LPCSTR, lpPassword,
+              LPCSTR, lpUsername)
+{
+  dprintf(("MPR:WNetAddConnectionA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             WNetAddConnection makes a connection to a network
  *             resource. The function can redirect a local device to the network
  *             resource.
@@ -275,20 +249,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetAddConnectionW(LPCWSTR lpRemoteName,
-                                     LPCWSTR lpPassword,
-                                     LPCWSTR lpUsername)
-{
-  dprintf(("MPR:WNetAddConnectionW (%s,%s,%s) not implemented.\n",
-           lpRemoteName,
-           lpPassword,
-           lpUsername));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetCancelConnection2A
- * Purpose   : The WNetCancelConnection2 function breaks an existing network
+ODINFUNCTION3(DWORD, OS2WNetAddConnectionW,
+              LPCWSTR, lpRemoteName,
+              LPCWSTR, lpPassword,
+              LPCWSTR, lpUsername)
+{
+  dprintf(("MPR:WNetAddConnectionW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetCancelConnection2 function breaks an existing network
  *             connection. It can also be used to remove remembered network
  *             connections that are not currently connected. This function
@@ -305,13 +275,10 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetCancelConnection2A(LPTSTR lpszName,
-                                         DWORD  fdwConnection,
-                                         BOOL   fForce)
-{
-  dprintf(("MPR:WNetCancelConnection2A (%s,%08x,%u) not implemented.\n",
-           lpszName,
-           fdwConnection,
-           fForce));
-
+ODINFUNCTION3(DWORD, OS2WNetCancelConnection2A,
+              LPTSTR, lpszName,
+              DWORD, fdwConnection,
+              BOOL, fForce)
+{
+  dprintf(("MPR:WNetCancelConnection2A not implemented.\n"));
   return (ERROR_NOT_CONNECTED);
 }
@@ -319,6 +286,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetCancelConnection2W
- * Purpose   : The WNetCancelConnection2 function breaks an existing network
+ *             The WNetCancelConnection2 function breaks an existing network
  *             connection. It can also be used to remove remembered network
  *             connections that are not currently connected. This function
@@ -335,13 +301,10 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetCancelConnection2W(LPWSTR lpszName,
-                                         DWORD  fdwConnection,
-                                         BOOL   fForce)
-{
-  dprintf(("MPR:WNetCancelConnection2W (%s,%08x,%u) not implemented.\n",
-           lpszName,
-           fdwConnection,
-           fForce));
-
+ODINFUNCTION3(DWORD, OS2WNetCancelConnection2W,
+              LPWSTR, lpszName,
+              DWORD, fdwConnection,
+              BOOL, fForce)
+{
+  dprintf(("MPR:WNetCancelConnection2W not implemented.\n"));
   return (ERROR_NOT_CONNECTED);
 }
@@ -349,6 +312,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetCancelConnectionA
- * Purpose   : The WNetCancelConnection2 function breaks an existing network
+ *             The WNetCancelConnection2 function breaks an existing network
  *             connection.
  * Parameters: LPTSTR lpszName      address of resource name to disconnect
@@ -362,11 +324,9 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetCancelConnectionA(LPTSTR lpszName,
-                                        BOOL   fForce)
-{
-  dprintf(("MPR:WNetCancelConnectionA (%s,%08x,%u) not implemented.\n",
-           lpszName,
-           fForce));
-
+ODINFUNCTION2(DWORD, OS2WNetCancelConnectionA,
+              LPTSTR, lpszName,
+              BOOL, fForce)
+{
+  dprintf(("MPR:WNetCancelConnectionA not implemented.\n"));
   return (ERROR_NOT_CONNECTED);
 }
@@ -374,6 +334,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetCancelConnectionW
- * Purpose   : The WNetCancelConnection2 function breaks an existing network
+ *             The WNetCancelConnection2 function breaks an existing network
  *             connection.
  * Parameters: LPTSTR lpszName      address of resource name to disconnect
@@ -387,11 +346,9 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetCancelConnectionW(LPWSTR lpszName,
-                                        BOOL   fForce)
-{
-  dprintf(("MPR:WNetCancelConnectionW (%s,%08x,%u) not implemented.\n",
-           lpszName,
-           fForce));
-
+ODINFUNCTION2(DWORD, OS2WNetCancelConnectionW,
+              LPWSTR, lpszName,
+              BOOL, fForce)
+{
+  dprintf(("MPR:WNetCancelConnectionW not implemented.\n"));
   return (ERROR_NOT_CONNECTED);
 }
@@ -399,5 +356,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetCloseEnum
+ *
  * Purpose   : The WNetCloseEnum function ends a network resource enumeration
  *               started by the WNetOpenEnum function.
@@ -411,16 +368,14 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetCloseEnum (HANDLE hEnum)
-{
-  dprintf(("MPR:WNetCloseEnum (%08x) not implemented.\n",
-           hEnum));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetConnectionDialog
- * Purpose   : The WNetConnectionDialog function starts a general browsing
+ODINFUNCTION1(DWORD, OS2WNetCloseEnum,
+              HANDLE, hEnum)
+{
+  dprintf(("MPR:WNetCloseEnum not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetConnectionDialog function starts a general browsing
  *             dialog box for connecting to network resources.
  * Parameters: HWND  hwnd            handle of window owning dialog box
@@ -434,18 +389,15 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetConnectionDialog (HWND  hwnd,
-                                        DWORD fdwResourceType)
-{
-  dprintf(("MPR:WNetConnectionDialog (%08x,%08x) not implemented.\n",
-           hwnd,
-           fdwResourceType));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetDisconnectDialog
- * Purpose   : The WNetDisconnectDialog function starts a general browsing
+ODINFUNCTION2(DWORD, OS2WNetConnectionDialog,
+              HWND, hwnd,
+              DWORD, fdwResourceType)
+{
+  dprintf(("MPR:WNetConnectionDialog not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetDisconnectDialog function starts a general browsing
  *             dialog box for disconnecting from network resources.
  * Parameters: HWND  hwnd            handle of window owning dialog box
@@ -459,19 +411,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetDisconnectDialog (HWND  hwnd,
-                                        DWORD fdwResourceType)
-{
-  dprintf(("MPR:WNetDisconnectDialog (%08x,%08x) not implemented.\n",
-           hwnd,
-           fdwResourceType));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetEnumResourceA
- * Purpose   : The WNetEnumResource function continues a network-resource
- *               enumeration started by the WNetOpenEnum function.
+ODINFUNCTION2(DWORD, OS2WNetDisconnectDialog,
+              HWND, hwnd,
+              DWORD, fdwResourceType)
+{
+  dprintf(("MPR:WNetDisconnectDialog not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetEnumResource function continues a network-resource
+ *             enumeration started by the WNetOpenEnum function.
  * Parameters: HANDLE  hEnum      handle of enumeration
  *             LPDWORD lpcEntries address of entries to list
@@ -486,23 +435,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetEnumResourceA (HANDLE  hEnum,
-                                     LPDWORD lpcEntries,
-                                     LPVOID  lpvBuffer,
-                                     LPDWORD lpcBuffer)
-{
-  dprintf(("MPR:WNetEnumResourceA (%08x,%08x,%08x,%08x) not implemented.\n",
-           hEnum,
-           lpcEntries,
-           lpvBuffer,
-           lpcBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetEnumResourceW
- * Purpose   : The WNetEnumResource function continues a network-resource
- *               enumeration started by the WNetOpenEnum function.
+ODINFUNCTION4(DWORD, OS2WNetEnumResourceA,
+              HANDLE, hEnum,
+              LPDWORD, lpcEntries,
+              LPVOID, lpvBuffer,
+              LPDWORD, lpcBuffer)
+{
+  dprintf(("MPR:WNetEnumResourceA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetEnumResource, functioncontinues a network-resource
+ *             enumeration started by the WNetOpenEnum function.
  * Parameters: HANDLE  hEnum      handle of enumeration
  *             LPDWORD lpcEntries address of entries to list
@@ -517,23 +461,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetEnumResourceW (HANDLE  hEnum,
-                                     LPDWORD lpcEntries,
-                                     LPVOID  lpvBuffer,
-                                     LPDWORD lpcBuffer)
-{
-  dprintf(("MPR:WNetEnumResourceW (%08x,%08x,%08x,%08x) not implemented.\n",
-           hEnum,
-           lpcEntries,
-           lpvBuffer,
-           lpcBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetConnectionA
- * Purpose   : The WNetGetConnection function retrieves the name of the network
- *               resource associated with a local device.
+ODINFUNCTION4(DWORD, OS2WNetEnumResourceW,
+              HANDLE, hEnum,
+              LPDWORD, lpcEntries,
+              LPVOID, lpvBuffer,
+              LPDWORD, lpcBuffer)
+{
+  dprintf(("MPR:WNetEnumResourceW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetGetConnection function retrieves the name of the network
+ *             resource associated with a local device.
  * Parameters: LPTSTR  lpszLocalName  address of local name
  *             LPTSTR  lpszRemoteName address of buffer for remote name
@@ -547,21 +486,17 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetConnectionA (LPTSTR lpszLocalName,
-                                      LPTSTR lpszRemoteName,
-                                      LPDWORD lpcchBuffer)
-{
-  dprintf(("MPR:WNetGetConnectionA (%s,%s,%08x) not implemented.\n",
-           lpszLocalName,
-           lpszRemoteName,
-           lpcchBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetConnectionW
- * Purpose   : The WNetGetConnection function retrieves the name of the network
- *               resource associated with a local device.
+ODINFUNCTION3(DWORD, OS2WNetGetConnectionA,
+              LPTSTR, lpszLocalName,
+              LPTSTR, lpszRemoteName,
+              LPDWORD, lpcchBuffer)
+{
+  dprintf(("MPR:WNetGetConnectionA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetGetConnection function retrieves the name of the network
+ *             resource associated with a local device.
  * Parameters: LPWSTR  lpszLocalName  address of local name
  *             LPWSTR  lpszRemoteName address of buffer for remote name
@@ -575,20 +510,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetConnectionW (LPWSTR lpszLocalName,
-                                      LPWSTR lpszRemoteName,
-                                      LPDWORD lpcchBuffer)
-{
-  dprintf(("MPR:WNetGetConnectionW (%s,%s,%08x) not implemented.\n",
-           lpszLocalName,
-           lpszRemoteName,
-           lpcchBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetLastErrorA
- * Purpose   : The WNetGetLastError function retrieves the most recent extended
+ODINFUNCTION3(DWORD, OS2WNetGetConnectionW,
+              LPWSTR, lpszLocalName,
+              LPWSTR, lpszRemoteName,
+              LPDWORD, lpcchBuffer)
+{
+  dprintf(("MPR:WNetGetConnectionW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *            The WNetGetLastError function retrieves, themost recent extended
  *               error code set by a Windows network function.
  * Parameters: LPDWORD lpdwErrorCode   address of error code
@@ -605,17 +536,11 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetLastErrorA (LPDWORD lpdwErrorCode,
-                                     LPTSTR  lpszDescription,
-                                     DWORD   cchDescription,
-                                     LPTSTR  lpszName,
-                                     DWORD   cchName)
-{
-  dprintf(("MPR:WNetGetLastErrorA (%08x,%08x,%08x,%08x,%80x).\n",
-           lpdwErrorCode,
-           lpszDescription,
-           cchDescription,
-           lpszName,
-           cchName));
-
+ODINFUNCTION5(DWORD, OS2WNetGetLastErrorA,
+              LPDWORD, lpdwErrorCode,
+              LPTSTR, lpszDescription,
+              DWORD, cchDescription,
+              LPTSTR, lpszName,
+              DWORD, cchName)
+{
   if ( (lpdwErrorCode   == NULL) ||                     /* check parameters */
        (lpszDescription == NULL) ||
@@ -640,6 +565,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetLastErrorW
- * Purpose   : The WNetGetLastError function retrieves the most recent extended
+ *            The WNetGetLastError function retrieves, themost recent extended
  *               error code set by a Windows network function.
  * Parameters: LPDWORD lpdwErrorCode   address of error code
@@ -656,17 +580,11 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetLastErrorW (LPDWORD lpdwErrorCode,
-                                     LPWSTR  lpszDescription,
-                                     DWORD   cchDescription,
-                                     LPWSTR  lpszName,
-                                     DWORD   cchName)
-{
-  dprintf(("MPR:WNetGetLastErrorA (%08x,%08x,%08x,%08x,%80x) not correctly implemented.\n",
-           lpdwErrorCode,
-           lpszDescription,
-           cchDescription,
-           lpszName,
-           cchName));
-
+ODINFUNCTION5(DWORD, OS2WNetGetLastErrorW,
+              LPDWORD, lpdwErrorCode,
+              LPWSTR, lpszDescription,
+              DWORD, cchDescription,
+              LPWSTR, lpszName,
+              DWORD, cchName)
+{
   if ( (lpdwErrorCode   == NULL) ||                     /* check parameters */
        (lpszDescription == NULL) ||
@@ -680,6 +598,6 @@
   lpszDescription[cchDescription - 1] = 0;     /* ensure string termination */
 
-  strncpy ((LPTSTR)lpszName,                        /* return provider name */
-            "OS/2 LAN",                      /* that's our default provider */
+  lstrcpynW(lpszName,                               /* return provider name */
+            (LPCWSTR)L"OS/2 LAN",            /* that's our default provider */
             cchName);
   lpszName[cchName - 1] = 0;                   /* ensure string termination */
@@ -690,5 +608,4 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetResourceInformationA
  * Purpose   : The WNetGetResourceInformation function retrieves enumeration
  *             information for a network resource. You typically use this
@@ -713,15 +630,11 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetResourceInformationA(LPNETRESOURCEA lpNetResource,
-                                              LPVOID         lpBuffer,
-                                              LPDWORD        cbBuffer,
-                                              LPTSTR         *lplpSystem)
-{
-  dprintf(("MPR:WNetGetResourceInformationA (%08x,%08x,%08x,%08x) not implemented.\n",
-           lpNetResource,
-           lpBuffer,
-           cbBuffer,
-           lplpSystem));
-
+ODINFUNCTION4(DWORD, OS2WNetGetResourceInformationA,
+              LPNETRESOURCEA, lpNetResource,
+              LPVOID, lpBuffer,
+              LPDWORD, cbBuffer,
+              LPTSTR *, lplpSystem)
+{
+  dprintf(("MPR:WNetGetResourceInformationA not implemented.\n"));
   return (WN_NO_NETWORK);
 }
@@ -729,5 +642,4 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetResourceInformationW
  * Purpose   : The WNetGetResourceInformation function retrieves enumeration
  *             information for a network resource. You typically use this
@@ -752,8 +664,9 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetResourceInformationW(LPNETRESOURCEW lpNetResource,
-                                              LPVOID         lpBuffer,
-                                              LPDWORD        cbBuffer,
-                                              LPWSTR         *lplpSystem)
+ODINFUNCTION4(DWORD, OS2WNetGetResourceInformationW,
+              LPNETRESOURCEW, lpNetResource,
+              LPVOID, lpBuffer,
+              LPDWORD, cbBuffer,
+              LPWSTR *, lplpSystem)
 {
   dprintf(("MPR:WNetGetResourceInformationW (%08x,%08x,%08x,%08x) not implemented.\n",
@@ -768,6 +681,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetResourceParentA
- * Purpose   : The WNetGetResourceParent function lets you navigate up from a
+ *             The WNetGetResourceParent function lets you navigate up from a
  *             resource. It enables browsing to commence based on the name of
  *             a network resource. This function also allows navigating up from
@@ -784,13 +696,10 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetResourceParentA(LPNETRESOURCEA lpNetResource,
-                                         LPVOID         lpBuffer,
-                                         LPDWORD        lpBufferSize)
-{
-  dprintf(("MPR:WNetGetResourceParentA (%08x,%08x,%u) not implemented.\n",
-           lpNetResource,
-           lpBuffer,
-           lpBufferSize));
-
+ODINFUNCTION3(DWORD, OS2WNetGetResourceParentA,
+              LPNETRESOURCEA, lpNetResource,
+              LPVOID, lpBuffer,
+              LPDWORD, lpBufferSize)
+{
+  dprintf(("MPR:WNetGetResourceParentA not implemented.\n"));
   return (WN_ACCESS_DENIED);
 }
@@ -798,6 +707,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetResourceParentW
- * Purpose   : The WNetGetResourceParent function lets you navigate up from a
+ *             The WNetGetResourceParent function lets you navigate up from a
  *             resource. It enables browsing to commence based on the name of
  *             a network resource. This function also allows navigating up from
@@ -814,13 +722,10 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetResourceParentW(LPNETRESOURCEW lpNetResource,
-                                         LPVOID         lpBuffer,
-                                         LPDWORD        lpBufferSize)
-{
-  dprintf(("MPR:WNetGetResourceParentW (%08x,%08x,%u) not implemented.\n",
-           lpNetResource,
-           lpBuffer,
-           lpBufferSize));
-
+ODINFUNCTION3(DWORD, OS2WNetGetResourceParentW,
+              LPNETRESOURCEW, lpNetResource,
+              LPVOID, lpBuffer,
+              LPDWORD, lpBufferSize)
+{
+  dprintf(("MPR:WNetGetResourceParentW not implemented.\n"));
   return (WN_ACCESS_DENIED);
 }
@@ -828,6 +733,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetGetUniversalNameA
- * Purpose   : The WNetGetUniversalName function takes a drive-based path for
+ *            The WNetGetUniversalName, functiontakes a drive-based path for
  *             a network resource and obtains a data structure that contains a
  *             more universal form of the name.
@@ -844,22 +748,17 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetUniversalNameA(LPCSTR lpLocalPath,
-                                        DWORD   dwInfoLevel,
-                                        LPVOID  lpBuffer,
-                                        LPDWORD lpBufferSize)
-{
-  dprintf(("MPR:WNetGetUniversalNameA (%s,%08x,%08x,%08x) not implemented.\n",
-           lpLocalPath,
-           dwInfoLevel,
-           lpBuffer,
-           lpBufferSize));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetUniversalNameW
- * Purpose   : The WNetGetUniversalName function takes a drive-based path for
+ODINFUNCTION4(DWORD, OS2WNetGetUniversalNameA,
+              LPCSTR, lpLocalPath,
+              DWORD, dwInfoLevel,
+              LPVOID, lpBuffer,
+              LPDWORD, lpBufferSize)
+{
+  dprintf(("MPR:WNetGetUniversalNameA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetGetUniversalName, functiontakes a drive-based path for
  *             a network resource and obtains a data structure that contains a
  *             more universal form of the name.
@@ -876,22 +775,17 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetUniversalNameW(LPCWSTR lpLocalPath,
-                                        DWORD   dwInfoLevel,
-                                        LPVOID  lpBuffer,
-                                        LPDWORD lpBufferSize)
-{
-  dprintf(("MPR:WNetGetUniversalNameW (%s,%08x,%08x,%08x) not implemented.\n",
-           lpLocalPath,
-           dwInfoLevel,
-           lpBuffer,
-           lpBufferSize));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetUserA
- * Purpose   : The WNetGetUser function retrieves the current default user name
+ODINFUNCTION4(DWORD, OS2WNetGetUniversalNameW,
+              LPCWSTR, lpLocalPath,
+              DWORD, dwInfoLevel,
+              LPVOID, lpBuffer,
+              LPDWORD, lpBufferSize)
+{
+  dprintf(("MPR:WNetGetUniversalNameW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetGetUser function retrieves the current default user name
  *             or the user name used to establish a network connection.
  * Parameters: LPTSTR  lpszLocalName address of local name to get user name for
@@ -906,20 +800,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetUserA(LPTSTR  lpszLocalName,
-                               LPTSTR  lpszUserName,
-                               LPDWORD lpcchBuffer)
-{
-  dprintf(("MPR:WNetGetUserA (%s,%s,%08x) not implemented.\n",
-           lpszLocalName,
-           lpszUserName,
-           lpcchBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetGetUserW
- * Purpose   : The WNetGetUser function retrieves the current default user name
+ODINFUNCTION3(DWORD, OS2WNetGetUserA,
+              LPTSTR, lpszLocalName,
+              LPTSTR, lpszUserName,
+              LPDWORD, lpcchBuffer)
+{
+  dprintf(("MPR:WNetGetUserA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetGetUser function retrieves the current default user name
  *             or the user name used to establish a network connection.
  * Parameters: LPWSTR  lpszLocalName address of local name to get user name for
@@ -934,20 +824,16 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetGetUserW(LPWSTR  lpszLocalName,
-                               LPWSTR  lpszUserName,
-                               LPDWORD lpcchBuffer)
-{
-  dprintf(("MPR:WNetGetUserW (%s,%s,%08x) not implemented.\n",
-           lpszLocalName,
-           lpszUserName,
-           lpcchBuffer));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetOpenEnumA
- * Purpose   : The WNetOpenEnum function starts an enumeration of network
+ODINFUNCTION3(DWORD, OS2WNetGetUserW,
+              LPWSTR, lpszLocalName,
+              LPWSTR, lpszUserName,
+              LPDWORD, lpcchBuffer)
+{
+  dprintf(("MPR:WNetGetUserW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetOpenEnum function starts, anenumeration of network
  *             resources or existing connections.
  * Parameters: DWORD          fdwScope      scope of enumeration
@@ -964,24 +850,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetOpenEnumA(DWORD          fdwScope,
-                                DWORD          fdwType,
-                                DWORD          fdwUsage,
-                                LPNETRESOURCEA lpNetResource,
-                                LPHANDLE       lphEnum)
-{
-  dprintf(("MPR:WNetOpenEnumA (%08x,%08x,%08x,%08x,%08x) not implemented.\n",
-           fdwScope,
-           fdwType,
-           fdwUsage,
-           lpNetResource,
-           lphEnum));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetOpenEnumW
- * Purpose   : The WNetOpenEnum function starts an enumeration of network
+ODINFUNCTION5(DWORD, OS2WNetOpenEnumA,
+              DWORD, fdwScope,
+              DWORD, fdwType,
+              DWORD, fdwUsage,
+              LPNETRESOURCEA, lpNetResource,
+              LPHANDLE, lphEnum)
+{
+  dprintf(("MPR:WNetOpenEnumA not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetOpenEnum function starts, anenumeration of network
  *             resources or existing connections.
  * Parameters: DWORD          fdwScope      scope of enumeration
@@ -998,24 +878,18 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetOpenEnumW(DWORD          fdwScope,
-                                DWORD          fdwType,
-                                DWORD          fdwUsage,
-                                LPNETRESOURCEW lpNetResource,
-                                LPHANDLE       lphEnum)
-{
-  dprintf(("MPR:WNetOpenEnumW (%08x,%08x,%08x,%08x,%08x) not implemented.\n",
-           fdwScope,
-           fdwType,
-           fdwUsage,
-           lpNetResource,
-           lphEnum));
-
-  return (ERROR_NO_NETWORK);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD WIN32API WNetSetLastErrorA
- * Purpose   : The WNetSetLastError function is used to set the error code status
+ODINFUNCTION5(DWORD, OS2WNetOpenEnumW,
+              DWORD, fdwScope,
+              DWORD, fdwType,
+              DWORD, fdwUsage,
+              LPNETRESOURCEW, lpNetResource,
+              LPHANDLE, lphEnum)
+{
+  dprintf(("MPR:WNetOpenEnumW not implemented.\n"));
+  return (ERROR_NO_NETWORK);
+}
+
+
+/*****************************************************************************
+ *             The WNetSetLastError function is used to set the error code status
  *             of this module.
  * Parameters: DWORD   dwErrorCode     error code
@@ -1030,15 +904,11 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetSetLastErrorA (DWORD   dwErrorCode,
-                                     LPTSTR  lpszDescription,
-                                     LPTSTR  lpszName)
-{
-  dprintf(("MPR:WNetSetLastErrorA (%08x,%s,%s) not implemented correctly.\n",
-           dwErrorCode,
-           lpszDescription,
-           lpszName));
-
+ODINFUNCTION3(DWORD, OS2WNetSetLastErrorA,
+              DWORD, dwErrorCode,
+              LPTSTR, lpszDescription,
+              LPTSTR, lpszName)
+{
+  dprintf(("MPR:WNetSetLastErrorA not implemented correctly.\n"));
   MPRGLOBALS.dwLastError = dwErrorCode;
-
   return (NO_ERROR);
 }
@@ -1047,6 +917,5 @@
 
 /*****************************************************************************
- * Name      : DWORD WIN32API WNetSetLastErrorW
- * Purpose   : The WNetSetLastError function is used to set the error code status
+ *             The WNetSetLastError function is used to set the error code status
  *             of this module.
  * Parameters: DWORD   dwErrorCode     error code
@@ -1061,16 +930,13 @@
  *****************************************************************************/
 
-DWORD WIN32API OS2WNetSetLastErrorW (DWORD   dwErrorCode,
-                                     LPWSTR  lpszDescription,
-                                     LPWSTR  lpszName)
-{
-  dprintf(("MPR:WNetSetLastErrorW (%08x,%s,%s) not implemented correctly.\n",
-           dwErrorCode,
-           lpszDescription,
-           lpszName));
-
+ODINFUNCTION3(DWORD, OS2WNetSetLastErrorW,
+              DWORD, dwErrorCode,
+              LPWSTR, lpszDescription,
+              LPWSTR, lpszName)
+{
+  dprintf(("MPR:WNetSetLastErrorW not implemented correctly.\n"));
   MPRGLOBALS.dwLastError = dwErrorCode;
-
   return (NO_ERROR);
 }
 
+
