X_UNICODE_STRING

This commit is contained in:
Dr. Chat 2015-06-27 22:39:11 -05:00
parent 169cb65d96
commit cdbf736241
1 changed files with 22 additions and 0 deletions

View File

@ -288,6 +288,28 @@ struct X_ANSI_STRING {
} }
}; };
struct X_UNICODE_STRING {
xe::be<uint16_t> length;
xe::be<uint16_t> maximum_length;
xe::be<uint32_t> 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<const wchar_t*>(membase + pointer),
length);
}
};
static_assert_size(X_UNICODE_STRING, 8);
// http://pastebin.com/SMypYikG // http://pastebin.com/SMypYikG
typedef uint32_t XNotificationID; typedef uint32_t XNotificationID;