# File lib/guid.rb, line 29 29: def lastErrorMessage 30: code = GetLastError.call 31: msg = "\0" * 1024 32: len = FormatMessageA.call(FORMAT_MESSAGE_IGNORE_INSERTS + 33: FORMAT_MESSAGE_FROM_SYSTEM, 0, 34: code, 0, msg, 1024, nil, nil, 35: nil, nil, nil, nil, nil, nil) 36: msg[0, len].tr("\r", '').chomp 37: end