An implementation of MsiSummaryInfoGetPropertyW based off of

MsiSummaryInfoGetPropertyA.
This commit is contained in:
Aric Stewart 2005-01-24 11:24:35 +00:00 committed by Alexandre Julliard
parent 6b89a92215
commit 9999e6ccdf
1 changed files with 47 additions and 3 deletions

View File

@ -222,9 +222,53 @@ UINT WINAPI MsiSummaryInfoGetPropertyW(
MSIHANDLE hSummaryInfo, UINT uiProperty, UINT *puiDataType, INT *piValue,
FILETIME *pftValue, LPWSTR szValueBuf, DWORD *pcchValueBuf)
{
FIXME("%ld %d %p %p %p %p %p\n",
MSISUMMARYINFO *suminfo;
HRESULT r;
PROPSPEC spec;
PROPVARIANT var;
TRACE("%ld %d %p %p %p %p %p\n",
hSummaryInfo, uiProperty, puiDataType, piValue,
pftValue, szValueBuf, pcchValueBuf);
return ERROR_CALL_NOT_IMPLEMENTED;
suminfo = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO );
if( !suminfo )
return ERROR_INVALID_HANDLE;
spec.ulKind = PRSPEC_PROPID;
spec.u.propid = uiProperty;
r = IPropertyStorage_ReadMultiple( suminfo->propstg, 1, &spec, &var);
if( FAILED(r) )
return ERROR_FUNCTION_FAILED;
if( puiDataType )
*puiDataType = var.vt;
switch( var.vt )
{
case VT_I4:
if( piValue )
*piValue = var.u.lVal;
break;
case VT_LPSTR:
if( pcchValueBuf && szValueBuf )
{
MultiByteToWideChar(CP_ACP, 0, var.u.pszVal, -1, szValueBuf,
*pcchValueBuf );
*pcchValueBuf = lstrlenA( var.u.pszVal );
}
break;
case VT_FILETIME:
if( pftValue )
memcpy(pftValue, &var.u.filetime, sizeof (FILETIME) );
break;
case VT_EMPTY:
break;
default:
FIXME("Unknown property variant type\n");
break;
}
return ERROR_SUCCESS;
}