LISTING 1: NetAPI Function Declarations '* Declare the NetAPI functions Declare Function NetUserGetInfo Lib "netapi32.dll" _ (btServerName As Byte, btUserName As Byte, ByVal lgLevel As Long, _ lgBufferPtr As Long) As Long Declare Function NetGetDCName Lib "netapi32.dll" (btServerName As Byte, _ btDomainName As Byte, lgDCNPtr As Long) As Long Declare Function NetUserAdd Lib "netapi32.dll" _ (btServerName As Byte, ByVal lgLevel As Long, anBuffer As Any, lgParmError _ As Long) As Long Declare Function NetAPIBufferFree Lib "netapi32.dll" Alias _ "NetApiBufferFree" (ByVal lgPtr As Long) As Long Declare Function NetAPIBufferAllocate Lib "netapi32.dll" Alias _ "NetApiBufferAllocate" (ByVal lgByteCount As Long, lgPtr As Long) As Long Declare Function PtrToStr Lib "Kernel32" Alias "lstrcpyW" _ (btRetVal As Byte, ByVal lgPtr As Long) As Long Declare Function StrToPtr Lib "Kernel32" Alias "lstrcpyW" _ (ByVal lgPtr As Long, btSource As Byte) As Long