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.

175 lines
6.4 KiB

  1. //**********************************************************************
  2. //
  3. // NETDI.H
  4. //
  5. // Copyright (c) 1994 - Microsoft Corp.
  6. // All rights reserved.
  7. // Microsoft Confidential
  8. //
  9. // Public include file for Chicago Network Device Installer services.
  10. //
  11. //**********************************************************************
  12. #ifndef _INC_NETDI
  13. #define _INC_NETDI // NETDI.H signature
  14. #include <prsht.h> // Property sheet API
  15. #include <setupx.h> // Device Installer API
  16. // Return error codes for NDI_ messages.
  17. #define NDI_ERROR (1200) // BUGBUG see setupx.h for error #
  18. enum _ERR_NET_DEVICE_INSTALL
  19. {
  20. ERR_NDI_ERROR = NDI_ERROR, // generic failure
  21. ERR_NDI_INVALID_HNDI,
  22. ERR_NDI_INVALID_DEVICE_INFO,
  23. ERR_NDI_INVALID_DRIVER_PROC,
  24. ERR_NDI_LOW_MEM,
  25. ERR_NDI_REG_API,
  26. ERR_NDI_NOTBOUND,
  27. ERR_NDI_NO_MATCH,
  28. ERR_NDI_INVALID_NETCLASS,
  29. ERR_NDI_INSTANCE_ONCE,
  30. ERR_NDI_CANCEL,
  31. };
  32. // Network Driver Info Handle
  33. DECLARE_HANDLE(HNDI);
  34. // Network Driver Installer Callback
  35. typedef RETERR (CALLBACK* NDIPROC)(HNDI, UINT, WPARAM, LPARAM);
  36. RETERR WINAPI DefNdiProc(HNDI,UINT,WPARAM,LPARAM);
  37. // Network Driver Installer Messages
  38. #define NDI_NULL 0x0000
  39. #define NDI_CREATE 0x0001
  40. #define NDI_DESTROY 0x0002
  41. #define NDI_VALIDATE 0x0003
  42. #define NDI_INSTALL 0x0004
  43. // johnri 3/8/84 removed-using property sheets only
  44. //#define NDI_ASSIGNRESOURCES 0x0005
  45. #define NDI_HASPROPPAGES 0x0005
  46. #define NDI_ADDPROPPAGES 0x0006
  47. // lpapp = (LPNDIADDPROPPAGES)lParam;
  48. typedef BOOL (CALLBACK* LPFNADDNDIPROPPAGE)(LPCPROPSHEETPAGE,LPARAM,BOOL);
  49. typedef struct tagNDIADDPROPPAGES
  50. {
  51. LPFNADDNDIPROPPAGE lpfnAddNdiPropPage;
  52. LPARAM lParam;
  53. } NDIADDPROPPAGES, FAR* LPNDIADDPROPPAGES;
  54. #define NDI_REMOVE 0x0007
  55. #define NDI_FIRSTTIMESETUP 0x0008
  56. #define NDI_QUERY_BIND 0x0009
  57. #define NDI_NOTIFY_BIND 0x000A
  58. #define NDI_NOTIFY_UNBIND 0x000B
  59. #define NDI_GETTEXT 0x000C
  60. #define NDI_SETTEXT 0x000D
  61. #define NDI_NDICREATE 0x0040
  62. #define NDI_NDIDESTROY 0x0041
  63. // Messages above NDI_INSTALLER are reserved for installer dlls
  64. #define NDI_INSTALLER 0x8000
  65. // General NDI management
  66. HNDI WINAPI NdiGetFirst(VOID);
  67. HNDI WINAPI NdiGetNext(HNDI hndi);
  68. HNDI WINAPI NdiFindNdi(HNDI ndiRelation, WORD wNetClass, LPCSTR lpszDeviceId);
  69. RETERR WINAPI NdiIsNdi(HNDI hndi);
  70. RETERR WINAPI NdiCallInstaller(HNDI hndi,UINT,WPARAM,LPARAM);
  71. RETERR WINAPI NdiAddNewDriver(HNDI FAR* lphndi, LPDEVICE_INFO lpdi, LPCSTR lpszDeviceID, UINT uFlags);
  72. #define NDI_ADD_NO_DISELECT 0x0001
  73. // Device Manager
  74. RETERR WINAPI NdiValidate(HNDI hndi, HWND hwndParent);
  75. RETERR WINAPI NdiInstall(HNDI hndi);
  76. RETERR WINAPI NdiRemove(HNDI hndi);
  77. RETERR WINAPI NdiProperties(HNDI hndi, HWND hwndParent);
  78. // Bindings
  79. RETERR WINAPI NdiBind(HNDI hndiLower, HNDI hndiUpper);
  80. RETERR WINAPI NdiUnbind(HNDI hndiLower, HNDI hndiUpper);
  81. RETERR WINAPI NdiQueryBind(HNDI hndiLower, HNDI hndiUpper, UINT uBindType);
  82. RETERR WINAPI NdiIsBound(HNDI hndiLower, HNDI hndiUpper);
  83. RETERR WINAPI NdiGetBinding(HNDI hndi, HNDI FAR* lphndi, UINT uBindType);
  84. enum _NDIBIND {
  85. NDIBIND_UPPER = 1,
  86. NDIBIND_UPPER_FIRST = NDIBIND_UPPER,
  87. NDIBIND_UPPER_NEXT,
  88. NDIBIND_LOWER,
  89. NDIBIND_LOWER_FIRST = NDIBIND_LOWER,
  90. NDIBIND_LOWER_NEXT};
  91. // General NDI Object Properties
  92. RETERR WINAPI NdiGetText(HNDI hndi, LPSTR, UINT);
  93. RETERR WINAPI NdiSetText(HNDI hndi, LPSTR);
  94. RETERR WINAPI NdiGetDeviceInfo(HNDI hndi, LPLPDEVICE_INFO);
  95. RETERR WINAPI NdiGetClass(HNDI hndi, LPWORD lpwClass);
  96. enum _NDICLASS { // lpwClass
  97. NDI_CLASS_NET,
  98. NDI_CLASS_TRANS,
  99. NDI_CLASS_CLIENT,
  100. NDI_CLASS_SERVICE};
  101. RETERR WINAPI NdiGetProperties(HNDI hndi, LPVOID FAR* lplpvProperties);
  102. RETERR WINAPI NdiSetProperties(HNDI hndi, LPVOID lpvProperties);
  103. RETERR WINAPI NdiGetOwnerWindow(HNDI hndi, HWND FAR* lphwnd);
  104. RETERR WINAPI NdiGetDeviceId(HNDI hndi, LPSTR, UINT);
  105. RETERR WINAPI NdiGetFlags(HNDI hndi, LPDWORD lpdwFlags);
  106. #define NDIF_ADDED 0x00000001
  107. #define NDIF_REMOVED 0x00000002
  108. #define NDIF_MODIFIED_BINDINGS 0x00000004
  109. #define NDIF_MODIFIED_PROPERTIES 0x00000008
  110. #define NDIF_SAVE_MASK 0x0000000F
  111. #define NDIF_DEFAULT 0x00000010
  112. #define NDIF_INVISIBLE 0x00000020
  113. #define NDIF_HAS_PARAMS 0x00000040
  114. // Interfaces
  115. RETERR WINAPI NdiCompareInterface(HNDI ndi, UINT uRelation, HNDI ndi2, UINT uRelation2);
  116. RETERR WINAPI NdiGetInterface(HNDI ndi, UINT uRelation, UINT index, LPSTR lpsz, UINT cbSizeOflpsz);
  117. RETERR WINAPI NdiAddInterface(HNDI ndi, UINT uRelation, LPCSTR lpsz);
  118. RETERR WINAPI NdiRemoveInterface(HNDI ndi, UINT uRelation, LPCSTR lpsz);
  119. enum _NDIEDGERELATION {
  120. NDI_EDGE_ALL=100, // used to free all edges and marker for first in edge class
  121. NDI_EDGE_UPPER,
  122. NDI_EDGE_LOWER,
  123. NDI_EDGE_UPPERRANGE,
  124. NDI_EDGE_LOWERRANGE,
  125. NDI_EDGE_REQUIRELOWER,
  126. NDI_EDGE_REQUIREANY,
  127. NDI_EDGE_EXCLUDELOWER,
  128. NDI_EDGE_EXCLUDEANY,
  129. NDI_EDGE_ORGUPPER,
  130. NDI_EDGE_ORGLOWER,
  131. NDI_EDGE_END, // marker only for end of edges
  132. NDI_COMATIBLE_ALL=200, // used to free all edges and marker for first in compatible class
  133. NDI_COMPATIBLE_REQUIREDUPPER,
  134. NDI_COMPATIBLE_REQUIREDLOWER,
  135. NDI_COMPATIBLE_REQUIREDALL,
  136. NDI_COMPATIBLE_EXCLUDEUPPER,
  137. NDI_COMPATIBLE_EXCLUDELOWER,
  138. NDI_COMPATIBLE_EXCLUDEALL,
  139. NDI_COMPATIBLE_END }; // marker only for end of edges
  140. // Driver Registry Access
  141. RETERR WINAPI NdiRegOpenKey(HNDI hndi, LPCSTR lpszSubKey, LPHKEY lphk);
  142. RETERR WINAPI NdiRegCreateKey(HNDI hndi, LPCSTR lpszSubKey, LPHKEY lphk);
  143. RETERR WINAPI NdiRegCloseKey(HKEY hkey);
  144. RETERR WINAPI NdiRegQueryValue(HNDI hndi, LPCSTR lpszSubKey, LPCSTR lpszValueName, LPSTR lpValue, DWORD cbValue);
  145. RETERR WINAPI NdiRegSetValue(HNDI hndi, LPCSTR lpszSubKey, LPCSTR lpszValueName, DWORD dwType, LPCSTR lpValue, DWORD cbValue);
  146. RETERR WINAPI NdiRegDeleteValue(HNDI hndi,LPCSTR lpszSubKey, LPCSTR lpszValueName);
  147. // Entry point called by NETCPL.
  148. RETERR WINAPI NdiCplProperties(HWND hwndCpl);
  149. #endif // _INC_NETDI