|
-
July 13th, 2001, 04:38 AM
#1
Error: ByRef Type Mismatch
What's wrong with my code. It has an error ByRef
Type Mismatch.
dim Servername() As Byte
dim grpusr as USER_INFO_2
dim user() As Byte
Dim num_entries As Long
Dim res
Dim h AS Long
Private Type GROUP_USERS_INFO_0
grui0_name As String
End Type
Private Declare Function NetUserSetGroups Lib "netapi32" _
(servername As Byte, _
username As Byte, _
ByVal level As Long, _
lpBuffer As Long, _
num_entries As Long) As Long
h = 0
grpusr.grui0_name = StrConv("Users" & Chr$(0), vbUnicode)
res = NetUserSetGroups(bServername(0), user(0), ByVal h, grpusr, num_entries) '-----This line gets an error
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
|