主要是对 “在windows phone Mango中使用原生代码开发程序” 一文中描述程序的补充。有朋友没有明白,所以写了一个。

 1 [
2 object,
3 uuid(00A5B33F-1CED-455A-A688-958AFD3A8CE1),
4 dual,
5 nonextensible,
6 helpstring("ITestSample Interface"),
7 pointer_default(unique)
8 ]
9 interface ITestSample : IUnknown{
10 HRESULT TestMethod1();
11 HRESULT TestMethod2(BSTR InputString, BSTR* OutputString);
12 };
13 [
14 uuid(8E60F6EE-6CCE-4DC2-8D62-639BBBFF7C24),
15 version(1.0),
16 helpstring("ComNative 1.0 Type Library")
17 ]
18 library ComNativeLib
19 {
20 importlib("stdole2.tlb");
21 interface IDocHostUIHandlerDispatch;
22 interface IAxWinAmbientDispatchEx;
23 [
24 uuid(0B615DF3-49D9-4334-879F-A3484D0FD477),
25 helpstring("TestSample Class")
26 ]
27 coclass TestSample
28 {
29 [default] interface ITestSample;
30 };
31 };

注意红色GUID标识。

示例代码下载

相关文章:

  • 2021-12-26
  • 2021-12-23
  • 2022-01-12
  • 2021-06-03
  • 2021-09-06
  • 2021-05-31
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
相关资源
相似解决方案