I simply copied and pasted the code from here:
#include <..\cppwinrt\winrt\windows.networking.vpn.h>
using namespace winrt::Windows::Networking::Vpn;
int wmain()
{ VpnManagementAgent vpn;
auto profiles = vpn.getProfilesAsync().get();
wprintf(L"Found %d profiles\n", profiles.Size());
for (auto vp : profiles)
{
wprintf(L"Found profile %s\n", vp.ProfileName().c_str());
}}
I know I've not initialized the windows runtime but that has nothing to do with the error I'm getting:
so.cpp(7): error C2039: 'getProfilesAsync': is not a member of 'winrt::Windows::Networking::Vpn::VpnManagementAgent'
I've done my research and there is definitely getProfilesAsync
in windows.networking.vpn.h
however I don't know how to reach it.