Sha256: 567d586d05014f79b202f73cefb6396b91ce96c3cfb72ff9521e9b4c8f40379b
Contents?: true
Size: 499 Bytes
Versions: 7
Compression:
Stored size: 499 Bytes
Contents
require 'ffi' module EightThree extend FFI::Library ffi_lib 'kernel32' ffi_convention :stdcall =begin DWORD WINAPI GetShortPathName( __in LPCTSTR lpszLongPath, __out LPTSTR lpszShortPath, __in DWORD cchBuffer ); =end attach_function :path_to_8_3, :GetShortPathNameA, [:pointer, :pointer, :uint], :uint def self.convert_path_to_8_3 path out = FFI::MemoryPointer.new 256 # bytes path_to_8_3(path, out, out.length) out.get_string end end
Version data entries
7 entries across 7 versions & 1 rubygems