flat assembler
Message board for the users of flat assembler.
Index
> Windows > IO_STACK_LOCATION structure definition |
Author |
|
AsmGuru62 11 Sep 2012, 01:43
Union contains structures.
Simply make each structure definition OUTSIDE of the IO_STACK_LOCATION. Then find out the largest size of these structures in the union. Then add room for that many bytes instead of that union. That should do it (in theory). |
|||
11 Sep 2012, 01:43 |
|
typedef 11 Sep 2012, 01:52
AsmGuru62 wrote: Union contains structures. Give him an example perhaps. |
|||
11 Sep 2012, 01:52 |
|
marcinzabrze12 11 Sep 2012, 05:12
In this case something like that:
Code: name_of_structure.structure_in_union.field_1 |
|||
11 Sep 2012, 05:12 |
|
typedef 11 Sep 2012, 05:31
Yes, because the memory will be big enough for all the structures contained therein.
Consider this Code: struct a { x, y, z}; // 3 bytes struct b { x, y} // 2 bytes union structs { a A; b B; } The size of the union will be equal to that of structure a, since it is the largest. Basically you can access up to 3 bytes in that union because the storage is the same. After all, that's the maximum of how much you wanted. Your structures just tell the System how many bytes to read from the same storage/memory. Read this: http://tigcc.ticalc.org/doc/keywords.html#union |
|||
11 Sep 2012, 05:31 |
|
marcinzabrze12 11 Sep 2012, 05:54
Yes it's obvious for me. So before I begin read MSDN describ of structures i simply run calc.exe ...
------------------------------------------------------------------------------------- Edit: one more question - Look at MSDN definition of IRP structure. First two fields is a simply dot. Code: typedef struct _IRP { . . PMDL MdlAddress; ; ... rest of structure } Where is writed that it's means: Code: struct IRP Type dw ? Size dw ? MdlAddress dd ? ; ... rest of structure ends |
|||
11 Sep 2012, 05:54 |
|
typedef 11 Sep 2012, 09:26
Can you post the link to the MSDN page you are referring to?
|
|||
11 Sep 2012, 09:26 |
|
marcinzabrze12 11 Sep 2012, 14:18
|
|||
11 Sep 2012, 14:18 |
|
revolution 11 Sep 2012, 14:25
The dots represent obscured data fields. MS does not publish the information stored in those hidden fields.
The number of dots does not correlate with anything except to show one or more hidden fields of unknown size. You will have to see the Wdm.h file in the DDK/SDK to determine the offsets of the published fields. |
|||
11 Sep 2012, 14:25 |
|
marcinzabrze12 11 Sep 2012, 14:33
Quote: You will have to see the Wdm.h file in the DDK/SDK to determine the offsets of the published fields. Thanx Revolution now its more clear for me. Everywhere C++ |
|||
11 Sep 2012, 14:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.