|
-
July 19th, 2001, 05:23 AM
#1
Setting Information of NT user through VB
What's wrong with my code pls:
Private Sub com_Click()
Const RAS_MaxPhoneNumber = &H8
Private Type RAS_USER_0
Privilege As Long
szPhoneNumber(RAS_MaxPhoneNumber) As Byte
End Type
Dim strServer() As Byte
Dim username() As Byte
Dim RasUser_Struc As RAS_USER_0
strServer = StrConv(txtSer & Chr&(0),vbUnicode)
strUser = StrConv(txtUser & Chr&(0),vbUnicode)
RasUser_Struc.Privilege = &H8 Or &H1
res = RasAdminUserSetInfo(strServer(), username(), RasUser_Struc) ''''''''''''Gets an error of 1722
End Sub
cecile
The more u read, the more u do not know
-
July 19th, 2001, 05:48 AM
#2
Re: Setting Information of NT user through VB
When passing an array to an API you must pass a pointer to the first element of the array.
res = RasAdminUserSetInfo(strServer(0), username(0), RasUser_Struc)
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
July 19th, 2001, 05:52 AM
#3
Re: Setting Information of NT user through VB
I did this but still it wont work.
res = RasAdminUserSetInfo(strServer(), username(), RasUser_Struc
The more u read, the more u do not know
-
July 19th, 2001, 06:23 AM
#4
Re: Setting Information of NT user through VB
What platform are you running on, cause this function is only supported on WinNT 4.
If you are running WinNT4, please suplly the complete code (that is, the RasAdminUserSetInfo function isn't in the API viewer.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
July 19th, 2001, 06:38 AM
#5
Re: Setting Information of NT user through VB
I run in WinNT Server Ver 4.0. I didn't find it in rasapi32.dll but in rassapi.dll. I get it somewhere from Windows 98 OS.
cecile
The more u read, the more u do not know
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|