|
GetNextProfile |
Top Previous Next |
|
The GetNextProfile continues an enumeration of profiles started with GetFirstProfile, retrieving the name of the next profile in the enumeration. HRESULT GetNextProfile( [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 next 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: GetNextProfile is used with GetFirstProfile 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); } |