Module: wine Branch: refs/heads/master Commit: a7e6864be1473e96b60ca999622a5915002f3a88 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a7e6864be1473e96b60ca999...
Author: Mike McCormack mike@codeweavers.com Date: Tue Jul 18 18:43:33 2006 +0900
msi: Implement MsiSetInstallLevel.
---
dlls/msi/install.c | 28 ++++++++++++++++++++++++++++ dlls/msi/msi.spec | 2 +- 2 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 8724c95..cb43403 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -30,6 +30,7 @@ #include "msi.h" #include "msidefs.h" #include "msipriv.h" #include "action.h" +#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
@@ -760,3 +761,30 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE h msiobj_release( &package->hdr ); return langid; } + +/*********************************************************************** + * MsiGetLanguage (MSI.@) + */ +UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) +{ + static const WCHAR szInstallLevel[] = { + 'I','N','S','T','A','L','L','L','E','V','E','L',0 }; + static const WCHAR fmt[] = { '%','d',0 }; + MSIPACKAGE* package; + WCHAR level[6]; + UINT r; + + TRACE("%ld %i\n", hInstall, iInstallLevel); + + if (iInstallLevel<1 || iInstallLevel>32767) + return ERROR_INVALID_PARAMETER; + + package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); + if ( !package ) + return ERROR_INVALID_HANDLE; + + sprintfW( level, fmt, iInstallLevel ); + r = MSI_SetPropertyW( package, szInstallLevel, level ); + msiobj_release( &package->hdr ); + return r; +} diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index 8dfade1..d696319 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -133,7 +133,7 @@ 137 stdcall MsiSetExternalUIW(ptr long ptr) 138 stdcall MsiSetFeatureStateA(long str long) 139 stdcall MsiSetFeatureStateW(long wstr long) -140 stub MsiSetInstallLevel +140 stdcall MsiSetInstallLevel(long long) 141 stdcall MsiSetInternalUI(long ptr) 142 stub MsiVerifyDiskSpace 143 stdcall MsiSetMode(long long long)