Click here to Skip to main content
15,894,343 members
Articles / Desktop Programming / MFC

Which machines in my LAN are running X DBMS

Rate me:
Please Sign up or sign in to vote.
3.00/5 (3 votes)
10 Jun 2009CPOL4 min read 25.5K   245   15  
Use NetServerEnum to find servers running particular services.
#if !defined(AFX_FINDDBSERVERDLG_H__8059861B_0191_4E00_B27B_2CB3395D93A0__INCLUDED_)
#define AFX_FINDDBSERVERDLG_H__8059861B_0191_4E00_B27B_2CB3395D93A0__INCLUDED_

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

#include "MachineInfo.h"

/////////////////////////////////////////////////////////////////////////////
// CFindDBServerDlg dialog

class CFindDBServerDlg : public CDialog
{
// Construction
public:
	CFindDBServerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CFindDBServerDlg)
	enum { IDD = IDD_FINDDBSERVER_DIALOG };
	CButton	m_btnOK;
	CButton	m_xbOracle;
	CButton	m_xbMSSQL;
	CListCtrl	m_lcResults;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFindDBServerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CFindDBServerDlg)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnMSSQL();
	afx_msg void OnOracle();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

    CMap <int, int, CString, CString> m_mapStatus;
    CStringArray    m_arrServiceNames;
    CMachineInfoArray m_arrMachineInfo;

    void Process( void );
    static UINT Process( LPVOID pParam );
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FINDDBSERVERDLG_H__8059861B_0191_4E00_B27B_2CB3395D93A0__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Pinnacle Business Systems
United States United States

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

HTTP 404 - File not found
Internet Information Services

Comments and Discussions