Implement MsiGetLanguage.

This commit is contained in:
Aric Stewart 2005-07-10 17:39:14 +00:00 committed by Alexandre Julliard
parent c108d80f80
commit c58df6c677
2 changed files with 24 additions and 1 deletions

View file

@ -585,3 +585,26 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPWSTR szComponent,
msiobj_release( &package->hdr );
return ret;
}
/***********************************************************************
* MsiGetLanguage (MSI.@)
*/
LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
{
MSIPACKAGE* package;
LANGID langid;
LPWSTR buffer;
static const WCHAR szProductLanguage[] =
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
return ERROR_INVALID_HANDLE;
buffer = load_dynamic_property(package,szProductLanguage,NULL);
langid = atoiW(buffer);
HeapFree(GetProcessHeap(),0,buffer);
msiobj_release (&package->hdr);
return langid;
}

View file

@ -60,7 +60,7 @@
60 stdcall MsiGetFeatureUsageW(wstr wstr ptr ptr)
61 stub MsiGetFeatureValidStatesA
62 stub MsiGetFeatureValidStatesW
63 stub MsiGetLanguage
63 stdcall MsiGetLanguage(long)
64 stdcall MsiGetMode(long long)
65 stdcall MsiGetProductCodeA(str str)
66 stdcall MsiGetProductCodeW(wstr wstr)