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

📄 client.h

📁 VC++串口通信设。本书详细说明讲解了在VC++环境下编写串口通信得过程。值得一看
💻 H
字号:
#ifndef CLIENT_H
#define CLIENT_H


// Get needed include files
#include "StdInc.h"
#include "COMTypes.h"


//
// Helper class, binding a component CLSID to its string description
//

struct CStringToCLSIDAssoc
{
   CString  m_strComponentDesc;
   CLSID    m_ComponentCLSID;
};

// Useful typedef 
typedef CTypedPtrList<CPtrList, CStringToCLSIDAssoc*> CComponentAssocList;


//
// Class used to pass shared data between Wizard
// notebook pages
//

class CSharedData
{
public:

   // Ctor
   CSharedData() : m_pIPizzaOrderTaker(NULL)
   { }

   // Dtor
   ~CSharedData()
   {
      SetPizzaOrderTaker(NULL);
   }

   // Public methods
   IPizzaOrderTaker* GetPizzaOrderTaker() const
   {
      return m_pIPizzaOrderTaker;
   }

   void SetPizzaOrderTaker(IPizzaOrderTaker* pIPizzaOrderTaker)
   {
      // If the interface pointer is already set, Release() it
      if (m_pIPizzaOrderTaker)
         m_pIPizzaOrderTaker->Release();

      // Set and AddRef() the new interface
      m_pIPizzaOrderTaker = pIPizzaOrderTaker;
      if (m_pIPizzaOrderTaker)
         m_pIPizzaOrderTaker->AddRef();
   }

private:

   // Private member data
   IPizzaOrderTaker* m_pIPizzaOrderTaker;
};


#endif

⌨️ 快捷键说明

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