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

Open Source Software protection system - Part 1

, 18 Apr 2004
Outlines in developing an open source implementation of a new software protection system.
encryptrelease_demo.zip
Encrypt.exe
hashlibproper.dll
SysInfo.dll
encrypt_src.zip
Encrypt.dsp
Encrypt.dsw
HashLibProper.dll
HashLibProper.lib
SysInfo.dll
/*
Include HashLibProper in your projects
*/

#ifdef HASHLIBPROPER_EXPORTS
#define HASHLIBPROPER_API __declspec(dllexport)
#else
#define HASHLIBPROPER_API __declspec(dllimport)
#endif
#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;
	structDrives();
	};
class HASHLIBPROPER_API llCD{ //Exported class
protected:
	structDrives *m_nNode;
	unsigned short int m_nCount;
public:
	llCD();
	~llCD();
	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.

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

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 | ;)

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 19 Apr 2004
Article Copyright 2003 by Kamal Shankar
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid