Source code of Windows XP (NT5)
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.

537 lines
16 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // File: netcfgx.idl
  7. //
  8. //----------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//")
  11. cpp_quote("// Microsoft Windows")
  12. cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
  13. cpp_quote("//")
  14. cpp_quote("//--------------------------------------------------------------------------")
  15. cpp_quote("#if ( _MSC_VER >= 800 )")
  16. cpp_quote("#pragma warning(disable:4201)")
  17. cpp_quote("#endif")
  18. #ifndef DO_NO_IMPORTS
  19. import "unknwn.idl";
  20. import "wtypes.idl";
  21. import "prsht.idl";
  22. #endif
  23. cpp_quote("")
  24. cpp_quote("EXTERN_C const CLSID CLSID_CNetCfg;")
  25. cpp_quote("")
  26. cpp_quote("#define NETCFG_E_ALREADY_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA020)")
  27. cpp_quote("#define NETCFG_E_NOT_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA021)")
  28. cpp_quote("#define NETCFG_E_IN_USE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA022)")
  29. cpp_quote("#define NETCFG_E_NO_WRITE_LOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA024)")
  30. cpp_quote("#define NETCFG_E_NEED_REBOOT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA025)")
  31. cpp_quote("#define NETCFG_E_ACTIVE_RAS_CONNECTIONS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA026)")
  32. // THe network adapter does not exists in the system (Eisa and Mca)
  33. cpp_quote("#define NETCFG_E_ADAPTER_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA027)")
  34. // The component was removed and cannot be added until the system is rebooted
  35. cpp_quote("#define NETCFG_E_COMPONENT_REMOVED_PENDING_REBOOT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA028)")
  36. cpp_quote("#define NETCFG_S_REBOOT MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xA020)")
  37. cpp_quote("#define NETCFG_S_DISABLE_QUERY MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xA022)")
  38. cpp_quote("#define NETCFG_S_STILL_REFERENCED MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xA023)")
  39. cpp_quote("#define NETCFG_S_CAUSED_SETUP_CHANGE MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xA024)")
  40. cpp_quote("#define NETCFG_S_COMMIT_NOW MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xA025)")
  41. cpp_quote("")
  42. cpp_quote("#define NETCFG_CLIENT_CID_MS_MSClient TEXT(\"ms_msclient\")")
  43. cpp_quote("#define NETCFG_SERVICE_CID_MS_SERVER TEXT(\"ms_server\")")
  44. cpp_quote("#define NETCFG_SERVICE_CID_MS_NETBIOS TEXT(\"ms_netbios\")")
  45. cpp_quote("#define NETCFG_SERVICE_CID_MS_PSCHED TEXT(\"ms_pschedpc\")")
  46. cpp_quote("#define NETCFG_SERVICE_CID_MS_WLBS TEXT(\"ms_wlbs\")")
  47. cpp_quote("#define NETCFG_TRANS_CID_MS_APPLETALK TEXT(\"ms_appletalk\")")
  48. cpp_quote("#define NETCFG_TRANS_CID_MS_NETBEUI TEXT(\"ms_netbeui\")")
  49. cpp_quote("#define NETCFG_TRANS_CID_MS_NETMON TEXT(\"ms_netmon\")")
  50. cpp_quote("#define NETCFG_TRANS_CID_MS_NWIPX TEXT(\"ms_nwipx\")")
  51. cpp_quote("#define NETCFG_TRANS_CID_MS_NWSPX TEXT(\"ms_nwspx\")")
  52. cpp_quote("#define NETCFG_TRANS_CID_MS_TCPIP TEXT(\"ms_tcpip\")")
  53. // Reserved GUIDS for Microsoft use
  54. //
  55. // C0E8AE90-306E-11D1-AACF-00805FC1270E IID_IEnumNetCfgBindingInterface
  56. // C0E8AE91-306E-11D1-AACF-00805FC1270E IID_IEnumNetCfgBindingPath
  57. // C0E8AE92-306E-11D1-AACF-00805FC1270E IID_IEnumNetCfgComponent
  58. // C0E8AE93-306E-11D1-AACF-00805FC1270E IID_INetCfg
  59. // C0E8AE94-306E-11D1-AACF-00805FC1270E IID_INetCfgBindingInterface
  60. // C0E8AE95-306E-11D1-AACF-00805FC1270E IID_INetCfgProperties
  61. // C0E8AE96-306E-11D1-AACF-00805FC1270E IID_INetCfgBindingPath
  62. // C0E8AE97-306E-11D1-AACF-00805FC1270E IID_INetCfgClass
  63. // C0E8AE98-306E-11D1-AACF-00805FC1270E IID_INetCfgSysPrep
  64. // C0E8AE99-306E-11D1-AACF-00805FC1270E IID_INetCfgComponent
  65. // C0E8AE9A-306E-11D1-AACF-00805FC1270E IID_INetCfgComponentSysPrep
  66. // C0E8AE9B-306E-11D1-AACF-00805FC1270E (open)
  67. // C0E8AE9C-306E-11D1-AACF-00805FC1270E (open)
  68. // C0E8AE9D-306E-11D1-AACF-00805FC1270E IID_INetCfgClassSetup
  69. // C0E8AE9E-306E-11D1-AACF-00805FC1270E IID_INetCfgComponentBindings
  70. // C0E8AE9F-306E-11D1-AACF-00805FC1270E IID_INetCfgLock
  71. // C0E8AEA0-306E-11D1-AACF-00805FC1270E
  72. // C0E8AEA1-306E-11D1-AACF-00805FC1270E
  73. // C0E8AEA2-306E-11D1-AACF-00805FC1270E
  74. // C0E8AEA3-306E-11D1-AACF-00805FC1270E
  75. // C0E8AEA4-306E-11D1-AACF-00805FC1270E
  76. // C0E8AEA5-306E-11D1-AACF-00805FC1270E
  77. // C0E8AEA6-306E-11D1-AACF-00805FC1270E
  78. // C0E8AEA7-306E-11D1-AACF-00805FC1270E
  79. // C0E8AEA8-306E-11D1-AACF-00805FC1270E
  80. // C0E8AEA9-306E-11D1-AACF-00805FC1270E
  81. // ...
  82. // C0E8B266-306E-11D1-AACF-00805FC1270E
  83. // C0E8B267-306E-11D1-AACF-00805FC1270E
  84. // C0E8B268-306E-11D1-AACF-00805FC1270E
  85. interface IEnumNetCfgBindingInterface;
  86. interface IEnumNetCfgBindingPath;
  87. interface IEnumNetCfgComponent;
  88. interface INetCfg;
  89. interface INetCfgProperties;
  90. interface INetCfgLock;
  91. interface INetCfgBindingInterface;
  92. interface INetCfgBindingPath;
  93. interface INetCfgComponentBindings;
  94. interface INetCfgBindingPath;
  95. interface INetCfgClass;
  96. interface INetCfgComponent;
  97. interface INetCfgIdentification;
  98. interface INetCfgClassSetup;
  99. //+---------------------------------------------------------------------------
  100. // IEnumNetCfgBindingInterface -
  101. [
  102. local,
  103. object,
  104. uuid(C0E8AE90-306E-11D1-AACF-00805FC1270E),
  105. pointer_default(unique)
  106. ]
  107. interface IEnumNetCfgBindingInterface : IUnknown
  108. {
  109. HRESULT Next (
  110. [in] ULONG celt,
  111. [out, size_is(celt), length_is(*pceltFetched)]
  112. INetCfgBindingInterface** rgelt,
  113. [out] ULONG* pceltFetched);
  114. HRESULT Skip (
  115. [in] ULONG celt);
  116. HRESULT Reset ();
  117. HRESULT Clone (
  118. [out] IEnumNetCfgBindingInterface** ppenum);
  119. };
  120. //+---------------------------------------------------------------------------
  121. // IEnumNetCfgBindingPath -
  122. [
  123. local,
  124. object,
  125. uuid(C0E8AE91-306E-11D1-AACF-00805FC1270E),
  126. pointer_default(unique)
  127. ]
  128. interface IEnumNetCfgBindingPath : IUnknown
  129. {
  130. HRESULT Next (
  131. [in] ULONG celt,
  132. [out, size_is(celt), length_is(*pceltFetched)]
  133. INetCfgBindingPath** rgelt,
  134. [out] ULONG* pceltFetched);
  135. HRESULT Skip (
  136. [in] ULONG celt);
  137. HRESULT Reset ();
  138. HRESULT Clone (
  139. [out] IEnumNetCfgBindingPath** ppenum);
  140. };
  141. //+---------------------------------------------------------------------------
  142. // IEnumNetCfgComponent -
  143. [
  144. local,
  145. object,
  146. uuid(C0E8AE92-306E-11D1-AACF-00805FC1270E),
  147. pointer_default(unique)
  148. ]
  149. interface IEnumNetCfgComponent : IUnknown
  150. {
  151. HRESULT Next (
  152. [in] ULONG celt,
  153. [out, size_is(celt), length_is(*pceltFetched)]
  154. INetCfgComponent** rgelt,
  155. [out] ULONG* pceltFetched);
  156. HRESULT Skip (
  157. [in] ULONG celt);
  158. HRESULT Reset ();
  159. HRESULT Clone (
  160. [out] IEnumNetCfgComponent** ppenum);
  161. };
  162. //+---------------------------------------------------------------------------
  163. // INetCfg -
  164. [
  165. local,
  166. object,
  167. uuid(C0E8AE93-306E-11D1-AACF-00805FC1270E),
  168. pointer_default(unique)
  169. ]
  170. interface INetCfg : IUnknown
  171. {
  172. HRESULT Initialize (
  173. [in] PVOID pvReserved);
  174. HRESULT Uninitialize ();
  175. HRESULT Apply ();
  176. HRESULT Cancel ();
  177. HRESULT EnumComponents (
  178. [in] const GUID* pguidClass,
  179. [out] IEnumNetCfgComponent** ppenumComponent);
  180. HRESULT FindComponent (
  181. [in, string] LPCWSTR pszwInfId,
  182. [out] INetCfgComponent** pComponent);
  183. HRESULT QueryNetCfgClass (
  184. [in] const GUID* pguidClass,
  185. [in] REFIID riid,
  186. [out, iid_is(riid)] void** ppvObject);
  187. };
  188. //+---------------------------------------------------------------------------
  189. // INetCfgLock -
  190. [
  191. local,
  192. object,
  193. uuid(C0E8AE9F-306E-11D1-AACF-00805FC1270E),
  194. pointer_default(unique)
  195. ]
  196. interface INetCfgLock : IUnknown
  197. {
  198. HRESULT AcquireWriteLock (
  199. [in] DWORD cmsTimeout,
  200. [in, string] LPCWSTR pszwClientDescription,
  201. [out, string] LPWSTR* ppszwClientDescription);
  202. HRESULT ReleaseWriteLock ();
  203. HRESULT IsWriteLocked (
  204. [out, string] LPWSTR* ppszwClientDescription);
  205. };
  206. //+---------------------------------------------------------------------------
  207. // INetCfgBindingInterface -
  208. [
  209. local,
  210. object,
  211. uuid(C0E8AE94-306E-11D1-AACF-00805FC1270E),
  212. pointer_default(unique)
  213. ]
  214. interface INetCfgBindingInterface : IUnknown
  215. {
  216. HRESULT GetName (
  217. [out, string] LPWSTR* ppszwInterfaceName);
  218. HRESULT GetUpperComponent (
  219. [out] INetCfgComponent** ppnccItem);
  220. HRESULT GetLowerComponent (
  221. [out] INetCfgComponent** ppnccItem);
  222. };
  223. //+---------------------------------------------------------------------------
  224. // INetCfgBindingPath -
  225. [
  226. local,
  227. object,
  228. uuid(C0E8AE96-306E-11D1-AACF-00805FC1270E),
  229. pointer_default(unique)
  230. ]
  231. interface INetCfgBindingPath : IUnknown
  232. {
  233. HRESULT IsSamePathAs (
  234. [in] INetCfgBindingPath* pPath);
  235. HRESULT IsSubPathOf (
  236. [in] INetCfgBindingPath* pPath);
  237. HRESULT IsEnabled ();
  238. HRESULT Enable (
  239. [in] BOOL fEnable);
  240. HRESULT GetPathToken(
  241. [out, string] LPWSTR* ppszwPathToken);
  242. HRESULT GetOwner (
  243. [out] INetCfgComponent** ppComponent);
  244. HRESULT GetDepth (
  245. [out] ULONG* pcInterfaces);
  246. HRESULT EnumBindingInterfaces (
  247. [out] IEnumNetCfgBindingInterface** ppenumInterface);
  248. };
  249. //+---------------------------------------------------------------------------
  250. // INetCfgClass -
  251. [
  252. local,
  253. object,
  254. uuid(C0E8AE97-306E-11D1-AACF-00805FC1270E),
  255. pointer_default(unique)
  256. ]
  257. interface INetCfgClass : IUnknown
  258. {
  259. HRESULT FindComponent (
  260. [in, string] LPCWSTR pszwInfId,
  261. [out] INetCfgComponent** ppnccItem);
  262. HRESULT EnumComponents (
  263. [out] IEnumNetCfgComponent** ppenumComponent);
  264. };
  265. //+---------------------------------------------------------------------------
  266. // INetCfgClassSetup -
  267. [
  268. local,
  269. object,
  270. uuid(C0E8AE9D-306E-11D1-AACF-00805FC1270E),
  271. pointer_default(unique)
  272. ]
  273. interface INetCfgClassSetup : IUnknown
  274. {
  275. typedef enum tagOBO_TOKEN_TYPE
  276. {
  277. OBO_USER = 1,
  278. OBO_COMPONENT = 2,
  279. OBO_SOFTWARE = 3,
  280. } OBO_TOKEN_TYPE;
  281. typedef struct tagOBO_TOKEN
  282. {
  283. OBO_TOKEN_TYPE Type;
  284. // Type == OBO_COMPONENT
  285. //
  286. INetCfgComponent* pncc;
  287. // Type == OBO_SOFTWARE
  288. //
  289. LPCWSTR pszwManufacturer;
  290. LPCWSTR pszwProduct;
  291. LPCWSTR pszwDisplayName;
  292. // The following fields must be initialized to zero
  293. // by users of OBO_TOKEN.
  294. //
  295. BOOL fRegistered;
  296. } OBO_TOKEN;
  297. HRESULT SelectAndInstall (
  298. [in] HWND hwndParent,
  299. [in] OBO_TOKEN* pOboToken,
  300. [out] INetCfgComponent** ppnccItem);
  301. HRESULT Install (
  302. [in, string] LPCWSTR pszwInfId,
  303. [in] OBO_TOKEN* pOboToken,
  304. [in] DWORD dwSetupFlags,
  305. [in] DWORD dwUpgradeFromBuildNo,
  306. [in, string] LPCWSTR pszwAnswerFile,
  307. [in, string] LPCWSTR pszwAnswerSections,
  308. [out] INetCfgComponent** ppnccItem);
  309. HRESULT DeInstall (
  310. [in] INetCfgComponent* pComponent,
  311. [in] OBO_TOKEN* pOboToken,
  312. [out] LPWSTR* pmszwRefs);
  313. };
  314. //+---------------------------------------------------------------------------
  315. // INetCfgComponent -
  316. [
  317. local,
  318. object,
  319. uuid(C0E8AE99-306E-11D1-AACF-00805FC1270E),
  320. pointer_default(unique)
  321. ]
  322. interface INetCfgComponent : IUnknown
  323. {
  324. typedef enum tagCOMPONENT_CHARACTERISTICS
  325. {
  326. NCF_VIRTUAL = 0x00000001,
  327. NCF_SOFTWARE_ENUMERATED = 0x00000002,
  328. NCF_PHYSICAL = 0x00000004,
  329. NCF_HIDDEN = 0x00000008,
  330. NCF_NO_SERVICE = 0x00000010,
  331. NCF_NOT_USER_REMOVABLE = 0x00000020,
  332. NCF_MULTIPORT_INSTANCED_ADAPTER = 0x00000040, // This adapter has separate instances for each port
  333. NCF_HAS_UI = 0x00000080,
  334. NCF_SINGLE_INSTANCE = 0x00000100,
  335. // = 0x00000200, // filter device
  336. NCF_FILTER = 0x00000400, // filter component
  337. NCF_DONTEXPOSELOWER = 0x00001000,
  338. NCF_HIDE_BINDING = 0x00002000, // don't show in binding page
  339. NCF_NDIS_PROTOCOL = 0x00004000, // Needs UNLOAD notifications
  340. // = 0x00008000,
  341. // = 0x00010000, // pnp notifications forced through service controller
  342. NCF_FIXED_BINDING = 0x00020000 // UI ability to change binding is disabled
  343. } COMPONENT_CHARACTERISTICS;
  344. typedef enum tagNCRP_FLAGS
  345. {
  346. NCRP_QUERY_PROPERTY_UI = 0x00000001,
  347. NCRP_SHOW_PROPERTY_UI = 0x00000002
  348. } NCRP_FLAGS;
  349. HRESULT GetDisplayName (
  350. [out, string] LPWSTR* ppszwDisplayName);
  351. HRESULT SetDisplayName (
  352. [in, string] LPCWSTR pszwDisplayName);
  353. HRESULT GetHelpText (
  354. [out, string] LPWSTR* pszwHelpText);
  355. HRESULT GetId (
  356. [out, string] LPWSTR* ppszwId);
  357. HRESULT GetCharacteristics (
  358. [out] LPDWORD pdwCharacteristics);
  359. HRESULT GetInstanceGuid (
  360. [out] GUID* pGuid);
  361. HRESULT GetPnpDevNodeId (
  362. [out, string] LPWSTR* ppszwDevNodeId);
  363. HRESULT GetClassGuid (
  364. [out] GUID* pGuid);
  365. HRESULT GetBindName (
  366. [out, string] LPWSTR* ppszwBindName);
  367. HRESULT GetDeviceStatus (
  368. [out] ULONG* pulStatus);
  369. HRESULT OpenParamKey (
  370. [out] HKEY* phkey);
  371. HRESULT RaisePropertyUi (
  372. [in] HWND hwndParent,
  373. [in] DWORD dwFlags, /* NCRP_FLAGS */
  374. [in] IUnknown* punkContext);
  375. };
  376. //+---------------------------------------------------------------------------
  377. // INetCfgComponentBindings -
  378. [
  379. local,
  380. object,
  381. uuid(C0E8AE9E-306E-11D1-AACF-00805FC1270E),
  382. pointer_default(unique)
  383. ]
  384. interface INetCfgComponentBindings : IUnknown
  385. {
  386. typedef enum tagSUPPORTS_BINDING_INTERFACE_FLAGS
  387. {
  388. NCF_LOWER = 0x01,
  389. NCF_UPPER = 0x02
  390. } SUPPORTS_BINDING_INTERFACE_FLAGS;
  391. typedef enum tagENUM_BINDING_PATHS_FLAGS
  392. {
  393. EBP_ABOVE = 0x01,
  394. EBP_BELOW = 0x02,
  395. } ENUM_BINDING_PATHS_FLAGS;
  396. HRESULT BindTo (
  397. [in] INetCfgComponent* pnccItem);
  398. HRESULT UnbindFrom (
  399. [in] INetCfgComponent* pnccItem);
  400. HRESULT SupportsBindingInterface (
  401. [in] DWORD dwFlags,
  402. [in] LPCWSTR pszwInterfaceName);
  403. HRESULT IsBoundTo (
  404. [in] INetCfgComponent* pnccItem);
  405. HRESULT IsBindableTo (
  406. [in] INetCfgComponent* pnccItem);
  407. HRESULT EnumBindingPaths (
  408. [in] DWORD dwFlags,
  409. [out] IEnumNetCfgBindingPath** ppIEnum);
  410. HRESULT MoveBefore (
  411. [in] INetCfgBindingPath* pncbItemSrc,
  412. [in] INetCfgBindingPath* pncbItemDest);
  413. HRESULT MoveAfter (
  414. [in] INetCfgBindingPath* pncbItemSrc,
  415. [in] INetCfgBindingPath* pncbItemDest);
  416. };
  417. //+---------------------------------------------------------------------------
  418. // INetCfgSysPrep -
  419. [
  420. local,
  421. object,
  422. uuid(C0E8AE98-306E-11D1-AACF-00805FC1270E),
  423. pointer_default(unique)
  424. ]
  425. interface INetCfgSysPrep : IUnknown
  426. {
  427. HRESULT HrSetupSetFirstDword(
  428. [in, string] LPCWSTR pwszSection,
  429. [in, string] LPCWSTR pwszKey,
  430. [in] DWORD dwValue);
  431. HRESULT HrSetupSetFirstString(
  432. [in, string] LPCWSTR pwszSection,
  433. [in, string] LPCWSTR pwszKey,
  434. [in, string] LPCWSTR pwszValue);
  435. HRESULT HrSetupSetFirstStringAsBool(
  436. [in, string] LPCWSTR pwszSection,
  437. [in, string] LPCWSTR pwszKey,
  438. [in] BOOL fValue);
  439. HRESULT HrSetupSetFirstMultiSzField(
  440. [in, string] LPCWSTR pwszSection,
  441. [in, string] LPCWSTR pwszKey,
  442. [in] LPCWSTR pmszValue);
  443. };