Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
3.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. WNet1632.h
  7. This file allows WNet clients to be singled sourced for Win16 and Win32.
  8. FILE HISTORY:
  9. Johnl 30-Oct-1991 Created
  10. terryk 07-Nov-1991 undef WNetGetUser
  11. terryk 18-Nov-1991 add npwnet.h
  12. terryk 03-Jan-1992 MPR conversion
  13. terryk 06-Jan-1992 add mprwnet.h mprerr.h
  14. */
  15. #ifndef _WNET1632_H_
  16. #define _WNET1632_H_
  17. #ifndef WIN32
  18. /* The following make the Winnet32.h NT-ese friendly to our 16 bit friends.
  19. */
  20. #define IN
  21. #define OUT
  22. #define LPTSTR LPSTR
  23. /* Include the 16 bit winnet driver, note that we have hacked out all of
  24. * the functionality between this file and Winnet32.h.
  25. */
  26. #include <winnet16.h>
  27. // not in winnet32.h
  28. /* This manifest existed in winnet.h but not in winnet32.h and
  29. npapi.h.
  30. */
  31. #endif
  32. // This will cover up the WNetCloseEnum in winnet32.h and use the
  33. // one in npapi.h
  34. #define WNetCloseEnum DWORDWNetCloseEnum
  35. #define WNetConnectionDialog DWORDWNetConnectionDialog
  36. #include <winnetwk.h>
  37. #undef WNetCloseEnum
  38. #undef WNetConnectionDialog
  39. // include the npapi.h
  40. #define LPDWORD PUINT
  41. #define DWORD UINT
  42. #ifdef WIN32
  43. #define LPUINT PUINT
  44. #include <npwnet.h>
  45. #include <npapi.h>
  46. #else
  47. #undef WNetAddConnection
  48. #undef WNetAddConnection2
  49. #undef WNetCancelConnection
  50. #undef WNetGetConnection
  51. #undef WNetOpenEnum
  52. #undef WNetEnumResource
  53. #undef WNetGetUser
  54. #undef WNetGetLastError
  55. #include <mprerr.h>
  56. #include <mprwnet.h>
  57. // 16 bits version
  58. #define NPGetConnection WNetGetConnection
  59. #define NPGetCaps WNetGetCaps
  60. #define NPDeviceMode WNetDeviceMode
  61. //#define NPGetUser WNetGetUser
  62. //#define NPAddConnection WNetAddConnection
  63. #define NPCancelConnection WNetCancelConnection
  64. #define NPPropertyDialog WNetPropertyDialog
  65. #define NPGetDirectoryType WNetGetDirectoryType
  66. #define NPDirectoryNotify WNetDirectoryNotify
  67. #define NPGetPropertyText WNetGetPropertyText
  68. #define NPOpenEnum WNetOpenEnum
  69. #define NPEnumResource WNetEnumResource
  70. #define NPCloseEnum WNetCloseEnum
  71. #include <npapi.h>
  72. // Use the old WNetAddConnection conversion
  73. UINT APIENTRY WNetAddConnection( LPSTR, LPSTR, LPSTR );
  74. UINT APIENTRY WNetRestoreConnection( HWND, LPSTR );
  75. // Skip the DWORD WNetConnectionDialog in winnet32.h
  76. UINT APIENTRY WNetConnectionDialog( HWND, UINT );
  77. #endif
  78. #undef DWORD
  79. #undef LPDWORD
  80. #ifndef WIN32
  81. #undef WNetGetUser
  82. /* There are error codes the Win32 network driver supports that the
  83. * Win16 driver doesn't
  84. */
  85. #undef WN_NO_NETWORK
  86. #undef WN_NO_NET_OR_BAD_PATH
  87. /* The following are defined in both
  88. */
  89. //#undef WN_BAD_HANDLE
  90. //#undef WN_NO_MORE_ENTRIES
  91. #endif
  92. #endif // _WNET1632_H_