IPublishedApp2::GetPublishedAppInfo Method

Gets publishing-related information about an application published by an application publisher.

Syntax

HRESULT GetPublishedAppInfo(      
    PUBAPPINFO *pInfo
);

Parameters

  • pInfo
    [out] A pointer to an PUBAPPINFO structure that returns the application information.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The dwMask member of the PUBAPPINFO structure indicates which members have been requested. Note that Add/Remove Programs will not set the PAI_SCHEDULEDTIME and PAI_EXPIREDTIME bits. However, the corresponding values stScheduled and stExpired will be used when applicable if the implementation provides them. A publisher should provide this data if it is available.

Example

The example shows a sample implementation:

HRESULT CPubApp::GetPublishedAppInfo(PUBAPPINFO *pInfo)
{
    if (sizeof(PUBAPPINFO) != pInfo->cbSize)
        return E_FAIL;
        
    // Add/Remove Programs will use these items but will not ask for them.

    pInfo->dwMask |= (PAI_EXPIRETIME | PAI_SCHEDULEDTIME);

    // First save off the mask of requested data items.

    const DWORD dwMask = pInfo->dwMask;

    // Zero-out the mask.  The bits should be set as items are retrieved.

    pInfo->dwMask = 0;

    // Call an internal function that obtains data and sets
    // bits in pInfo->dwMask for each item obtained.

    return get_pub_app_info(pInfo, dwMask);
}


                    

See Also

PUBAPPINFO, IEnumPublishedApps, IAppPublisher