msi: Handle remote calls to MsiGetActiveDatabase.

oldstable
James Hawkins 2007-07-02 20:16:04 -07:00 committed by Alexandre Julliard
parent bc4750ff75
commit e4658e05f2
2 changed files with 7 additions and 0 deletions

View File

@ -538,6 +538,7 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz );
extern ITypeLib *get_msi_typelib( LPWSTR *path );
extern HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj );
extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj );
extern IUnknown *msi_get_remote(MSIHANDLE handle);
/* handle functions */
extern void *msihandle2msiinfo(MSIHANDLE handle, UINT type);

View File

@ -944,6 +944,7 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
{
MSIPACKAGE *package;
MSIHANDLE handle = 0;
IWineMsiRemotePackage *remote_package;
TRACE("(%ld)\n",hInstall);
@ -953,6 +954,11 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
handle = alloc_msihandle( &package->db->hdr );
msiobj_release( &package->hdr );
}
else if ((remote_package = (IWineMsiRemotePackage *)msi_get_remote( hInstall )))
{
IWineMsiRemotePackage_GetActiveDatabase(remote_package, &handle);
IWineMsiRemotePackage_Release(remote_package);
}
return handle;
}