VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function that returns computer Name where application is running.

by Issa Fahmy (7 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 15th August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function that returns computer Name where application is running.

API Declarations


(ByVal lpbuffer As String, nSize As Long) As Long


Rate Function that returns computer Name where application is running.



  Dim lngNCompSize As Long
  Dim strNetCompName As String
  
  'get the computer name
  lngNCompSize = 255
  strNetCompName = Space(lngNCompSize)
  If GetComputerName(strNetCompName, lngNCompSize) <> 0 Then
    strNetCompName = Left$(strNetCompName, lngNCompSize)
  Else
    strNetCompName = "DEFAULT"
  End If
  GetWorkStationID = UCase(strNetCompName)
  
End Function


Download this snippet    Add to My Saved Code

Function that returns computer Name where application is running. Comments

No comments have been posted about Function that returns computer Name where application is running.. Why not be the first to post a comment about Function that returns computer Name where application is running..

Post your comment

Subject:
Message:
0/1000 characters