Call the free function for this pointer. Calling more than once will do nothing. Does nothing if there is no free function attached.
Read a REG_SZ or REG_EXPAND_SZ registry value named name.
If the value type is REG_EXPAND_SZ, environment variables are replaced. Unless the value type is REG_SZ or REG_EXPAND_SZ, TypeError
is raised.
Read a REG_SZ(read_s
), REG_DWORD(read_i
), or REG_BINARY(read_bin
) registry value named name.
If the values type does not match, TypeError
is raised.
removes the callback of event.
ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE::Event.new(ie) ev.on_event('BeforeNavigate2') {|*args| args.last[6] = true } # ... ev.off_event('BeforeNavigate2') # ...
Returns string of return value type of method.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE::Method.new(tobj, 'Add') puts method.return_type # => Workbook
Returns number of return value type of method.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE::Method.new(tobj, 'Add') puts method.return_vtype # => 26
Returns event interface name if the method is event.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE::Method.new(tobj, 'SheetActivate') puts method.event_interface # => WorkbookEvents
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"
Returns true
if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
Same as executable?
, but tests using the real owner of the process.