CheckTokenMembership in VB6 - Crashing on FreeSID on Windows 7 and Windows 2008

后端 未结 1 1667
栀梦
栀梦 2020-12-22 10:41

I am using the CheckTokenMembership Windows API to check if the user is an Administrator.

Here\'s the code:

Option Explicit

Private Const SECURITY_B         


        
相关标签:
1条回答
  • 2020-12-22 11:31

    Separate pvIsAdmin in a completely separate module and copy function declarations verbatim from the snippet. In AllocateAndInitializeSid lpPSid is ByRef. In FreeSid param is ByVal.

    0 讨论(0)
提交回复
热议问题