The GetFirstProfile starts an enumeration of profiles, retrieving the id of the first profile in the enumeration.
HRESULT GetFirstProfile(
[out] LPWSTR* p_pwsProfileId
);
Parameters:
p_pwsProfileId
[out] pointer to a pointer to a null terminated Unicode string containing the id of the first existing profile. The caller must release the allocated memory using CoTaskMemFree.
Return values:
S_OK on success or COM error code
NV_NOT_INITIALIZED - [Initialize](initialize-help.html) was not called
NV_SERVICE_ERROR - cannot connect to novaPDF Server service
NV_PROFILE_ERROR - cannot load profiles
Remarks:
GetFirstProfile is used with GetNextProfile to retrieve profile names.
Sample usage:
hr = GetFirstProfile(&pId);
while (SUCCEEDED(hr) && hr != NV_NO_MORE_PROFILES) {
// do something with pName
//...
CoTaskMemFree(pId);
// get next profile if it exists
hr = GetNextProfile(&pId);
}