msi: Implement IDispatch->CreateInstance() for the msi server dll.
This commit is contained in:
parent
c63d21bf8c
commit
9c76a0b37a
|
@ -80,8 +80,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
typedef struct tagIClassFactoryImpl {
|
typedef struct tagIClassFactoryImpl {
|
||||||
const IClassFactoryVtbl *lpVtbl;
|
const IClassFactoryVtbl *lpVtbl;
|
||||||
|
HRESULT (*create_object)( IUnknown*, LPVOID* );
|
||||||
} IClassFactoryImpl;
|
} IClassFactoryImpl;
|
||||||
|
|
||||||
|
static HRESULT create_msiserver( IUnknown *pOuter, LPVOID *ppObj )
|
||||||
|
{
|
||||||
|
FIXME("\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface,
|
static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface,
|
||||||
REFIID riid,LPVOID *ppobj)
|
REFIID riid,LPVOID *ppobj)
|
||||||
{
|
{
|
||||||
|
@ -115,9 +122,18 @@ static HRESULT WINAPI MsiCF_CreateInstance(LPCLASSFACTORY iface,
|
||||||
LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
|
LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
|
||||||
{
|
{
|
||||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||||
|
IUnknown *unk = NULL;
|
||||||
|
HRESULT r;
|
||||||
|
|
||||||
FIXME("%p %p %s %p\n", This, pOuter, debugstr_guid(riid), ppobj);
|
TRACE("%p %p %s %p\n", This, pOuter, debugstr_guid(riid), ppobj);
|
||||||
return E_FAIL;
|
|
||||||
|
r = This->create_object( pOuter, ppobj );
|
||||||
|
if (SUCCEEDED(r))
|
||||||
|
{
|
||||||
|
r = IUnknown_QueryInterface( unk, riid, ppobj );
|
||||||
|
IUnknown_Release( unk );
|
||||||
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MsiCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
static HRESULT WINAPI MsiCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
||||||
|
@ -141,7 +157,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl =
|
||||||
MsiCF_LockServer
|
MsiCF_LockServer
|
||||||
};
|
};
|
||||||
|
|
||||||
static IClassFactoryImpl Msi_CF = { &MsiCF_Vtbl };
|
static IClassFactoryImpl MsiServer_CF = { &MsiCF_Vtbl, create_msiserver };
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* DllGetClassObject [MSI.@]
|
* DllGetClassObject [MSI.@]
|
||||||
|
@ -150,15 +166,20 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
if( IsEqualCLSID (rclsid, &CLSID_IMsiServer) ||
|
if ( IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) )
|
||||||
IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) ||
|
|
||||||
IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) ||
|
|
||||||
IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) ||
|
|
||||||
IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) )
|
|
||||||
{
|
{
|
||||||
*ppv = (LPVOID) &Msi_CF;
|
*ppv = (LPVOID) &MsiServer_CF;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) ||
|
||||||
|
IsEqualCLSID (rclsid, &CLSID_IMsiServer) ||
|
||||||
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) ||
|
||||||
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) )
|
||||||
|
{
|
||||||
|
FIXME("create %s object\n", debugstr_guid( rclsid ));
|
||||||
|
}
|
||||||
|
|
||||||
return CLASS_E_CLASSNOTAVAILABLE;
|
return CLASS_E_CLASSNOTAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue