プロダクト情報の取得

(2004.03.30)
    // プロダクト情報の取得
    // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msigetproductinfo.asp
    static HRESULT GetProductIndo(LPCTSTR szProductCode, LPCTSTR szProperty, CString& strValue)
    {
        strValue = _T("");
 
        TCHAR szValue[1024];
        DWORD dwValueLen = sizeof(szValue);
        UINT nr = ::MsiGetProductInfo(szProductCode, szProperty, szValue, &dwValueLen);
        if (nr != ERROR_SUCCESS)
        {
            return E_FAIL;
        }
 
        strValue = szValue;
 
        return S_OK;
    }
一覧に戻る
© 2003 WAC.com All Right Reserved.