Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The implementation of the interface and the implementation and use of QueryInterface

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the implementation of the interface and the implementation and use of QueryInterface, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

# include # include using namespace std

Interface IX: public IUnknown

{

Virtual void _ stdcall Fx () = 0

}

Interface IY: public IUnknown

{

Virtual void _ stdcall Fy () = 0

}

Interface IZ: public IUnknown

{

Virtual void _ stdcall Fz () = 0

}

Static const IID IID_IX = {0xff5ba880, 0xa371, 0x4a42, {0x87, 0x20, 0x96, 0xe0, 0x4d, 0x68, 0xd, 0x76}}; / / {FF5BA880-A371-4a42-8720-96E04D680D76}

Static const IID IID_IY = {0xde44d538, 0xe926, 0x4d5f, {0x94, 0x5d, 0x61, 0x83, 0x86, 0x7c, 0x63, 0x41}}; / / {DE44D538-E926-4d5f-945D-6183867C6341}

Static const IID IID_IZ = {0x91157d15, 0x22b1, 0x45d9, {0xb4, 0xc9, 0x81, 0x3, 0x8d, 0xec, 0xef, 0xad}}; / / {91157D15-22B1-45d9-B4C9-81038DECEFAD}

Class CA: public IX

Public IY

{

Public:

Virtual HRESULT _ stdcall QueryInterface (REFIID riid, _ _ RPC__deref_out void * * ppvObject)

Virtual ULONG _ stdcall AddRef () {return 0;}

Virtual ULONG _ stdcall Release () {return 0;}

Virtual void _ stdcall Fx () {cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report