COM接口指南 [英] COM Interface Guid

查看:197
本文介绍了COM接口指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有太多的COM接口,所以我有一个小问题,说我有这个代码:

I'm not much into COM interfaces, so i have a small question, say I have this code:

[Guid("148BD528-A2AB-11CE-B11F-00AA00530503"), 
 InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IEnumWorkItems {
    [PreserveSig()]
    int Next([In] uint RequestCount, [Out] out System.IntPtr Names, 
                       [Out] out uint Fetched);
    void Skip([In] uint Count);
    void Reset();
    void Clone([Out, MarshalAs(UnmanagedType.Interface)] 
                          out IEnumWorkItems EnumWorkItems);
}



如何知道148BD528-A2AB-11CE-B11F-00AA00530503对应于IEnumWorkItems: http://msdn.microsoft.com /en-us/library/aa380706(VS.85).aspx

像我想知道这个接口的GUID: http://msdn.microsoft.com/en-us/library/aa381811(VS .85).aspx 我在哪里可以找到它?

Like if I want to know this interface's GUID : http://msdn.microsoft.com/en-us/library/aa381811(VS.85).aspx where do I find it?

推荐答案


  • 在OLE Viewer中打开类型lib(通常是服务器DLL本身) Visual Studio工具)

  • 在SDK .idl的/ .h中查找

  • 编写简短的VC ++程序并使用__uuidof(IInterface)

  • 在HKCR\ Interface下查找(虽然并非所有界面都需要注册)

  • Open the type lib (usually the server DLL itself) in OLE Viewer (included in visual studio tools)
  • looking it up in the SDK .idl's / .h's
  • write short VC++ program and use __uuidof(IInterface)
  • Looking it up under HKCR\Interface (though not all interfaces need to get registered there)

这篇关于COM接口指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆