Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get a computers ID 1

Status
Not open for further replies.

testeng

Technical User
Apr 5, 2001
32
US
Hi,
I am trying to get the computers ID when I load up a form. Does anybody know the code that lets you do this.

Thanks for your help
 
What do you mean by "Computers ID"?

Do you mean the machine name?
 
Use the GetComputerName API. The declaration to use is as follows . . .

Code:
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As LongDeclare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long


Hope that helps you out!
- Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top