Computer Science Canada HELP with HWID |
Author: | simon66 [ Mon Jan 05, 2009 4:00 pm ] |
Post subject: | HELP with HWID |
hey I would like to know how to get your computer Hard Ware ID (HWID) and vb 6. This is the code I have Quote: Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub Form_Load() Dim Serial As Long, VName As String, FSName As String 'Create buffers VName = String$(255, Chr$(0)) FSName = String$(255, Chr$(0)) 'Get the volume information GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255 'Strip the extra chr$(0)'s VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1) FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1) Text1.Text = "Your computer HWID is:" + Trim(Str$(Serial)) + " " End Sub and i have a text box so what is wrong here? |
Author: | DemonWasp [ Mon Jan 05, 2009 4:47 pm ] |
Post subject: | RE:HELP with HWID |
Please use [ syntax = " language " ] and [ / syntax ] tags to make your code easier to read. Also, a better description of the problem you're encountering goes a long way. Does the program not compile or run? Does the program crash? Does the output not match what you expected, and if so, what were you expecting, and what did you get? Make it easy for us to help you and we'll be more likely to. |
Author: | simon66 [ Mon Jan 05, 2009 4:59 pm ] | ||
Post subject: | Re: HELP with HWID | ||
what I got here is my C drive but what I wanted is my PC HWID so that I could generate a program that runs only in that computer HWID to reduce he user to reproduce and sell it... |