lib/win32/security/sid.rb in win32-security-0.4.1 vs lib/win32/security/sid.rb in win32-security-0.5.0

- old
+ new

@@ -12,11 +12,11 @@ include Windows::Security::Functions include Windows::Security::Structs extend Windows::Security::Functions # The version of the Win32::Security::SID class. - VERSION = '0.2.4' + VERSION = '0.2.5' # Some constant SID's for your convenience, in string format. # See http://support.microsoft.com/kb/243330 for details. Null = 'S-1-0' @@ -250,11 +250,11 @@ end elsif ordinal_val < 10 # Assume it's a binary SID. account_ptr = FFI::MemoryPointer.from_string(account) bool = LookupAccountSid( - host.encode('UTF-16LE'), + host.wincode, account_ptr, sid, sid_size, domain, domain_size, @@ -266,11 +266,11 @@ end account_ptr.free else bool = LookupAccountName( - host.encode('UTF-16LE'), - account.encode('UTF-16LE'), + host.wincode, + account.wincode, sid, sid_size, domain, domain_size, use_ptr