Click here to Skip to main content
15,881,938 members
Articles / Desktop Programming / MFC

Enhance netstat

Rate me:
Please Sign up or sign in to vote.
4.64/5 (11 votes)
16 Nov 2003 137.2K   3.8K   36  
This article shows an implementation of the main TCP/UDP functions of the IP Helper API that is used to get info about active connections including the process attached to a connection.
// Base.h: interface for the CBase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASE_H__7781CAF1_E76D_11D6_91CB_000039E099AC__INCLUDED_)
#define AFX_BASE_H__7781CAF1_E76D_11D6_91CB_000039E099AC__INCLUDED_

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

class CBase  
{
	public:
		CBase();
		virtual ~CBase();
		static DWORD m_dwLastError;
		CString GetProcById(DWORD dwPid);
		CString GetSysPath(void);

	//methods
	private:
		CString GetProcById4NT(DWORD dwPid);
		CString GetProcById4Other(DWORD dwPid);
		int GetSysVer(void);		
};

#endif // !defined(AFX_BASE_H__7781CAF1_E76D_11D6_91CB_000039E099AC__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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions