问题
I'm trying to create an object of IVpnManagementAgent
but I can't seem to find where the IID (IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent
) of it is defined so I can instance RoGetActivationFactory
as it seems it requires me a second parameter of REFIID
.
Also I saw this example but as I'm using C - I can't use __uuidof
.
Weirdly enough the msdn sample seems to omit this parameter.
The problem is if I compile this code:
#include <roapi.h>
#define COBJMACROS
#include <windows.networking.vpn.h>
(main)()
{__x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent *pVpnMan;
IClassFactory *pCF; RoInitialize(RO_INIT_MULTITHREADED),
RoGetActivationFactory(0,
&IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent,
&pVpnMan);}
Like this: cl rmousevpn.c /link RuntimeObject.lib windows.networking.lib
It gives me unresolved:
rmousevpn.obj : error LNK2019: unresolved external symbol IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent referenced in function main
rmousevpn.exe : fatal error LNK1120: 1 unresolved externals
来源:https://stackoverflow.com/questions/56871434/where-is-the-iid-of-ivpnmanagementagent-defined