method

new

ruby latest stable - Class: Win32::Registry::Error

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

new(code)
public

No documentation available.

# File ext/dl/win32/lib/win32/registry.rb, line 168
      def initialize(code)
        @code = code
        msg = "\00"".force_encoding(Encoding::ASCII_8BIT) * 1024
        len = FormatMessageA.call(0x1200, 0, code, 0, msg, 1024, 0)
        msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap))
        super msg.tr("\r", '').chomp
      end