zoukankan      html  css  js  c++  java
  • COM Tip(1)

    一.AtlAdvise

    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.

  • 相关阅读:
    第五课补充01——持久化
    第六课补充01——主从复制原理,哨兵机制
    第五课作业——持久化
    矢量图网站
    WPF中获取控件之间的相对位置
    如何使用Prism框架的EventAggregator在模块间进行通信
    WPF中XAML中使用String.Format格式化字符串示例
    Win32 API中的user32.dll中的ShowWindow方法参数整理
    C# XML序列化帮助类代码
    建议2:使用默认转型方法
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/2078812.html
Copyright © 2011-2022 走看看