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

📄 beeper.h

📁 英文版的 想要的话可以下载了 为大家服务
💻 H
字号:
/*
 * BEEPER.H
 * Beeper Automation Object #5 Chapter 14
 *
 * Classes that implement the Beeper object.
 *
 * Copyright (c)1993-1995 Microsoft Corporation, All Right Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#ifndef _BEEPER_H_
#define _BEEPER_H_

/*
 * This #define tells <bookguid.h> to not define GUIDs that will
 * be defined in MKTYPLIB-generated header files, like ibeeper.h.
 */
#define GUIDS_FROM_TYPELIB
#define INC_AUTOMATION
#define INC_CONTROLS
#define CHAPTER14
#include <inole.h>

//This file is generated from MKTYPLIB
#include "ibeeper.h"

class CImpIProvideClassInfo;
typedef class CImpIProvideClassInfo *PCImpIProvideClassInfo;



class CBeeper : public IBeeper
    {
    protected:
        ULONG           m_cRef;         //Object reference count
        LPUNKNOWN       m_pUnkOuter;    //Controlling unknown
        PFNDESTROYED    m_pfnDestroy;   //To call on closure

        long            m_lSound;       //Type of sound

        ITypeInfo      *m_pITINeutral;  //Type information
        IUnknown       *m_pIUnkStdDisp; //StdDispatch object

        PCImpIProvideClassInfo  m_pImpIProvideCI;

    public:
        CBeeper(LPUNKNOWN, PFNDESTROYED);
        ~CBeeper(void);

        BOOL         Init(void);

        //Non-delegating object IUnknown
        STDMETHODIMP         QueryInterface(REFIID, PPVOID);
        STDMETHODIMP_(ULONG) AddRef(void);
        STDMETHODIMP_(ULONG) Release(void);

        //IBeeper functions
        STDMETHODIMP_(long)  get_Sound(void);
        STDMETHODIMP_(void)  put_Sound(long);
        STDMETHODIMP_(long)  Beep(void);
    };

typedef CBeeper *PCBeeper;


class CImpIProvideClassInfo : public IProvideClassInfo
    {
    public:
        ULONG           m_cRef;     //For debugging

    private:
        LPUNKNOWN       m_pUnkOuter;
        ITypeInfo      *m_pITI;     //To return from GetClassInfo

    public:
        CImpIProvideClassInfo(LPUNKNOWN, ITypeLib *);
        ~CImpIProvideClassInfo(void);

        //IUnknown members that delegate to m_pUnkOuter.
        STDMETHODIMP         QueryInterface(REFIID, PPVOID);
        STDMETHODIMP_(ULONG) AddRef(void);
        STDMETHODIMP_(ULONG) Release(void);

        //IProvideClassInfo members
        STDMETHODIMP GetClassInfo(ITypeInfo **);

    };



#endif //_BEEPER_H_

⌨️ 快捷键说明

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