Ejemplo n.º 1
0
//+---------------------------------------------------------------------------
//
// Function:  FindIfComponentInstalled
//
// Purpose:   Find out if a component is installed
//
// Arguments:
//    szComponentId [in]  id of component to locate
//
// Returns:   None
//
// Author:    kumarp 11-February-99
//
// Notes:
//
HRESULT FindIfComponentInstalled(IN PCWSTR szComponentId)
{
    HRESULT hr=S_OK;

    hr = HrIsComponentInstalled(szComponentId);

	return hr;
}
Ejemplo n.º 2
0
//+---------------------------------------------------------------------------
//
// Function:  FindIfComponentInstalled
//
// Purpose:   Find out if a component is installed
//
// Arguments:
//    szComponentId [in]  id of component to locate
//
// Returns:   None
//
// Author:    kumarp 11-February-99
//
// Notes:
//
void FindIfComponentInstalled(IN PCWSTR szComponentId)
{
    HRESULT hr=S_OK;

    hr = HrIsComponentInstalled(szComponentId);
    if (S_OK == hr)
    {
        LogPrintf(_T("'%s' is installed\n"), szComponentId);
    }
    else if (S_FALSE == hr)
    {
        LogPrintf(_T("'%s' is not installed\n"), szComponentId);
    }
    else
    {
        LogPrintf(_T("Could not find if '%s' is installed. error code: 0x%x\n"),
                 szComponentId, hr);
    }
}