IVpnManagementAgent的IID在哪里定义

时间:2019-07-03 13:36:19

标签: c winapi windows-runtime

我正在尝试创建IVpnManagementAgent的对象,但似乎找不到其IID(IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent)的定义位置,因此我可以实例化RoGetActivationFactory似乎需要第二个参数REFIID

我也看到了这个example,但是当我使用C时-我不能使用__uuidof

msdn sample似乎很奇怪地忽略了此参数。

问题是我是否编译此代码:

#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);}

像这样:cl rmousevpn.c /link RuntimeObject.lib windows.networking.lib

这给了我未解决的问题:

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

0 个答案:

没有答案