While implementing service tag support in advapi32 I felt on something really weird.
I set service tag that way:
Then, in advapi32_apitest, I read it that way:
The test works fine in W2K3 SP2, but fails in ReactOS, in spite of my code properly setting it.
Reversing both advapi32 and advapi32_apitest built with GCC Lin shows that:
Either we have a major build issue, or, we rather have a TEB definition issue.
Whatever the reason, advapi32_apitest is right. SubProcessTag is at offset 0xf64, hence the fact the test works on W2K3 SP2.