mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +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,
|
UINT WINAPI MsiSetComponentStateA(MSIHANDLE hInstall, LPCSTR szComponent,
|
||||||
INSTALLSTATE iState)
|
INSTALLSTATE iState)
|
||||||
{
|
{
|
||||||
FIXME("STUB (szComponent=%s,iState=%i)\n",debugstr_a(szComponent),iState);
|
UINT rc;
|
||||||
return ERROR_SUCCESS;
|
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;
|
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,
|
UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPWSTR szComponent,
|
||||||
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
|
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
|
||||||
{
|
{
|
||||||
@ -580,8 +602,15 @@ UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPWSTR szComponent,
|
|||||||
UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
|
UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
|
||||||
INSTALLSTATE iState)
|
INSTALLSTATE iState)
|
||||||
{
|
{
|
||||||
FIXME("STUB (szComponent=%s,iState=%i)\n",debugstr_w(szComponent),iState);
|
MSIPACKAGE* package;
|
||||||
return ERROR_SUCCESS;
|
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 MsiGetFeatureStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||||
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||||
#define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
|
#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 MsiGetComponentStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||||
UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||||
#define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
|
#define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
|
||||||
|
Loading…
Reference in New Issue
Block a user