|
GetFirstProfile |
Top Previous Next |
|
The GetFirstProfile starts an enumeration of profiles, retrieving the name of the first profile in the enumeration. HRESULT GetFirstProfile( [out] LPWSTR* p_pwsProfileName, [out] BOOL* p_bPublicProfile );
Parameters: p_pwsProfileName [out] pointer to a pointer to a null terminated Unicode string containing the name of the first existing profile. The caller must release the allocated memory using CoTaskMemFree. p_bPublicProfile [in] Flag if the profile is a public or a private profile.
Return values: S_OK on success or COM error code NV_NOT_INITIALIZED - Initialize was not called
Remarks: GetFirstProfile is used with GetNextProfile to retrieve profile names. Sample usage: hr = GetFirstProfile(&pName); while (SUCCEEDED(hr) && hr != NV_NO_MORE_PROFILES) { // do something with pName // ... CoTaskMemFree(pName); // get next profile if it exists hr = GetNextProfile(&pName); } |