Global Const FMT_wksta_info_10 = "P15P20P15B1B1P15P159"
Global L10_WorkstationData As L10_WKSTA
Declare Function NETAPI_NetWkstaGetInfo Lib "NETAPI.DLL" Alias "NetWkstaGetInfo" (ByVal pszServer As String, ByVal sLevel As Integer, ByVal pbBuffer As Long, ByVal cbBuffer As Integer, pcbTotalAvail As Integer) As Integer
Declare Function VLM_BufferToVBType Lib "VBLANMAN.DLL" Alias "BufferToVBType" (Dest As Any, ByVal DestLen As Integer, ByVal Src As Long, ByVal SrcLen As Integer, ByVal FormatString As String) As Integer
Declare Function VLM_CreateLMBuffer Lib "VBLANMAN.DLL" Alias "CreateLMBuffer" (ByVal FormatString As String, ByVal Entries As Integer, BufferSize As Integer) As Long
Declare Function VLM_FreeLMBuffer Lib "VBLANMAN.DLL" Alias "FreeLMBuffer" (ByVal BufferPointer As Long) As Integer
Function NET_GetWorkstationInfo (tServer As String, L10_Structure As L10_WKSTA, nErrorCode As Integer) As Integer
' Get information about the current workstation.
' Parameter values:
' tServer The name of the workstation we want to know about.
' If left blank, returns info about the local system.
' L10_Structure This is the structure that stores the information.
Dim lPointer As Long
Dim nGlobalSize As Integer
Dim nDataBytes As Integer
Dim nResult As Integer
' Set aside global memory to store the workstation information