Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

How to write a simple but effective TCP/IP port scanner for Win32

, 27 Oct 2001
An article on how to write a TCP/IP port scanner with a GUI, based on the MFC's property sheet paradigm
/*
	win32api.h
	Implementazione di quanto omesso dall' API (SDK).
	Luca Piergentili, 13/09/98
	lpiergentili@yahoo.com
	http://www.geocities.com/lpiergentili/
*/
#ifndef _WIN32API_H
#define _WIN32API_H 1

#include "window.h"

enum OSVERSIONTYPE {
	WINDOWS_31,
	WINDOWS_95,
	WINDOWS_98,
	WINDOWS_MILLENNIUM,
	WINDOWS_NT,
	WINDOWS_2000,
	UNKNOW_WINDOWS_VERSION
};

BOOL			WritePrivateProfileInt	(LPCSTR lpcszSectioneName,LPCSTR lpcszKeyName,int iValue,LPCSTR lpcszIniFile);

LPSTR		GetThisModuleFileName	(LPSTR lpszFileName,UINT nSize);

void			GetLastErrorString		(void);

int			MessageBoxResource		(HWND hWnd,UINT type,LPCSTR lpcszTitle,UINT nID);
int			MessageBoxResourceEx	(HWND hWnd,UINT type,LPCSTR lpcszTitle,UINT nID,...);
int			FormatResourceString	(LPSTR buffer,UINT nSize,UINT nID);
int			FormatResourceStringEx	(LPSTR buffer,UINT nSize,UINT nID,...);

BOOL			ExtractResource		(UINT resource,LPCSTR lpcszResName,LPCSTR lpszFileName);
BOOL			ExtractResourceIntoBuffer(UINT nID,LPCSTR lpcszResName,LPSTR lpBuffer,UINT nBufferSize);

BOOL			CreateShortcut			(LPCSTR Target,LPCSTR Arguments,LPCSTR LinkFileName,LPCSTR LinkLocation,LPCSTR WorkingDir,UINT nIconIndex);

void			Delay				(int delay);
BOOL			PeekAndPump			(void);

OSVERSIONTYPE	GetWindowsVersion		(LPSTR lpszWindowsPlatform,UINT nSize,DWORD* dwMajorVersion = NULL,DWORD* dwMinorVersion = NULL);

BOOL			DeleteFileToRecycleBin	(HWND hWnd,LPCSTR lpcszFileName,BOOL bShowDialog = TRUE,BOOL bAllowUndo = TRUE);

LPSTR		EnsureBackslash		(LPSTR lpszFileName,UINT nFileSize);
LPSTR		RemoveBackslash		(LPSTR lpszFileName);

int			GetTaskBarRect			(RECT *pRect);

#endif // _WIN32API_H

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

Share

About the Author

Luca Piergentili
Web Developer
Italy Italy
I like C and C++, Acid Jazz, James Brown, gli Spaghetti Aglio e Olio, alla Bolognesa, alla Puttanesca e le Fettuccine alla Matriciana ('Maccaroni' over the world). Of course I like beautiful big tits girls too, my little car, Frank Zappa, the art of Zen, italian coffee and much more...

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 28 Oct 2001
Article Copyright 2001 by Luca Piergentili
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid