Where is the IID of IVpnManagementAgent defined

混江龙づ霸主 提交于 2019-12-24 01:01:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!