Commit 569ea392 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Handle remote calls to MsiGetLanguage.

parent 82b0066f
......@@ -1045,8 +1045,23 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
{
HRESULT hr;
LANGID lang;
IWineMsiRemotePackage *remote_package;
remote_package = (IWineMsiRemotePackage *)msi_get_remote(hInstall);
if (!remote_package)
return ERROR_INVALID_HANDLE;
hr = IWineMsiRemotePackage_GetLanguage(remote_package, &lang);
if (SUCCEEDED(hr))
return lang;
return 0;
}
langid = msi_get_property_int( package, szProductLanguage, 0 );
msiobj_release( &package->hdr );
return langid;
......
......@@ -28,6 +28,7 @@ typedef unsigned long MSIHANDLE;
typedef int INSTALLMESSAGE;
typedef int MSIRUNMODE;
typedef int INSTALLSTATE;
typedef WORD LANGID;
cpp_quote("#endif")
[
......@@ -52,6 +53,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT SetFeatureState( [in] BSTR *feature, [in] INSTALLSTATE state );
HRESULT GetComponentState( [in] BSTR *component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
HRESULT SetComponentState( [in] BSTR *component, [in] INSTALLSTATE state );
HRESULT GetLanguage( [out] LANGID *language );
}
[
......
......@@ -1648,6 +1648,13 @@ HRESULT WINAPI mrp_SetComponentState( IWineMsiRemotePackage *iface, BSTR *compon
return HRESULT_FROM_WIN32(r);
}
HRESULT WINAPI mrp_GetLanguage( IWineMsiRemotePackage *iface, LANGID *language )
{
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
*language = MsiGetLanguage(This->package);
return S_OK;
}
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
{
mrp_QueryInterface,
......@@ -1668,6 +1675,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_SetFeatureState,
mrp_GetComponentState,
mrp_SetComponentState,
mrp_GetLanguage,
};
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment