本文簡要介紹ruby語言中 Win32::Registry.read
的用法。
用法
read(name, *rtype)
讀取名為 name 的注冊表值並返回 [ type, data ] 數組。當 name 為 nil 時,讀取 ‘default’ 值。類型是值類型。 (見 Win32::Registry::Constants
模塊)數據是值數據,它的類是::REG_SZ, REG_EXPAND_SZ
String
:REG_MULTI_SZ
Array of String
:REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD
Integer
:REG_BINARY, REG_NONE
String (contains binary data)
指定 rtype 時,值類型必須包含在 rtype 數組中,否則會引發 TypeError
。
相關用法
- Ruby Registry.info用法及代碼示例
- Ruby Registry.[]=用法及代碼示例
- Ruby Regexp named_captures()用法及代碼示例
- Ruby Regexp to_s()用法及代碼示例
- Ruby Regexp.eql?用法及代碼示例
- Ruby Regexp hash()用法及代碼示例
- Ruby Regexp.fixed_encoding?用法及代碼示例
- Ruby Regexp類用法及代碼示例
- Ruby Regexp.options用法及代碼示例
- Ruby Regexp inspect()用法及代碼示例
- Ruby Regexp.inspect用法及代碼示例
- Ruby Regexp.names用法及代碼示例
- Ruby Regexp source()用法及代碼示例
- Ruby Regexp match()用法及代碼示例
- Ruby Regexp.rxp =~ str用法及代碼示例
- Ruby Regexp.escape用法及代碼示例
- Ruby Regexp.casefold?用法及代碼示例
- Ruby Regexp.match用法及代碼示例
- Ruby Regexp.try_convert用法及代碼示例
- Ruby Regexp encoding()用法及代碼示例
- Ruby Regexp fixed_encoding?()用法及代碼示例
- Ruby Regexp escape()用法及代碼示例
- Ruby Regexp names()用法及代碼示例
- Ruby Regexp new()用法及代碼示例
- Ruby Regexp.rxp ===用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 Registry.read。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。