Creates a connection between an object's connection point and a client's sink.

HRESULT AtlAdvise(
   IUnknown* pUnkCP,
   IUnknown* pUnk,
   const IID& iid,
   LPDWORD pdw 
);
pUnkCP

[in] A pointer to the IUnknownof the object the client wants to connect with.

pUnk

[in] A pointer to the client's IUnknown.

iid

[in] The GUID of the connection point. Typically, this is the same as the outgoing interface managed by the connection point.

pdw

[out] A pointer to the cookie that uniquely identifies the connection.

二.AtlUnadvise

Terminates the connection established through AtlAdvise. 
HRESULT AtlUnadvise(
   IUnknown* pUnkCP,
   const IID& iid,
   DWORD dw 
);
pUnkCP

[in] A pointer to the IUnknownof the object that the client is connected with.

iid

[in] The GUID of the connection point. Typically, this is the same as the outgoing interface managed by the connection point.

dw

[in] The cookie that uniquely identifies the connection.

三.COM_INTERFACE_ENTRY2

 
Use this macro to disambiguate two branches of inheritance. 
For example, if you derive your class object from two dual interfaces, 
you expose IDispatch using COM_INTERFACE_ENTRY2 since IDispatch can be obtained from either one of the interfaces.
 

四.CWinApp::RunEmbedded

Call this function to determine whether the "/Embedding" or "-Embedding" option is present, 
which indicates whether the server application was launched by a client application.

五.CWinApp::RunAutomated

Call this function to determine whether the "/Automation" or "-Automation" option is present, which indicates whether the server application was launched by a client application.

相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2021-07-14
  • 2022-01-12
  • 2021-07-18
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2021-08-22
  • 2021-11-10
  • 2021-06-14
  • 2021-10-11
  • 2021-05-26
相关资源
相似解决方案