Fixup DISPATCH_HEADER type_flags to its parts

This commit is contained in:
Dr. Chat 2015-06-12 19:47:28 -05:00
parent 4c9cab4346
commit f96657ef7c
3 changed files with 22 additions and 3 deletions

View File

@ -32,7 +32,7 @@ void XEvent::InitializeNative(void* native_ptr, X_DISPATCH_HEADER& header) {
assert_null(native_handle_);
bool manual_reset;
switch ((header.type_flags >> 24) & 0xFF) {
switch (header.type) {
case 0x00: // EventNotificationObject (manual reset)
manual_reset = true;
break;

View File

@ -198,7 +198,7 @@ object_ref<XObject> XObject::GetNativeObject(KernelState* kernel_state,
auto header = reinterpret_cast<X_DISPATCH_HEADER*>(native_ptr);
if (as_type == -1) {
as_type = (header->type_flags >> 24) & 0xFF;
as_type = header->type;
}
if (header->wait_list_blink & 0x1) {

View File

@ -29,7 +29,26 @@ class object_ref;
// http://www.nirsoft.net/kernel_struct/vista/DISPATCHER_HEADER.html
typedef struct {
xe::be<uint32_t> type_flags;
struct {
uint8_t type;
union {
uint8_t abandoned;
uint8_t absolute;
uint8_t npx_irql;
uint8_t signalling;
};
union {
uint8_t size;
uint8_t hand;
};
union {
uint8_t inserted;
uint8_t debug_active;
uint8_t dpc_active;
};
};
xe::be<uint32_t> signal_state;
xe::be<uint32_t> wait_list_flink;
xe::be<uint32_t> wait_list_blink;