⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 object3.h

📁 英文版的 想要的话可以下载了 为大家服务
💻 H
字号:
/*
 * OBJECT3.H
 *
 * Definition of the CObject1 class that uses mutliple
 * inheritance to provide ISampleOne and ISampleTwo.
 *
 * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#ifndef _OBJECT3_H_
#define _OBJECT3_H_


//Creation function
BOOL CreateObject3(IUnknown **);


/*
 * The object we want to provide in OLE supports the IUnknown,
 * ISampleOne, and ISampleTwo interfaces.
 *
 * The C++ class, CObject3, implements these interfaces through
 * multiple inheritance, so the implementation of all IUnknown
 * members is shared.  The trick to this implementation is that
 * we have to use explicit typecasts in the implementation of
 * QueryInterface in order to create the right vtables for each
 * interface.  See OBJECT3.CPP.
 */

//The C++ class that manages the actual object.
class CObject3 : public ISampleOne, public ISampleTwo
    {
    private:
        DWORD           m_cRef;         //Object reference count

    public:
        CObject3(void);
        ~CObject3(void);

        //Shared IUnknown members
        STDMETHODIMP         QueryInterface(REFIID, PPVOID);
        STDMETHODIMP_(DWORD) AddRef(void);
        STDMETHODIMP_(DWORD) Release(void);

        //ISampleOne members
        STDMETHODIMP         GetMessage(LPTSTR, UINT);

        //ISampleTwo members
        STDMETHODIMP         GetString(LPTSTR, UINT);
    };

typedef CObject3 *PCObject3;

#endif _OBJECT3_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -