模組 Win32

實作 Win32 SSPI 函式的繫結,專注於透過 HTTP 對代理伺服器進行驗證。

常數

LOCALE
WCHAR

Win32 Registry

win32/registry 是 Win32 平台的登錄檔存取器函式庫。它使用匯入器來呼叫 Win32 Registry API。

範例

Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg|
  value = reg['foo']                               # read a value
  value = reg['foo', Win32::Registry::REG_SZ]      # read a value with type
  type, value = reg.read('foo')                    # read a value
  reg['foo'] = 'bar'                               # write a value
  reg['foo', Win32::Registry::REG_SZ] = 'bar'      # write a value with type
  reg.write('foo', Win32::Registry::REG_SZ, 'bar') # write a value

  reg.each_value { |name, type, data| ... }        # Enumerate values
  reg.each_key { |key, wtime| ... }                # Enumerate subkeys

  reg.delete_value(name)                         # Delete a value
  reg.delete_key(name)                           # Delete a subkey
  reg.delete_key(name, true)                     # Delete a subkey recursively
end

參考

Win32::Registry 類別

WCHAR_CR
WCHAR_NUL
WCHAR_SIZE