|
-
Sep 27th, 2000, 01:58 AM
#1
Thread Starter
New Member
Im trying to obtain the domain Sid from the PDC with use of the NetUserModalsGet API call (at level 2).
The resulting SID should be in the USER_MODALS_INFO_2
structure, but there seems to be impossible to get any relevant data out of it.
The return value from NetUserModalsGet indicate success.
I have tried to pass the structure to and from a byte array with no succes.
============================================================
Private Declare Function NetUserModalsGet Lib "netapi32.dll" _
(ByVal servername As Long, _
ByVal level As Long, _
ByVal BufPtr As Long) As Long
Private Type USER_MODALS_INFO_2
usrmod2_domain_name As Long
usrmod2_domain_id As Long
End Type
'--------------
Dim udtUsrInfo as USER_MODALS_INFO_2
Dim bytUsrInfo() as byte
Dim lngUsrInfoPtr as Long
ReDim bytUsrInfo(0 To Len(udtUsrInfo))
Call CopyMemory(bytUsrInfo(0), udtUsrInfo, Len(udtUsrInfo))
lngUsrInfoPtr = VarPtr(bytUsrInfo(0))
lngResult = NetUserModalsGet(lngPDCptr, lngLevel, lngUsrInfoPtr)
Call CopyMemory(udtUsrInfo, bytUsrInfo(0), Len(udtUsrInfo))
============================================================
(the above is not the complete code)
Any help would be appreciated.
/Bob
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
|