wbemdisp: Added WinMGMTS object stub implementation.
This commit is contained in:
parent
686de978c0
commit
8c4e9ba4cf
|
@ -140,6 +140,7 @@ dlls/vbscript/tests/vbsregexp55.h
|
|||
dlls/vbscript/vbscript_classes.h
|
||||
dlls/vbscript/vbsglobal.h
|
||||
dlls/vbscript/vbsregexp55.h
|
||||
dlls/wbemdisp/wbemdisp_classes.h
|
||||
dlls/wbemprox/wql.tab.c
|
||||
dlls/wbemprox/wql.tab.h
|
||||
dlls/windowscodecs/windowscodecs_wincodec.h
|
||||
|
|
|
@ -6,6 +6,7 @@ C_SRCS = \
|
|||
main.c
|
||||
|
||||
IDL_R_SRCS = wbemdisp_classes.idl
|
||||
IDL_H_SRCS = wbemdisp_classes.idl
|
||||
|
||||
IDL_TLB_SRCS = wbemdisp_tlb.idl
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "initguid.h"
|
||||
#include "objbase.h"
|
||||
#include "wbemdisp.h"
|
||||
|
||||
|
|
|
@ -23,17 +23,69 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "initguid.h"
|
||||
#include "objbase.h"
|
||||
#include "wbemdisp.h"
|
||||
#include "rpcproxy.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wbemdisp_private.h"
|
||||
#include "wbemdisp_classes.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp);
|
||||
|
||||
static HINSTANCE instance;
|
||||
|
||||
static HRESULT WINAPI WinMGMTS_QueryInterface(IParseDisplayName *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
if(IsEqualGUID(riid, &IID_IUnknown)) {
|
||||
TRACE("(IID_IUnknown %p)\n", ppv);
|
||||
*ppv = iface;
|
||||
}else if(IsEqualGUID(riid, &IID_IParseDisplayName)) {
|
||||
TRACE("(IID_IParseDisplayName %p)\n", ppv);
|
||||
*ppv = iface;
|
||||
}else {
|
||||
WARN("Unsupported riid %s\n", debugstr_guid(riid));
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WinMGMTS_AddRef(IParseDisplayName *iface)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WinMGMTS_Release(IParseDisplayName *iface)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WinMGMTS_ParseDisplayName(IParseDisplayName *iface, IBindCtx *pbc, LPOLESTR pszDisplayName,
|
||||
ULONG *pchEaten, IMoniker **ppmkOut)
|
||||
{
|
||||
FIXME("(%p %s %p %p)\n", pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IParseDisplayNameVtbl WinMGMTSVtbl = {
|
||||
WinMGMTS_QueryInterface,
|
||||
WinMGMTS_AddRef,
|
||||
WinMGMTS_Release,
|
||||
WinMGMTS_ParseDisplayName
|
||||
};
|
||||
|
||||
static IParseDisplayName winmgmts = { &WinMGMTSVtbl };
|
||||
|
||||
static HRESULT WinMGMTS_create(IUnknown *outer, void **ppv)
|
||||
{
|
||||
*ppv = &winmgmts;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
struct factory
|
||||
{
|
||||
IClassFactory IClassFactory_iface;
|
||||
|
@ -107,6 +159,7 @@ static const struct IClassFactoryVtbl factory_vtbl =
|
|||
};
|
||||
|
||||
static struct factory swbem_locator_cf = { { &factory_vtbl }, SWbemLocator_create };
|
||||
static struct factory winmgmts_cf = { { &factory_vtbl }, WinMGMTS_create };
|
||||
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
|
@ -130,10 +183,12 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *obj )
|
|||
TRACE( "%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(iid), obj );
|
||||
|
||||
if (IsEqualGUID( rclsid, &CLSID_SWbemLocator ))
|
||||
{
|
||||
cf = &swbem_locator_cf.IClassFactory_iface;
|
||||
}
|
||||
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
|
||||
cf = &swbem_locator_cf.IClassFactory_iface;
|
||||
else if (IsEqualGUID( rclsid, &CLSID_WinMGMTS ))
|
||||
cf = &winmgmts_cf.IClassFactory_iface;
|
||||
else
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
|
||||
return IClassFactory_QueryInterface( cf, iid, obj );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue