mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 20:03:38 +00:00
Implemented MsiSetComponentState*.
This commit is contained in:
parent
34247aff40
commit
b5c02815d0
|
@ -529,8 +529,14 @@ piAction);
|
|||
UINT WINAPI MsiSetComponentStateA(MSIHANDLE hInstall, LPCSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
FIXME("STUB (szComponent=%s,iState=%i)\n",debugstr_a(szComponent),iState);
|
||||
return ERROR_SUCCESS;
|
||||
UINT rc;
|
||||
LPWSTR szwComponent = strdupAtoW(szComponent);
|
||||
|
||||
rc = MsiSetComponentStateW(hInstall, szwComponent, iState);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, szwComponent);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -551,6 +557,22 @@ UINT WINAPI MsiGetComponentStateA(MSIHANDLE hInstall, LPSTR szComponent,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static UINT MSI_SetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
TRACE("%p %s %d\n", package, debugstr_w(szComponent), iState);
|
||||
|
||||
comp = get_loaded_component(package, szComponent);
|
||||
if (!comp)
|
||||
return ERROR_UNKNOWN_COMPONENT;
|
||||
|
||||
comp->Installed = iState;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPWSTR szComponent,
|
||||
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
|
||||
{
|
||||
|
@ -580,8 +602,15 @@ UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPWSTR szComponent,
|
|||
UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
FIXME("STUB (szComponent=%s,iState=%i)\n",debugstr_w(szComponent),iState);
|
||||
return ERROR_SUCCESS;
|
||||
MSIPACKAGE* package;
|
||||
UINT ret;
|
||||
|
||||
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
|
||||
if (!package)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
ret = MSI_SetComponentStateW(package, szComponent, iState);
|
||||
msiobj_release(&package->hdr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -175,6 +175,9 @@ UINT WINAPI MsiDatabaseCommit(MSIHANDLE);
|
|||
UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
#define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
|
||||
UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
|
||||
UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
|
||||
#define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
|
||||
UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
#define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
|
||||
|
|
Loading…
Reference in a new issue