Results 1 to 7 of 7

Thread: B.I.O.S./C.MO.S.

  1. #1

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604

    Unhappy

    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]

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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.

  3. #3
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    I know C/C++ can do this, but I don't think APIs/VB will manage it.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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.

  5. #5
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    zmerlinz, have you already seen the code?
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  6. #6

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    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]

  7. #7
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

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