Click here to Skip to main content
11,632,715 members (82,733 online)
Click here to Skip to main content
Add your own
alternative version

Open Source Software protection system - Part 1

, 18 Apr 2004 122.3K 3.9K 99
Outlines in developing an open source implementation of a new software protection system.
Include HashLibProper in your projects

#define HASHLIBPROPER_API __declspec(dllexport)
#define HASHLIBPROPER_API __declspec(dllimport)
#include <fstream>

// This class is exported from the HashLibProper.dll
struct HashCreateDrives{
	char m_szDriveName[5]; //To hold "X:\\"
	char m_szVolumeName[512];
	char m_szFileSystem[512];
	DWORD m_dwVolumeSerial;

struct SystemInf{
	char sSpeed[12];
	char sProcessorName[1024];
	char sTotalRAM[12];
	char sOSName[4096];
	void GetSystemInf(void);

struct structDrives{
	char m_szDriveName[4];
	char m_szVolumeName[260];
	DWORD m_dwVolumeSerial;
	structDrives *m_nNext;
class HASHLIBPROPER_API llCD{ //Exported class
	structDrives *m_nNode;
	unsigned short int m_nCount;
	void add(char *);
	void validate();
	int GetCount();
	char GetDriveName(unsigned short int);//Return 'I' for "I:\\".Note that first drive is 0
	int CheckMachine(char* ,char* );//returns the strlen() of argument 1
	void Reset(void);//Makes *m_nNode=NULL and deletes linked list;
	BOOL GetMeDrives(unsigned int DrvType=DRIVE_CDROM);//A singular function which adds drives matching 'DrvType' into the linked list
extern HASHLIBPROPER_API char MyCDLabel[256];//Label of our CD
extern HASHLIBPROPER_API char MyDriveLetter;//To be updated within the program

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.


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


About the Author

Kamal Shankar
Web Developer
United States United States
Kamal Shankar is a programming freak (or so he feels).He currently lives in the Salt Lake City and loves doing what he has been since 1990 - coding horribly Wink | ;)

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150728.1 | Last Updated 19 Apr 2004
Article Copyright 2003 by Kamal Shankar
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid