From: André Hentschel Subject: [2/2] netcfgx: Add stub for INetCfgClassSetup2 Message-Id: <53FE4253.1050508@dawncrow.de> Date: Wed, 27 Aug 2014 22:40:51 +0200 --- dlls/netcfgx/netcfg.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++- include/netcfgx.idl | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) diff --git a/dlls/netcfgx/netcfg.c b/dlls/netcfgx/netcfg.c index fa57131..4d0e2f2 100644 --- a/dlls/netcfgx/netcfg.c +++ b/dlls/netcfgx/netcfg.c @@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL( netcfgx ); typedef struct NetConfiguration { INetCfg INetCfg_iface; + INetCfgClassSetup2 INetCfgClassSetup2_iface; INetCfgComponent INetCfgComponent_iface; INetCfgLock INetCfgLock_iface; @@ -41,6 +42,11 @@ static inline NetConfiguration *impl_from_INetCfg(INetCfg *iface) return CONTAINING_RECORD(iface, NetConfiguration, INetCfg_iface); } +static inline NetConfiguration *impl_from_INetCfgClassSetup2(INetCfgClassSetup2 *iface) +{ + return CONTAINING_RECORD(iface, NetConfiguration, INetCfgClassSetup2_iface); +} + static inline NetConfiguration *impl_from_INetCfgComponent(INetCfgComponent *iface) { return CONTAINING_RECORD(iface, NetConfiguration, INetCfgComponent_iface); @@ -61,7 +67,12 @@ static HRESULT WINAPI netcfg_QueryInterface(INetCfg *iface, REFIID riid, void ** { *ppvObject = &This->INetCfg_iface; } - else if(IsEqualGUID(riid, &IID_INetCfgComponent)) + else if (IsEqualGUID(riid, &IID_INetCfgClassSetup) || + IsEqualGUID(riid, &IID_INetCfgClassSetup2)) + { + *ppvObject = &This->INetCfgClassSetup2_iface; + } + else if (IsEqualGUID(riid, &IID_INetCfgComponent)) { *ppvObject = &This->INetCfgComponent_iface; } @@ -176,6 +187,68 @@ static const struct INetCfgVtbl NetCfgVtbl = }; +static HRESULT WINAPI netcfgclasssetup2_QueryInterface(INetCfgClassSetup2 *iface, REFIID riid,void **ppvObject) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + + return netcfg_QueryInterface(&This->INetCfg_iface, riid, ppvObject); +} + +static ULONG WINAPI netcfgclasssetup2_AddRef(INetCfgClassSetup2 *iface) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + + return netcfg_AddRef(&This->INetCfg_iface); +} + +static ULONG WINAPI netcfgclasssetup2_Release(INetCfgClassSetup2 *iface) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + return netcfg_Release(&This->INetCfg_iface); +} + +static HRESULT WINAPI netcfgclasssetup2_SelectAndInstall(INetCfgClassSetup2 *iface, HWND parent, + OBO_TOKEN* token, INetCfgComponent** item) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + FIXME("%p %p %p %p\n", This, parent, token, item); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfgclasssetup2_Install(INetCfgClassSetup2 *iface, const WCHAR* inf, + OBO_TOKEN* token, DWORD flags, DWORD build, + const WCHAR* file, const WCHAR* sections, + INetCfgComponent** item) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + FIXME("%p %s %p %u %u %s %s %p\n", This, debugstr_w(inf), token, flags, build, + debugstr_w(file), debugstr_w(sections), item); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfgclasssetup2_DeInstall(INetCfgClassSetup2 *iface, + INetCfgComponent* component, OBO_TOKEN* token, + WCHAR** refs) +{ + NetConfiguration *This = impl_from_INetCfgClassSetup2(iface); + FIXME("%p %p %p %p\n", This, component, token, refs); + + return E_NOTIMPL; +} + +static const struct INetCfgClassSetup2Vtbl NetCfgClassSetup2Vtbl = +{ + netcfgclasssetup2_QueryInterface, + netcfgclasssetup2_AddRef, + netcfgclasssetup2_Release, + netcfgclasssetup2_SelectAndInstall, + netcfgclasssetup2_Install, + netcfgclasssetup2_DeInstall +}; + + static HRESULT WINAPI netcfgcomponent_QueryInterface(INetCfgComponent *iface, REFIID riid,void **ppvObject) { NetConfiguration *This = impl_from_INetCfgComponent(iface); @@ -377,6 +450,7 @@ HRESULT INetCfg_CreateInstance(IUnknown **ppUnk) return E_OUTOFMEMORY; This->INetCfg_iface.lpVtbl = &NetCfgVtbl; + This->INetCfgClassSetup2_iface.lpVtbl = &NetCfgClassSetup2Vtbl; This->INetCfgComponent_iface.lpVtbl = &NetCfgComponentVtbl; This->INetCfgLock_iface.lpVtbl = &NetCfgLockVtbl; This->ref = 1; diff --git a/include/netcfgx.idl b/include/netcfgx.idl index d51407f..1e49235 100644 --- a/include/netcfgx.idl +++ b/include/netcfgx.idl @@ -29,6 +29,57 @@ import "wtypes.idl"; cpp_quote("#define NETCFG_E_ALREADY_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA020)") cpp_quote("#define NETCFG_E_NO_WRITE_LOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xA024)") +interface INetCfgComponent; + +[ + local, + object, + uuid(c0e8ae9d-306e-11d1-aacf-00805fc1270e), + pointer_default(unique) +] +interface INetCfgClassSetup : IUnknown +{ + typedef enum tagOBO_TOKEN_TYPE + { + OBO_USER = 1, + OBO_COMPONENT = 2, + OBO_SOFTWARE = 3, + } OBO_TOKEN_TYPE; + + typedef struct tagOBO_TOKEN + { + OBO_TOKEN_TYPE Type; + INetCfgComponent* pncc; + LPCWSTR pszwManufacturer; + LPCWSTR pszwProduct; + LPCWSTR pszwDisplayName; + BOOL fRegistered; + } OBO_TOKEN; + + HRESULT SelectAndInstall ([in] HWND hwndParent, [in] OBO_TOKEN* pOboToken, + [out] INetCfgComponent** ppnccItem); + + HRESULT Install ([in] LPCWSTR pszwInfId, [in] OBO_TOKEN* pOboToken, [in] DWORD dwSetupFlags, + [in] DWORD dwUpgradeFromBuildNo, [in] LPCWSTR pszwAnswerFile, + [in] LPCWSTR pszwAnswerSections, [out] INetCfgComponent** ppnccItem); + + HRESULT DeInstall ([in] INetCfgComponent* pComponent, [in] OBO_TOKEN* pOboToken, + [out] LPWSTR* pmszwRefs); +}; + + +[ + local, + object, + uuid(c0e8aea0-306e-11d1-aacf-00805fc1270e), + pointer_default(unique) +] +interface INetCfgClassSetup2: INetCfgClassSetup +{ + HRESULT UpdateNonEnumeratedComponent ([in] INetCfgComponent* pIComp, + [in] DWORD dwSetupFlags, [in] DWORD dwUpgradeFromBuildNo); +}; + [ local, object,