|
-
Jul 31st, 2001, 04:41 AM
#1
Thread Starter
New Member
msvbvm60.dll & bios date and serial no
With the following code i can read the bios date only i cant read the complete bios information (ID , Serial No. Manf., Ver.)
the address HFFFF5 contains bios date only
pls. check and advise me
Option Explicit
' this code works under VB 6, will work under VB 5 with mods
' the GetMem functions work under NT 4 & Windows 2000, but you cannot access BIOS
' memory on NT 4 or NT 5 machines. So don't try....
' requires a textbox named Text1 on your form.
Private Declare Sub GetMem1 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Byte)
' GetMem2, GetMem4 and GetMem8 functions read 2, 4, & 8 bytes of memory
' GetMem2 & GetMem4 are usable by VB
Private Declare Sub GetMem2 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Integer)
Private Declare Sub GetMem4 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Long)
' NOTE:
' For VB 5.0 change the "msvbvm60.dll" to msvbvm50.dll
' I'm not using these api's; they write memory and are included for completeness.
' Two words: WATCH OUT
' if you elect to use these, you are on your own...
Private Declare Sub PutMem1 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Byte)
Private Declare Sub PutMem2 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Integer)
Private Declare Sub PutMem4 Lib "msvbvm60.dll" (ByVal lAddress As Long, var As Long)
Private Sub Form_Load()
Text1.Text = BIOSDateString
End Sub
Private Function BIOSDateString() As String
Dim b As Byte
Dim AddrMem As Long
Dim strTmp As String
Dim i As Integer
AddrMem = &HFFFF5
strTmp = ""
For i = 0 To 7
Call GetMem1(AddrMem + i, b)
strTmp = strTmp & Chr$(b)
Next
BIOSDateString = strTmp
End Function
__________________
Magdi T.
-
Jul 31st, 2001, 05:34 PM
#2
Unfortunately, I wrote that code, so the onus is on me to answer.
The serial number starts at FF478, 71 characters max, and is a null-terminated string
ie.
Code:
AddrMem = &HFF478
strTmp = ""
For i = 0 To 71
Call GetMem1(AddrMem + i, b)
strTmp = strTmp & Chr$(b)
Next
BIOSSerialString = left(strTmp,instr(strTmp,chr(0) )
The memory location of the version is variable, as far as I can tell.
- jim mcnamara
-
Aug 1st, 2001, 09:52 AM
#3
Thread Starter
New Member
Thanks for Macnamara
thank u i will try it on another machine it does not work with award bios with AMD pro.
pls. send me he ID address to
the last statment in ur code has an error pls. correct it for me
is it work with WIN 2000
tahanks alot
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
|