-
hi,
is it possible to get information from the bios/cmos, i am after certain information such as the time and date and maybe the bios serial number or any other unique number on the bios/computer, i am writing a secure program tha use's information that is unique to a certain computer
Cheers
Merlin ?
-
I also did that some time ago. To read the values, you need the 3rd party dll, vbio.dll. This is a sample app I created that reads the time and date:
Code:
Private Declare Sub Anjan Lib "vbio.dll" ()
Private Declare Function Inp Lib "vbio.dll" (ByVal port&) As Integer
Private Declare Function Inpw Lib "vbio.dll" (ByVal port&) As Long
Private Declare Sub Out Lib "vbio.dll" (ByVal port&, ByVal byt%)
Private Declare Sub Outw Lib "vbio.dll" (ByVal port&, ByVal byt&)
Private Declare Function Peek Lib "vbio.dll" (ByVal seg&, ByVal off&) As Integer
Private Declare Function Peekw Lib "vbio.dll" (ByVal seg&, ByVal off&) As Long
Private Declare Sub Poke Lib "vbio.dll" (ByVal seg&, ByVal off&, ByVal byt%)
Private Declare Sub Pokew Lib "vbio.dll" (ByVal seg&, ByVal off&, ByVal byt&)
Private Function ReadClock(Adress As Integer) As Integer
Out &H70, Adress
inh% = Inp(&H71)
inh% = (inh% And 15) + Int(inh% / 16) * 10
ReadClock = inh%
End Function
Private Sub Form_Load()
Anjan 'initialiseer de dll
End Sub
Private Sub tmrTimer_Timer()
Dim Tijd As String
Tijd = ReadClock(4) & ":" 'uur uitlezen
Tijd = Tijd & ReadClock(2) & ":" 'minuut uitlezen
Tijd = Tijd & ReadClock(0) & vbCrLf 'seconde uitlezen
Tijd = Tijd & ReadClock(7) & "-" 'dag van de maand uitlezen
Tijd = Tijd & ReadClock(8) & "-" 'maand uitlezen
Tijd = Tijd & ReadClock(50) 'eeuw uitlezen
Tijd = Tijd & ReadClock(9) 'jaar uitlezen
Cls
ForeColor = vbWhite
CurrentX = 5
CurrentY = 5
Print Tijd
ForeColor = vbBlack
CurrentX = 0
CurrentY = 0
Print Tijd
End Sub
You need to add a timer (tmrtimer) to your form.
-
I know C/C++ can do this, but I don't think APIs/VB will manage it.
-
You can get vbio.dll here: http://www.zealsoftstudio.com/vbio/index.html
The program is cardware, so be nice and send a postcard to the author.
-
zmerlinz, have you already seen the code?
-
what code are you on about, i have visted the website but i am not sure what i have to do with the file
Merlin ?
-
You must put the file in you \windows\system directory. Then click on the start button-->Run and type:"regsvr32 c:\windows\system\vbio.dll". Now you're ready to use it. I was talking about the example code I posted.