|
-
Oct 3rd, 2000, 08:15 AM
#1
Thread Starter
Fanatic Member
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 ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Oct 3rd, 2000, 08:38 AM
#2
Fanatic Member
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.
-
Oct 3rd, 2000, 08:38 AM
#3
Frenzied Member
I know C/C++ can do this, but I don't think APIs/VB will manage it.
-
Oct 3rd, 2000, 08:41 AM
#4
Fanatic Member
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.
-
Oct 4th, 2000, 01:21 AM
#5
Fanatic Member
zmerlinz, have you already seen the code?
-
Oct 4th, 2000, 03:16 AM
#6
Thread Starter
Fanatic Member
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 ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Oct 4th, 2000, 09:31 AM
#7
Fanatic Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|