CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2005
    Posts
    281

    Hardware Locking

    I have been trying to make it so my program checks the hardware of the computer that is trying to run it, (there is a collection of ID's that can run it stored) and if the computer has the same ID as one of the stored valid ones, then it run. I have seen code used with the WMI to get the Harddrive Serial, Motherboard Serial, etc. But I have not seen the code to get the CPU ID. If someone here could please help me with the code to make the program check, and how to get the CPU ID. I would greatly appreciate it!

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Talking Re: Hardware Locking

    Well I must refer you to my excellent Collegue.

    http://www.codeguru.com/cpp/w-p/syst...cle.php/c9087/


    HTH,
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Nov 2005
    Posts
    281

    Re: Hardware Locking

    Hmmm, I see the code, now I just need help with making the program check if the computer is valid to run on. Also, I've seen things like Ionworx Hardware Locking (or w/e its called) and the Software Passport Hardware locking, where it converts the ID to formats such as xxxx-xxxx, or xx-xx-xx-xx-xx. I don't understand how they take all those numbers and produce things such as that.

  4. #4
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    332

    Re: Hardware Locking

    Quote Originally Posted by Rehorav
    I don't understand how they take all those numbers and produce things such as that.
    Read about hashing. A oneway function that takes a integral number of blocks of data and produces constant number of output bytes such that it is almost impossible to reverse it.

  5. #5
    Join Date
    Nov 2005
    Posts
    281

    Re: Hardware Locking

    Ok, thank you both!. But whats odd is when I try the CPU ID project you showed me to, I get an ouput of this:
    Code:
    Name:		   INTEL Pentium IV (0.18 ╡m)
    Speed:		  2292MHz
    Vendor:		 GenuineIntel
    Family:		 15
    Model:		  2
    Stepping:	   9
    Features
    		MMX:	yes
    		3DNow:  no
    		SSE:	yes
    		SSE2:   yes
    I thought it would give me something like a unique serial?

    Also, how would I take all of this, the harddrive serial, and the Mobo serial and put it into the format of xx-xx-xx-xx (I can't find any good tutorials on Hashing)? Also, I've been searching around for a way to see how much RAM someone has in their computer, but I can't find that.
    Last edited by Rehorav; September 30th, 2006 at 02:07 PM.

  6. #6
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    332

    Re: Hardware Locking

    Quote Originally Posted by Rehorav
    (I can't find any good tutorials on Hashing)?
    There are plenty of them. SHA, MD5...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured