🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by ki Tue, 05 Sep 2006 23:23
Best technique
#2997
Author: ki
Date: Tue, 05 Sep 2006 23:23
9 lines
1032 bytes
Hello world

I want to write a serial key generator algorithm for a program for the 
registration and trial version.
For that i want a unique id from the pc.
What is the best technique.
Any suggestion greately appreciated.

Thanks 
Re: Best technique
#2999
Author: Colin B Maharaj
Date: Wed, 06 Sep 2006 02:12
56 lines
2432 bytes
This was discussed some time ago.....
This part of the registry is created every time you reboot the PC. It is 
a fixed value. It can be altered by an administrator, but, will revert 
after a reboot.

You can then HASH this and use the hash as a unique string for your system.

AnsiString SystemBiosVersion()
{
    HKEY hKey;
    DWORD keyType   = 0;
    DWORD retValue  = 0;
    DWORD keyLength = 0;
    char *t = new char [MAX_PATH];
    char *CV = new char [256];
    AnsiString A="Unknown Bios";

    strcpy(CV, "Hardware\\Description\\System");
    retValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE, CV, NULL, KEY_READ, &hKey);
    if (retValue != ERROR_SUCCESS)
    {
      delete CV;
      delete t;
      return A;
    }
    RegQueryValueEx(hKey, "SystemBiosVersion", NULL, &keyType, NULL, 
&keyLength);
    retValue = RegQueryValueEx(hKey, "SystemBiosVersion", NULL, 
&keyType, (UCHAR *)t, &keyLength);
    RegCloseKey(hKey);

    if (retValue != ERROR_SUCCESS)
    {
       delete CV;
       delete t;
       return A;
    }
    A = t;
    delete CV;
    delete t;
    return A;
}


ki wrote:
> Hello world
> 
> I want to write a serial key generator algorithm for a program for the 
> registration and trial version.
> For that i want a unique id from the pc.
> What is the best technique.
> Any suggestion greately appreciated.
> 
> Thanks 
> 
> 
Re: Best technique
#2998
Author: Colin B Maharaj
Date: Wed, 06 Sep 2006 02:14
17 lines
1549 bytes
I see you were discussing MAC Address stuff earlier. I have seen 
postings where the MAC address can be altered at a software level but I 
never tried it. Also certain mother boards can change the network card 
MAC address.

ki wrote:
> Hello world
> 
> I want to write a serial key generator algorithm for a program for the 
> registration and trial version.
> For that i want a unique id from the pc.
> What is the best technique.
> Any suggestion greately appreciated.
> 
> Thanks 
> 
> 
Re: Best technique
#3000
Author: JD
Date: Wed, 06 Sep 2006 08:54
11 lines
1018 bytes
"ki" <shaikakbar250281@yahoo.co.in> wrote:
>
> [...] For that i want a unique id from the pc.

This has been discussed many times before in great detail.
Search the archives:

    http://www.tamaracka.com/search.htm

~ JD
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads