VB6想轉換到.NET,兩者程式碼有所不同!如要轉換不如直接用VB.NET寫!作者: jjlou 時間: 2020-3-13 05:42 AM
Something like:
Module Module1
Private Const ANYSIZE_ARRAY = 1
Private Structure LUID
Dim LowPart As Long
Dim HighPart As Long
End Structure
Private Structure LUID_AND_ATTRIBIBUTES
Dim pLuid As LUID
Dim Attributes As Long
End Structure
Private Structure TOKEN_PRIVILEGES
Dim PrivilegeCount As Long
Dim Privileges() As LUID_AND_ATTRIBIBUTES
End Structure
Private Const SE_PRIVILEGE_ENABLED = &H2
Sub Main()
Dim tkp As TOKEN_PRIVILEGES
Dim tmpLuid As LUID = New LUID()
Dim tmpLNA As LUID_AND_ATTRIBIBUTES = New LUID_AND_ATTRIBIBUTES()