There is an inventory-saving software written in pb6.0. The registration method is to encrypt the hard disk serial number after obtaining the hard disk serial number. Recently, the hard disk serial number cannot be obtained and the software cannot run,
The getdisksn function in netdiskdll. dll is called, and the md5string digest function is also used. So I re-compile getdisksn in netdiskdll. dll,
It always returns the hard drive serial number used by the computer.
Bool winapi
Getdisksn (long inlen, char * outstr)
{
Memcpy (outstr, "5la8wnzh", 8 );
Return true;
}
The hard disk serial number problem is solved. How can md5string be solved? Use the original library function:
Bool winapi
Md5string (char * instr, long inlen, char * outstr, long outlen)
{
Return false;
}
Relocate in the netdiskdll. Def file:
Md5string = oldnetdiskdll. md5string
Rename the original netdiskdll. DLL to oldnetdiskdll. dll, and copy the edited netdiskdll. DLL to the application directory.