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

📄 accountmgr.h

📁 Chapter08-Transactions.rar com example
💻 H
字号:
// AccountMgr.h: Definition of the CAccountMgr class
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ACCOUNTMGR_H__A08A7EBA_2FA8_4A6C_A900_3B604AD1623C__INCLUDED_)
#define AFX_ACCOUNTMGR_H__A08A7EBA_2FA8_4A6C_A900_3B604AD1623C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "Resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CAccountMgr

class CAccountMgr : 
	public IDispatchImpl<IAccountMgr, &IID_IAccountMgr, &LIBID_ACCOUNTMGMTLib>, 
	public ISupportErrorInfo,
	public CComObjectRoot,
	public CComCoClass<CAccountMgr,&CLSID_AccountMgr>
{
public:
	CAccountMgr();
	~CAccountMgr();

BEGIN_COM_MAP(CAccountMgr)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(IAccountMgr)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()
//DECLARE_NOT_AGGREGATABLE(CAccountMgr) 
// Remove the comment from the line above if you don't want your object to 
// support aggregation. 

DECLARE_REGISTRY_RESOURCEID(IDR_AccountMgr)
// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// IAccountMgr
public:
	STDMETHOD(Debit)(/*[in]*/ BSTR bsClient, /*[in]*/ long lAmount);

private:
	ADOConnectionPtr OpenAccountsDB();
	long GetBalance(ADOConnectionPtr spConn, BSTR bsClient);
	void UpdateBalance(ADOConnectionPtr spConn, BSTR bsClient, long lBalance);
};

#endif // !defined(AFX_ACCOUNTMGR_H__A08A7EBA_2FA8_4A6C_A900_3B604AD1623C__INCLUDED_)

⌨️ 快捷键说明

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