lib/win32/file/security/functions.rb in win32-file-security-1.0.1 vs lib/win32/file/security/functions.rb in win32-file-security-1.0.2
- old
+ new
@@ -17,42 +17,43 @@
# For convenience
typedef :pointer, :ptr
typedef :buffer_in, :buf_in
typedef :buffer_out, :buf_out
typedef :string, :str
+ typedef :ulong, :dword
+ typedef :uintptr_t, :handle
-
ffi_lib :advapi32
- attach_pfunc :AddAce, [:ptr, :ulong, :ulong, :ptr, :ulong], :bool
- attach_pfunc :AdjustTokenPrivileges, [:ulong, :bool, :ptr, :ulong, :ptr, :ptr], :bool
- attach_pfunc :CopySid, [:ulong, :ptr, :ptr], :bool
+ attach_pfunc :AddAce, [:ptr, :dword, :dword, :ptr, :dword], :bool
+ attach_pfunc :AdjustTokenPrivileges, [:handle, :bool, :ptr, :dword, :ptr, :ptr], :bool
+ attach_pfunc :CopySid, [:dword, :ptr, :ptr], :bool
attach_pfunc :EncryptFileW, [:buf_in], :bool
- attach_pfunc :DecryptFileW, [:buf_in, :ulong], :bool
+ attach_pfunc :DecryptFileW, [:buf_in, :dword], :bool
attach_pfunc :FileEncryptionStatusW, [:buf_in, :ptr], :bool
- attach_pfunc :GetAce, [:ptr, :ulong, :ptr], :bool
- attach_pfunc :GetFileSecurityW, [:buf_in, :ulong, :ptr, :ulong, :ptr], :bool
- attach_pfunc :GetLengthSid, [:ptr], :ulong
+ attach_pfunc :GetAce, [:ptr, :dword, :ptr], :bool
+ attach_pfunc :GetFileSecurityW, [:buf_in, :dword, :ptr, :dword, :ptr], :bool
+ attach_pfunc :GetLengthSid, [:ptr], :dword
attach_pfunc :GetSecurityDescriptorControl, [:ptr, :ptr, :ptr], :bool
attach_pfunc :GetSecurityDescriptorOwner, [:ptr, :ptr, :ptr], :bool
- attach_pfunc :GetSecurityDescriptorDacl, [:ptr, :ptr, :ptr, :ptr], :ulong
- attach_pfunc :GetSecurityInfo, [:ulong, :ulong, :ulong, :ptr, :ptr, :ptr, :ptr, :ptr], :ulong
- attach_pfunc :GetTokenInformation, [:ulong, :int, :ptr, :ulong, :ptr], :bool
- attach_pfunc :InitializeAcl, [:ptr, :ulong, :ulong], :bool
- attach_pfunc :InitializeSecurityDescriptor, [:ptr, :ulong], :bool
+ attach_pfunc :GetSecurityDescriptorDacl, [:ptr, :ptr, :ptr, :ptr], :bool
+ attach_pfunc :GetSecurityInfo, [:handle, :dword, :dword, :ptr, :ptr, :ptr, :ptr, :ptr], :dword
+ attach_pfunc :GetTokenInformation, [:handle, :int, :ptr, :dword, :ptr], :bool
+ attach_pfunc :InitializeAcl, [:ptr, :dword, :dword], :bool
+ attach_pfunc :InitializeSecurityDescriptor, [:ptr, :dword], :bool
attach_pfunc :LookupAccountNameW, [:buf_in, :buf_in, :ptr, :ptr, :ptr, :ptr, :ptr], :bool
attach_pfunc :LookupAccountSidW, [:buf_in, :ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :bool
attach_pfunc :LookupPrivilegeValueA, [:str, :str, :ptr], :bool
- attach_pfunc :OpenProcessToken, [:ulong, :ulong, :ptr], :bool
- attach_pfunc :SetFileSecurityW, [:buf_in, :ulong, :ptr], :bool
+ attach_pfunc :OpenProcessToken, [:handle, :dword, :ptr], :bool
+ attach_pfunc :SetFileSecurityW, [:buf_in, :dword, :ptr], :bool
attach_pfunc :SetSecurityDescriptorDacl, [:ptr, :bool, :ptr, :bool], :bool
attach_pfunc :SetSecurityDescriptorOwner, [:ptr, :ptr, :bool], :bool
ffi_lib :kernel32
- attach_pfunc :CloseHandle, [:ulong], :bool
- attach_pfunc :GetCurrentProcess, [], :ulong
- attach_pfunc :GetVolumeInformationW, [:buf_in, :buf_out, :ulong, :ptr, :ptr, :ptr, :buf_out, :ulong], :bool
+ attach_pfunc :CloseHandle, [:handle], :bool
+ attach_pfunc :GetCurrentProcess, [], :handle
+ attach_pfunc :GetVolumeInformationW, [:buf_in, :buf_out, :dword, :ptr, :ptr, :ptr, :buf_out, :dword], :bool
ffi_lib :shlwapi
attach_pfunc :PathStripToRootW, [:buf_in], :bool
attach_pfunc :PathIsRootW, [:buf_in], :bool