G
Guest
Hi all,
in VB.NET i want to enumerate the list of users with a special userright. So
i want try to use the LsaEnumerateAccountWithUserRight.
When i try to open a policy handle i return a nullreference error and i
don't know why?
here is my code:
Private Declare Function LsaOpenPolicy Lib "ADVAPI32.dll" ( _
ByVal SystemName As String, _
ByVal ObjectAttributes As
LSA_Object_Attributes, _
ByVal AccessMask As Integer, _
ByRef Handle As IntPtr _
) As Long
Public Function OpenHandle() As IntPtr
Dim Handle As IntPtr
Dim Ret As Long
Ret = LsaOpenPolicy("", Nothing, &HFFFF, Handle)
Return Handle
End Function
in VB.NET i want to enumerate the list of users with a special userright. So
i want try to use the LsaEnumerateAccountWithUserRight.
When i try to open a policy handle i return a nullreference error and i
don't know why?
here is my code:
Private Declare Function LsaOpenPolicy Lib "ADVAPI32.dll" ( _
ByVal SystemName As String, _
ByVal ObjectAttributes As
LSA_Object_Attributes, _
ByVal AccessMask As Integer, _
ByRef Handle As IntPtr _
) As Long
Public Function OpenHandle() As IntPtr
Dim Handle As IntPtr
Dim Ret As Long
Ret = LsaOpenPolicy("", Nothing, &HFFFF, Handle)
Return Handle
End Function