VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API

by Raghu (22 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 7th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API Functions

API Declarations


"GetPrivateProfileStringA" (ByVal AppName As String,ByVal KeyName As String,ByVal default As String,ByVal lpResult As String,ByVal lpLen
As Long,ByVal lpFileName as String) As Long

Dim kName As String
Dim dName As String
Dim mName As String

Dim kLen as Long
dim mLen as long
dim dLen as Long

Rate To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API



mname = string(255,chr(0))
dname = String(255,chr(0))

klen = len(kname)
mlen = len(mname)
dlen = len(dname)

'Display Adapter Name
GetPrivateProfileString "boot.description","display.drv","",dname,dlen _
 ,"C:\Windows\System.ini"
Msgbox left(dname,dlen)

'Keyboard Name
GetPrivateProfileString "boot.description","keyboard.typ","",kname,klen _
  ."C:\Windows\System.ini"
Msgbox left(kname,klen)

'Mouse Name
GetPrivateProfileString "boot.description","mouse.drv","",mname,mlen _
  ."C:\Windows\System.ini"
Msgbox left(mname,mlen)



Download this snippet    Add to My Saved Code

To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API Comments

No comments have been posted about To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API . Why not be the first to post a comment about To Get the Name of the Display Adapter,Keyboard Type,Mouse Type from the System.ini File using API .

Post your comment

Subject:
Message:
0/1000 characters