Collection of methods that call the Windows API’s file Unicode functions.
Returns an WIN32_FIND_DATA object on success or nil on failure.
# File WinEx.rb, line 223 def self.get_file_data(file_name) # Declare API calls findFirstFile = Win32API.new('Kernel32','FindFirstFileW',['P','P'], 'I') findClose = Win32API.new('Kernel32','FindClose',['I'], 'I') # Reserve memory for the WIN32_FIND_DATA struct win32_find_data = WinEx::Struct::WIN32_FIND_DATA.new() # Make the calls - remember to close handle = findFirstFile.call(file_name, win32_find_data) bool = findClose.call(handle) # Return the data return nil if (handle == WinEx::INVALID_HANDLE_VALUE) return win32_find_data end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.