Click here to Skip to main content
15,884,473 members
Articles / Programming Languages / Visual Basic 6

Professional System Library: Introduction

Rate me:
Please Sign up or sign in to vote.
4.84/5 (93 votes)
22 Nov 2010CPOL14 min read 191K   3.4K   232  
A simplified and unified way for accessing most frequently used information about Process, System, and Environment.
#pragma once

#include "GUIDs.h"

class CProSysLibModule : public CAtlDllModuleT< CProSysLibModule >
{
public:

	CProSysLibModule();
	~CProSysLibModule();

	void SetResourceInstance(HINSTANCE hInstance);
	HINSTANCE GetResourceInstance();

	static void InitLibId() throw();
	DECLARE_REGISTRY_APPID_RESOURCEID(IDR_PROSYSLIB, PSL_AppID)

	void OnModuleStart();
	void OnModuleTerminate();

	bool IsWin2000();
	bool InitWinSockets();

private:

	CRITICAL_SECTION m_cs;

	bool m_bWinSockets;	// Indicates whether WinSockets are being used;

	bool m_bWin2000;	// Indicates whether the current OS is Windows 2000;
						// If so, then variant types VT_I8 and VT_UI8 are not supported;

	HINSTANCE m_hResInstance;
};

extern class CProSysLibModule _Module;

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) Sibedge IT
Ireland Ireland
My online CV: cv.vitalytomilov.com

Comments and Discussions