CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Bios

  1. #1
    Join Date
    Mar 2001
    Posts
    5

    Bios

    Is there a way I can change the Bios from a program that I write?


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Bios

    I doubt you can. I have seen the source code for CIH virus and it does write to the BIOS flash chip. however, it write rubbish into it so that your system become unbootable.

    Most manufacturer supply BIOS flash chip which run in real mode because there are no restrictions in I/O instruction in real mode. however in windows (protected mode), you application wouldn't be able to use the I/O instruction unless you ask a VXD to do so for you because VXD can run in RING 0.

    Even you can get thru all this, but what is the purpose of writing something to the BIOS as you may end up destroying the whole BIOS (unless you are very familiar with the BIOS chip that you are dealing with because different motherboard might have different bios cip). So, beware.

    cksiow
    http://vblib.virtualave.net - share our codes


  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Bios

    Actually, is there a way to retrieve the BIOS number? It appears at the bottom of the screen during bootup.


  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Bios

    'To read data from BIOS

    Private Declare Sub GetMem1 Lib "msvbvm50.dll" (ByVal MemAddress As Long, var As Byte)

    msgbox GetBIOSDate

    Private Function GetBIOSDate() As String

    Dim p As Byte, MemAddr As Long, sBios As String
    Dim i As Integer

    MemAddr = &HFFFF5
    For i = 0 To 7
    Call GetMem1(MemAddr + i, p)
    sBios = sBios & Chr$(p)
    Next i
    GetBIOSDate = sBios

    End Function


    'You can read Integer (2 bytes), Long and LongInteger variables using
    GetMem2, GetMem4 and GetMem8 functions
    'Private Declare Sub GetMem2 Lib "msvbvm50.dll" (ByVal MemAddress As Long,
    var As Integer)
    'Private Declare Sub GetMem4 Lib "msvbvm50.dll" (ByVal MemAddress As Long,
    var As Long)

    For this next one you must use LARGE_INTEGER (data type) as its a 64bit
    value.

    'Private Declare Sub GetMem8 Lib "msvbvm50.dll" (ByVal MemAddress As Long,
    var As LARGE_INTEGER)


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  5. #5
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Bios

    But what is MemAddr for that BIOS number?


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

Featured