rcenuminstance.h

来自「MSSQL备份及恢复的VC++源代码。提供给大家学习。」· C头文件 代码 · 共 60 行

H
60
字号
//////////////////////////////////////////////////////////////////////////////
//																			//
//			Created by Ozzy Osbourne(maojun) . HangZhou . 20030212			//
//				 warning: need add sqldmoid.h & sqldmo.h					//
//																			//
//////////////////////////////////////////////////////////////////////////////

// CRcEnumInstance is enum all MSSQLServer instances in the LAN 
// 
// 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 _RCENUMINSTANCE_H_
#define _RCENUMINSTANCE_H_

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

#include <afxtempl.h>

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

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

	// Initialize CRcEnumInstance class.
	BOOL InitEnumInstance();

	// *** Important funtion, use CLSID_SQLDMOApplication *** //
	// Enum MSSQLServer instance in LAN.
	BOOL SetInstanceList();
	// Get MSSQLServer instance list in LAN.
	CArray<CString,CString&> *GetInstanceList();
	// Get MSSQLServer instance amount in LAN.
	long GetInstanceAmount();

	// *** Important funtion, use CLSID_SQLDMOServer2 *** //
	// Enum has been installed MSSQLServer instance in local.
	BOOL SetInstalledInstanceList();
	// Get has been installed MSSQLServer instance list in local.
	CArray<CString,CString&> *GetInstalledInstanceList();
	// Get has been installed MSSQLServer instance amount in local.
	long GetInstalledInstanceAmount();

private:
	// This member variable save the error message.
	CString m_strErrorMessage;

};

#endif

⌨️ 快捷键说明

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