XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
437 stars 66 forks source link

xboxkrnl: add OBJECT_HEADER structure #634

Closed RadWolfie closed 1 year ago

RadWolfie commented 1 year ago

Missing addition of OBJECT_HEADER in nxdk repo will allow me to prepare upload xbox_object_directory_list project on GitHub. Having access to OBJECT_HEADER allow me access to pointer of Type member variable to determine which type of object it is.

RadWolfie commented 1 year ago

If looking for simpler way to test this. You can use ObOpenObjectByName for \\??\\D: path to obtain handle. Then call ObReferenceObjectByHandle to obtain object. With the object obtained you can use OBJECT_TO_OBJECT_HEADER and test Type pointer, or PoolTag from Type pointer, is the same as ObSymbolicLinkObjectType, or bmyS for PoolTag.

Ryzee119 commented 1 year ago

If looking for simpler way to test this. You can use ObOpenObjectByName for \\??\\D: path to obtain handle. Then call ObReferenceObjectByHandle to obtain object. With the object obtained you can use OBJECT_TO_OBJECT_HEADER and test Type pointer, or PoolTag from Type pointer, is the same as ObSymbolicLinkObjectType, or bmyS for PoolTag.

Took me a while to decrpyt this test example but worked as expected. Thanks