diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 8479c307e..66ed575f7 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -288,6 +288,28 @@ struct X_ANSI_STRING { } }; +struct X_UNICODE_STRING { + xe::be length; + xe::be maximum_length; + xe::be pointer; + + void reset() { + length = 0; + maximum_length = 0; + pointer = 0; + } + + std::wstring to_string(uint8_t* membase) const { + if (!length) { + return L""; + } + + return std::wstring(reinterpret_cast(membase + pointer), + length); + } +}; +static_assert_size(X_UNICODE_STRING, 8); + // http://pastebin.com/SMypYikG typedef uint32_t XNotificationID;