Hi zheng cheng,
Thank you for posting in the Microsoft Community Forums.
ComPtr<IVectorView<NetworkConnectionProfile^>> profilesView;
// Assuming you've got the profilesView here somehow
UINT32 size = 0;
profilesView->get_Size(&size);
for (UINT32 i = 0; i < size; ++i)
{
ComPtr<NetworkConnectionProfile> profile;
HRESULT hr = profilesView->GetAt(i, &profile);
if (SUCCEEDED(hr))
{
// Now you can use the profile, e.g. get its name
hstring profileName;
hr = profile->GetProfileName(profileName.GetAddressOf());
if (SUCCEEDED(hr))
{
wprintf(L “Profile Name: %s\n”, static_cast<const wchar_t*>(profileName.Get()));
}
}
}
Best regards
Neuvi