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

📄 account.h

📁 本程序是利用com原理开发的一个ATM机与银行之间的分布式应用
💻 H
字号:
// Account.h : Declaration of the CAccount

#ifndef __ACCOUNT_H_
#define __ACCOUNT_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CAccount
class ATL_NO_VTABLE CAccount : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CAccount, &CLSID_Account>,
	public IDispatchImpl<IAccount, &IID_IAccount, &LIBID_BANKLib>
{
public:
	CAccount()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_ACCOUNT)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CAccount)
	COM_INTERFACE_ENTRY(IAccount)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IAccount
public:
	STDMETHOD(WithDraw)(BSTR AccountID, float drawing, float *pCurFund);
	STDMETHOD(Deposit)(BSTR AccountID, float saving, float * pCurFund);
	STDMETHOD(GetCurrentFund)(BSTR AccountID, float * pCurFund);
	STDMETHOD(Login)(BSTR AccountID, BSTR Pswd, BOOL *pIsValid);

	//--自建函数及变量----------------------------------
	BOOL ConnectDBSource(/*BSTR AccountID,BSTR Pswd*/);   //连接数据源
	_ConnectionPtr   m_pConnection;	
	_CommandPtr      pCommand;
	_RecordsetPtr    pRecordset;
};

#endif //__ACCOUNT_H_

⌨️ 快捷键说明

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