Click here to Skip to main content
13,045,657 members (67,607 online)
Click here to Skip to main content


101 bookmarked
Posted 27 Apr 2003

Open Source Software protection system - Part 1

, 18 Apr 2004
Outlines in developing an open source implementation of a new software protection system.
This package/DLL only encapsulates drive enumeration and drive info creation through single linked lists

When the GetMeDrives(nDriveType) is called it adds drives of nDriveType to the user defined linked list object.By default nDriveType is DRIVE_CDROM
It under the hood actually calls GetLogicalDrives, followed by a call to the member add() which just adds the drive letters to the linked list.
Next,validate(), fills up drive volume information,volume label and filesystem to the above linked list.
Last we call CheckMachine() , which simply copies the above collected data alongwith system RAM,OS Name,and processor name into a single string(say szKeyString) and then calculates MD5(szKeyString) returning it into another string say szKey.It returns the strlen(szKeyString), so you can allocate the required number of bytes required for the characters strings
The above can be achived by calling CheckMachine(szKeyString,szKey) on the object

If under any case, you require to reset the created linked list(say you want to add drives of another type), then instead of creating another object, you can just call lCCD_ObjectName.Reset() and all the data of lCCD_ObjectName is removed from memory
The DLL also exports

char MyCDLabel[256];//Label of our CD
char MyDriveLetter;//To be updated within the program

These two exports will be put to use soon(they ARE being used internally) when we might take upon CD Protection

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...

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