PJSECURE v1.01
Welcome to PJSECURE, A simple C style DLL which can be used as the basis for a network copy registration for your products. The program is freeware, meaning you are free to use it in anyway you like so long as you do not redistribute the source code with your product.
Full source code is provided for those interested. A VC 5 workspace file (pjsecure.dsw is provided for those who want to rebuild the dll). Also included is a simple demo console application which calls the 2 functions in the dll.
Contents |
History |
API |
Contacting the Author |
v1.0 (18 April 1998)
v1.01 (28 May 2000)
GetNicAddress
BOOL GetNicAddress(LPTSTR pszNicAddress, UINT nBufSize);
Parameters
pszNicAddress The string buffer which will contain the NIC address upon successful return from the function.
nBufSize The size of pszNicAddress. This should be set to 13 or greater prior to calling the function.
Remarks
This function retrieves the NIC address of the network card installed on the client machine. The client is responsible for allocating the buffer which will contain the NIC address upon return from the function. All NIC addresses are 12 bytes long so before calling the function you should allocate a buffer of at least 13 bytes to hold the address. The function internally calls the the RCP functions UuidCreate or UuidCreateSequential. This means that the code is not dependent on any specific network protocol being installed. The return is TRUE if the function succeeded else FALSE is returned.
GetCDriveSerialNumber
BOOL GetCDriveSerialNumber(LPDWORD pdwSerialNumber);
Parameters
pdwSerialNumber A pointer to a DWORD which upon return from the function will contain the serial number of the "C" drive.
Remarks
The return value from the function is TRUE if the
function succeeded else it is FALSE. The value returned in pdwSerialNumber can be
displayed by typing "VOL" at a command prompt. For security programs this call
could be used as a secondary means to obtaining unique information about a client
computer.
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
28 May 2000