Sha256: 938fb7ab33807f6dcc990fd24a02dd4b11b800f08bd20510e7c9998bd3549196
Contents?: true
Size: 773 Bytes
Versions: 28
Compression:
Stored size: 773 Bytes
Contents
# -*- coding: utf-8 -*- # # Copyright 2013 whiteleaf. All rights reserved. # module WinAPI begin require "fiddle/import" extend Fiddle::Importer rescue LoadError # Fiddle がない環境用(http://www.artonx.org/data/asr/ の1.9.3とか) require "dl/import" extend DL::Importer end class InvalidOS < StandardError; end begin dlload "kernel32" extern "long GetLogicalDriveStrings(long, void*)" extern "unsigned long SetConsoleTextAttribute(unsigned long, unsigned long)" extern "unsigned long GetConsoleScreenBufferInfo(unsigned long, void*)" extern "unsigned long GetStdHandle(unsigned long)" extern "long GetLastError()" rescue DL::DLError raise InvalidOS, "not Windows" end end
Version data entries
28 entries across 28 versions & 1 rubygems