Write bytes in str
to the location pointed to by address
.
Clear the reference to the object this is pinning.
Returns true if the reference has been cleared, otherwise returns false.
Releases the lock held in the associated monitor and waits; reacquires the lock on wakeup.
If timeout
is given, this method returns after timeout
seconds passed, even if no other thread doesn’t signal.
Enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.
See EVP_CIPHER_CTX_set_padding for further information.
Convert path
string to a class
Emit a scalar with value
Called when a scalar value
is found. The scalar may have an anchor
, a tag
, be implicitly plain
or implicitly quoted
value
is the string value of the scalar anchor
is an associated anchor or nil tag
is an associated tag or nil plain
is a boolean value quoted
is a boolean value style
is an integer indicating the string style
See the constants in Psych::Nodes::Scalar
for the possible values of style
Here is a YAML
document that exercises most of the possible ways this method can be called:
--- - !str "foo" - &anchor fun - many lines - | many newlines
The above YAML
document contains a list with four strings. Here are the parameters sent to this method in the same order:
# value anchor tag plain quoted style ["foo", nil, "!str", false, false, 3 ] ["fun", "anchor", nil, true, false, 1 ] ["many lines", nil, nil, true, false, 1 ] ["many\nnewlines\n", nil, nil, false, true, 4 ]
Returns a Psych::Parser::Mark
object that contains line, column, and index information.
Emit a scalar with value
, anchor
, tag
, and a plain
or quoted
string type with style
.
Get the output style, canonical or not.
Set
the output style to canonical, or not.
Calls String#unpack
on sockopt.data.
sockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")) p sockopt.unpack("i") #=> [1] p sockopt.data.unpack("i") #=> [1]
Write data to a registry value named name. When name is nil, write to the ‘default’ value.
type is type value. (see Registry::Constants
module) Class
of data must be same as which read
method returns.
Write value to a registry value named name.
The value type is REG_SZ(write_s
), REG_DWORD(write_i
), or REG_BINARY(write_bin
).
Write value to a registry value named name.
The value type is REG_SZ(write_s
), REG_DWORD(write_i
), or REG_BINARY(write_bin
).
Returns help context.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE::Method.new(tobj, 'Add') puts method.helpcontext # => 65717
Returns helpcontext. If helpcontext is not found, then returns nil.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet') puts tobj.helpfile # => 131185
Returns array of WIN32OLE::Variable
objects which represent variables defined in OLE class.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') vars = tobj.variables vars.each do |v| puts "#{v.name} = #{v.value}" end The result of above sample script is follows: xlChart = -4109 xlDialogSheet = -4116 xlExcel4IntlMacroSheet = 4 xlExcel4MacroSheet = 3 xlWorksheet = -4167
Returns the type library file path.
tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library') puts tlib.path #-> 'C:\...\EXCEL9.OLB'
Returns the number which represents variable kind.
tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.name} #{variable.varkind}" end The result of above script is following: xlChart 2 xlDialogSheet 2 xlExcel4IntlMacroSheet 2 xlExcel4MacroSheet 2 xlWorksheet 2
Returns Ruby object wrapping OLE variant whose variant type is VT_ARRAY. The first argument should be Array
object which specifies dimensions and each size of dimensions of OLE array. The second argument specifies variant type of the element of OLE array.
The following create 2 dimensions OLE array. The first dimensions size is 3, and the second is 4.
ole_ary = WIN32OLE::Variant.array([3,4], VT_I4) ruby_ary = ole_ary.value # => [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]