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

📄 rcoapplication.h

📁 MSSQL备份及恢复的VC++源代码。提供给大家学习。
💻 H
字号:
//////////////////////////////////////////////////////////////////////////////
//																			//
//		Created by Ozzy Osbourne(maojun) . HangZhou . China . 20030215		//
//																			//
//////////////////////////////////////////////////////////////////////////////

// CRcOApplication class use SQL-DMO Application Object. 
// The Application object represents properties of SQL-DMO objects and the user application.
// 
// Expect bugs.
// 
// Please use and enjoy. Please let me know of any bugs/mods/improvements 
// that you have found/implemented and I will fix/incorporate them into this file.
// Please send report to OzzyJMalmsteen@yahoo.com.cn or Ozzman@163.net


#ifndef _RCOAPPLICATION_H_
#define _RCOAPPLICATION_H_

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

// Stardard headers
#include <stdio.h>
#include <assert.h>
#include <string.h>

#include <afxtempl.h>

// DMO headers
#include "..\base\include\sqldmoid.h"
#include "..\base\include\sqldmo.h"

// Custom headers
#include "RcErrorMessage.h"

class CRcOApplication  
{
public:
	CRcOApplication();
	virtual ~CRcOApplication();

	// Get implementation error message.
	CString GetErrorMessage() { return m_strErrorMessage; }

	// Initialize CRcOApplication class.
	BOOL Initializtion();
	// Destroy CRcOApplication class.
	BOOL Completion();

	// ***************** Methods ***************** //

	// The GetAvailableSQLServers method returns a CArray point variable 
	// that enumerates network-visible instances of Microsoft SQL Server 2000.
	CArray<CString,CString&> * GetAvailableServersList() { return &m_arrServersList; }
	// The SetAvailableSQLServers method save m_ServersArray variable 
	// that enumerates network-visible instances of Microsoft SQL Server 2000.
	BOOL SetAvailableServersList();
	// The GetAvailableServersAmount method returns a LONG variable 
	// that enumerates network-visible instance amount.
	LONG GetAvailableServersAmount() { return m_lServersAmount; }

private:
	// This is CRcErrorMessage point.
	CRcErrorMessage* m_pErrorMessage;
	// This member variable save error message.
	CString m_strErrorMessage;

	// Address of pointer variable that receives the interface pointer requested
	// in IID_ISQLDMOApplication. Upon successful return, LPSQLDMOAPPLICATION contains 
	// the requested interface pointer. 
	static LPSQLDMOAPPLICATION m_pDMOApp;

	// This member variable save enumerates network-visible instances of MS SQL Server 2000.
	CArray<CString, CString&> m_arrServersList;
	// This member variable save instance amount.
	LONG m_lServersAmount;

};

#endif

⌨️ 快捷键说明

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