I want to extract the details of a particular user
who has an account in 2000 Server.I used the
API NetUserGetInfo. I called the API in a command click .
But it is not working.The code is as below


Public Type USER_INFO_3
usri3_name As Long
usri3_password As Long
usri3_password_age As Long
usri3_priv As Long
usri3_home_dir As Long
usri3_comment As Long
usri3_flags As Long
usri3_script_path As Long
usri3_auth_flags As Long
usri3_full_name As Long
usri3_usr_comment As Long
usri3_parms As Long
usri3_workstations As Long
usri3_last_logon As Long
usri3_last_logoff As Long
usri3_acct_expires As Long
usri3_max_storage As Long
usri3_units_per_week As Long
usri3_logon_hours As Long
usri3_bad_pw_count As Long
usri3_num_logons As Long
usri3_logon_server As Long
usri3_country_code As Long
usri3_code_page As Long
usri3_user_id As Long
usri3_primary_group_id As Long
usri3_profile As Long
usri3_home_dir_drive As Long
usri3_password_expired As Long
End Type

Public Declare Function NetUserGetInfo Lib "Netapi32.dll" ( _
strServerName As Any, strUserName As Any, ByVal dwLevel As Long, _
pBuffer As Long) As Long

Private Sub Command4_Click()
Dim pUser As String
Dim pServer As String

Dim dwLevel As Long
dwLevel = 3
Dim tmpBuffer As USER_INFO_3
Dim ptmpBuffer As Long
NetUserGetInfo pServer, pUser, dwLevel, tmpBuffer

MsgBox tmpBuffer.usri3_full_name
End Sub