Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to get the hardware ID?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Dec 19, 2007 6:08 pm    Post subject: How to get the hardware ID? Reply with quote

So how do you get the hardware ID???
Back to top
View user's profile Send private message
Ksbunker
Advanced Cheater
Reputation: 0

Joined: 18 Oct 2006
Posts: 88

PostPosted: Wed Dec 19, 2007 9:12 pm    Post subject: re: Reply with quote

I think GetVolumeInformation (http://msdn2.microsoft.com/en-us/library/aa364993.aspx) might be what you're after.

Parameter four, lpVolumeSerialNumber , specifically.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Dec 20, 2007 6:04 pm    Post subject: Reply with quote

But It has that parameter in the call. So how do I call it?
Back to top
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Thu Dec 20, 2007 8:27 pm    Post subject: Reply with quote

Try this

C++:
DWORD V, M, F;
GetVolumeInformation("C:\", NULL, 0, @V, M, F, NULL, 0);

// V has the Serial Number of GetVolumeInformation of the C drive.

Customize it, add math.
Back to top
View user's profile Send private message AIM Address MSN Messenger
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Dec 23, 2007 8:43 pm    Post subject: Reply with quote

VB please... I can use null because its a parameter...
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Sun Dec 23, 2007 9:15 pm    Post subject: Reply with quote

Code:
Option Explicit
Private Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal RootPathName As String, ByVal VolumeNameBuffer As String, ByVal VolumeNameSize As Long, ByRef VolumeSerialNumber As Long, ByRef MaximumComponentLength As Long, ByRef FileSystemFlags As Long, ByVal FileSystemNameBuffer As String, ByVal FileSystemNameSize As Long) As Long

Private Sub Form_Load()
Dim VolumeName As String, SerialNumber As Long, Unused As Long
VolumeName = String$(64, 0)

If GetVolumeInformation("C:\", VolumeName, Len(VolumeName), _
        SerialNumber, Unused, Unused, vbNullString, 0) <> 0 Then
    Debug.Print "Volume label:  "; Trim(VolumeName)
    Debug.Print "Serial number: "; Hex$(SerialNumber)
Else
    Debug.Print "Error: " & Err.LastDllError
End If
End Sub

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites