netcfgx.idl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. cpp_quote("#include <winapifamily.h>")
  7. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  8. #ifndef DO_NO_IMPORTS
  9. import "unknwn.idl";
  10. import "wtypes.idl";
  11. import "prsht.idl";
  12. #endif
  13. cpp_quote("")
  14. cpp_quote("#define NETCFG_E_ALREADY_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa020)")
  15. cpp_quote("#define NETCFG_E_NOT_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa021)")
  16. cpp_quote("#define NETCFG_E_IN_USE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa022)")
  17. cpp_quote("#define NETCFG_E_NO_WRITE_LOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa024)")
  18. cpp_quote("#define NETCFG_E_NEED_REBOOT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa025)")
  19. cpp_quote("#define NETCFG_E_ACTIVE_RAS_CONNECTIONS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa026)")
  20. cpp_quote("#define NETCFG_E_ADAPTER_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa027)")
  21. cpp_quote("#define NETCFG_E_COMPONENT_REMOVED_PENDING_REBOOT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa028)")
  22. cpp_quote("#define NETCFG_E_MAX_FILTER_LIMIT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa029)")
  23. cpp_quote("#define NETCFG_E_VMSWITCH_ACTIVE_OVER_ADAPTER MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa02a)")
  24. cpp_quote("#define NETCFG_E_DUPLICATE_INSTANCEID MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xa02b)")
  25. cpp_quote("")
  26. cpp_quote("#define NETCFG_S_REBOOT MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xa020)")
  27. cpp_quote("#define NETCFG_S_DISABLE_QUERY MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xa022)")
  28. cpp_quote("#define NETCFG_S_STILL_REFERENCED MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xa023)")
  29. cpp_quote("#define NETCFG_S_CAUSED_SETUP_CHANGE MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xa024)")
  30. cpp_quote("#define NETCFG_S_COMMIT_NOW MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0xa025)")
  31. cpp_quote("")
  32. cpp_quote("#define NETCFG_CLIENT_CID_MS_MSClient TEXT(\"ms_msclient\")")
  33. cpp_quote("#define NETCFG_SERVICE_CID_MS_SERVER TEXT(\"ms_server\")")
  34. cpp_quote("#define NETCFG_SERVICE_CID_MS_NETBIOS TEXT(\"ms_netbios\")")
  35. cpp_quote("#define NETCFG_SERVICE_CID_MS_PSCHED TEXT(\"ms_pschedpc\")")
  36. cpp_quote("#define NETCFG_SERVICE_CID_MS_WLBS TEXT(\"ms_wlbs\")")
  37. cpp_quote("#define NETCFG_TRANS_CID_MS_APPLETALK TEXT(\"ms_appletalk\")")
  38. cpp_quote("#define NETCFG_TRANS_CID_MS_NETBEUI TEXT(\"ms_netbeui\")")
  39. cpp_quote("#define NETCFG_TRANS_CID_MS_NETMON TEXT(\"ms_netmon\")")
  40. cpp_quote("#define NETCFG_TRANS_CID_MS_NWIPX TEXT(\"ms_nwipx\")")
  41. cpp_quote("#define NETCFG_TRANS_CID_MS_NWSPX TEXT(\"ms_nwspx\")")
  42. cpp_quote("#define NETCFG_TRANS_CID_MS_TCPIP TEXT(\"ms_tcpip\")")
  43. cpp_quote("")
  44. interface IEnumNetCfgBindingInterface;
  45. interface IEnumNetCfgBindingPath;
  46. interface IEnumNetCfgComponent;
  47. interface INetCfg;
  48. interface INetCfgProperties;
  49. interface INetCfgLock;
  50. interface INetCfgBindingInterface;
  51. interface INetCfgBindingPath;
  52. interface INetCfgComponentBindings;
  53. interface INetCfgBindingPath;
  54. interface INetCfgClass;
  55. interface INetCfgComponent;
  56. interface INetCfgIdentification;
  57. interface INetCfgClassSetup;
  58. interface INetCfgClassSetup2;
  59. cpp_quote("")
  60. [local, object, uuid(c0e8ae90-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  61. interface IEnumNetCfgBindingInterface : IUnknown {
  62. HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] INetCfgBindingInterface **rgelt, [out] ULONG *pceltFetched);
  63. HRESULT Skip ([in] ULONG celt);
  64. HRESULT Reset ();
  65. HRESULT Clone ([out] IEnumNetCfgBindingInterface **ppenum);
  66. };
  67. cpp_quote("")
  68. [local, object, uuid(c0e8ae91-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  69. interface IEnumNetCfgBindingPath : IUnknown {
  70. HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] INetCfgBindingPath **rgelt, [out] ULONG *pceltFetched);
  71. HRESULT Skip ([in] ULONG celt);
  72. HRESULT Reset ();
  73. HRESULT Clone ([out] IEnumNetCfgBindingPath **ppenum);
  74. };
  75. cpp_quote("")
  76. [local, object, uuid(c0e8ae92-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  77. interface IEnumNetCfgComponent : IUnknown {
  78. HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] INetCfgComponent **rgelt, [out] ULONG *pceltFetched);
  79. HRESULT Skip ([in] ULONG celt);
  80. HRESULT Reset ();
  81. HRESULT Clone ([out] IEnumNetCfgComponent **ppenum);
  82. };
  83. cpp_quote("")
  84. [local, object, uuid(c0e8ae93-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  85. interface INetCfg : IUnknown {
  86. HRESULT Initialize ([in] PVOID pvReserved);
  87. HRESULT Uninitialize ();
  88. HRESULT Apply ();
  89. HRESULT Cancel ();
  90. HRESULT EnumComponents ([in] const GUID *pguidClass, [out] IEnumNetCfgComponent **ppenumComponent);
  91. HRESULT FindComponent ([in, string] LPCWSTR pszwInfId, [out] INetCfgComponent **pComponent);
  92. HRESULT QueryNetCfgClass ([in] const GUID *pguidClass, [in] REFIID riid, [out, iid_is(riid)] void **ppvObject);
  93. };
  94. cpp_quote("")
  95. [threading(both), uuid(5b035261-40f9-11d1-aaec-00805fc1270e)]
  96. coclass CNetCfg {
  97. [default] interface INetCfg;
  98. }
  99. cpp_quote("")
  100. [local, object, uuid(c0e8ae9f-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  101. interface INetCfgLock : IUnknown {
  102. HRESULT AcquireWriteLock ([in] DWORD cmsTimeout, [in, string] LPCWSTR pszwClientDescription, [out, string] LPWSTR *ppszwClientDescription);
  103. HRESULT ReleaseWriteLock ();
  104. HRESULT IsWriteLocked ([out, string] LPWSTR *ppszwClientDescription);
  105. };
  106. cpp_quote("")
  107. [local, object, uuid(c0e8ae94-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  108. interface INetCfgBindingInterface : IUnknown {
  109. HRESULT GetName ([out, string] LPWSTR *ppszwInterfaceName);
  110. HRESULT GetUpperComponent ([out] INetCfgComponent **ppnccItem);
  111. HRESULT GetLowerComponent ([out] INetCfgComponent **ppnccItem);
  112. };
  113. cpp_quote("")
  114. [local, object, uuid(c0e8ae96-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  115. interface INetCfgBindingPath : IUnknown {
  116. HRESULT IsSamePathAs ([in] INetCfgBindingPath *pPath);
  117. HRESULT IsSubPathOf ([in] INetCfgBindingPath *pPath);
  118. HRESULT IsEnabled ();
  119. HRESULT Enable ([in] WINBOOL fEnable);
  120. HRESULT GetPathToken([out, string] LPWSTR *ppszwPathToken);
  121. HRESULT GetOwner ([out] INetCfgComponent **ppComponent);
  122. HRESULT GetDepth ([out] ULONG *pcInterfaces);
  123. HRESULT EnumBindingInterfaces ([out] IEnumNetCfgBindingInterface **ppenumInterface);
  124. };
  125. cpp_quote("")
  126. [local, object, uuid(c0e8ae97-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  127. interface INetCfgClass : IUnknown {
  128. HRESULT FindComponent ([in, string] LPCWSTR pszwInfId, [out] INetCfgComponent **ppnccItem);
  129. HRESULT EnumComponents ([out] IEnumNetCfgComponent **ppenumComponent);
  130. };
  131. cpp_quote("")
  132. [local, object, uuid(c0e8ae9d-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  133. interface INetCfgClassSetup : IUnknown {
  134. typedef enum tagOBO_TOKEN_TYPE {
  135. OBO_USER = 1,
  136. OBO_COMPONENT = 2,
  137. OBO_SOFTWARE = 3
  138. } OBO_TOKEN_TYPE;
  139. typedef struct tagOBO_TOKEN {
  140. OBO_TOKEN_TYPE Type;
  141. INetCfgComponent *pncc;
  142. LPCWSTR pszwManufacturer;
  143. LPCWSTR pszwProduct;
  144. LPCWSTR pszwDisplayName;
  145. WINBOOL fRegistered;
  146. } OBO_TOKEN;
  147. HRESULT SelectAndInstall ([in] HWND hwndParent, [in] OBO_TOKEN *pOboToken, [out] INetCfgComponent **ppnccItem);
  148. HRESULT Install ([in, string] LPCWSTR pszwInfId, [in] OBO_TOKEN *pOboToken, [in] DWORD dwSetupFlags, [in] DWORD dwUpgradeFromBuildNo, [in, string] LPCWSTR pszwAnswerFile, [in, string] LPCWSTR pszwAnswerSections, [out] INetCfgComponent **ppnccItem);
  149. HRESULT DeInstall ([in] INetCfgComponent *pComponent, [in] OBO_TOKEN *pOboToken, [out] LPWSTR *pmszwRefs);
  150. };
  151. cpp_quote("")
  152. [local, object, uuid(c0e8aea0-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  153. interface INetCfgClassSetup2: INetCfgClassSetup {
  154. HRESULT UpdateNonEnumeratedComponent ([in] INetCfgComponent *pIComp, [in] DWORD dwSetupFlags, [in] DWORD dwUpgradeFromBuildNo);
  155. };
  156. cpp_quote("")
  157. [local, object, uuid(c0e8ae99-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  158. interface INetCfgComponent : IUnknown {
  159. typedef enum tagCOMPONENT_CHARACTERISTICS {
  160. NCF_VIRTUAL = 0x00000001,
  161. NCF_SOFTWARE_ENUMERATED = 0x00000002,
  162. NCF_PHYSICAL = 0x00000004,
  163. NCF_HIDDEN = 0x00000008,
  164. NCF_NO_SERVICE = 0x00000010,
  165. NCF_NOT_USER_REMOVABLE = 0x00000020,
  166. NCF_MULTIPORT_INSTANCED_ADAPTER = 0x00000040,
  167. NCF_HAS_UI = 0x00000080,
  168. NCF_SINGLE_INSTANCE = 0x00000100,
  169. NCF_FILTER = 0x00000400,
  170. NCF_DONTEXPOSELOWER = 0x00001000,
  171. NCF_HIDE_BINDING = 0x00002000,
  172. NCF_NDIS_PROTOCOL = 0x00004000,
  173. NCF_FIXED_BINDING = 0x00020000,
  174. NCF_LW_FILTER = 0x00040000
  175. } COMPONENT_CHARACTERISTICS;
  176. typedef enum tagNCRP_FLAGS {
  177. NCRP_QUERY_PROPERTY_UI = 0x00000001,
  178. NCRP_SHOW_PROPERTY_UI = 0x00000002
  179. } NCRP_FLAGS;
  180. HRESULT GetDisplayName ([out, string] LPWSTR *ppszwDisplayName);
  181. HRESULT SetDisplayName ([in, string] LPCWSTR pszwDisplayName);
  182. HRESULT GetHelpText ([out, string] LPWSTR *pszwHelpText);
  183. HRESULT GetId ([out, string] LPWSTR *ppszwId);
  184. HRESULT GetCharacteristics ([out] LPDWORD pdwCharacteristics);
  185. HRESULT GetInstanceGuid ([out] GUID *pGuid);
  186. HRESULT GetPnpDevNodeId ([out, string] LPWSTR *ppszwDevNodeId);
  187. HRESULT GetClassGuid ([out] GUID *pGuid);
  188. HRESULT GetBindName ([out, string] LPWSTR *ppszwBindName);
  189. HRESULT GetDeviceStatus ([out] ULONG *pulStatus);
  190. HRESULT OpenParamKey ([out] HKEY *phkey);
  191. HRESULT RaisePropertyUi ([in] HWND hwndParent, [in] DWORD dwFlags, [in] IUnknown *punkContext);
  192. };
  193. cpp_quote("")
  194. [local, object, uuid(c0e8ae9e-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  195. interface INetCfgComponentBindings : IUnknown {
  196. typedef enum tagSUPPORTS_BINDING_INTERFACE_FLAGS {
  197. NCF_LOWER = 0x01,
  198. NCF_UPPER = 0x02
  199. } SUPPORTS_BINDING_INTERFACE_FLAGS;
  200. typedef enum tagENUM_BINDING_PATHS_FLAGS {
  201. EBP_ABOVE = 0x01,
  202. EBP_BELOW = 0x02
  203. } ENUM_BINDING_PATHS_FLAGS;
  204. HRESULT BindTo ([in] INetCfgComponent *pnccItem);
  205. HRESULT UnbindFrom ([in] INetCfgComponent *pnccItem);
  206. HRESULT SupportsBindingInterface ([in] DWORD dwFlags, [in] LPCWSTR pszwInterfaceName);
  207. HRESULT IsBoundTo ([in] INetCfgComponent *pnccItem);
  208. HRESULT IsBindableTo ([in] INetCfgComponent *pnccItem);
  209. HRESULT EnumBindingPaths ([in] DWORD dwFlags, [out] IEnumNetCfgBindingPath **ppIEnum);
  210. HRESULT MoveBefore ([in] INetCfgBindingPath *pncbItemSrc, [in] INetCfgBindingPath *pncbItemDest);
  211. HRESULT MoveAfter ([in] INetCfgBindingPath *pncbItemSrc, [in] INetCfgBindingPath *pncbItemDest);
  212. };
  213. cpp_quote("")
  214. [local, object, uuid(c0e8ae98-306e-11d1-aacf-00805fc1270e), pointer_default(unique)]
  215. interface INetCfgSysPrep : IUnknown {
  216. HRESULT HrSetupSetFirstDword([in, string] LPCWSTR pwszSection, [in, string] LPCWSTR pwszKey, [in] DWORD dwValue);
  217. HRESULT HrSetupSetFirstString([in, string] LPCWSTR pwszSection, [in, string] LPCWSTR pwszKey, [in, string] LPCWSTR pwszValue);
  218. HRESULT HrSetupSetFirstStringAsBool([in, string] LPCWSTR pwszSection, [in, string] LPCWSTR pwszKey, [in] WINBOOL fValue);
  219. HRESULT HrSetupSetFirstMultiSzField([in, string] LPCWSTR pwszSection, [in, string] LPCWSTR pwszKey, [in, string] LPCWSTR pmszValue);
  220. };
  221. cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */")