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