mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[CSRLIB] Add comments regarding the calculation of the data and total message lengths in CsrClientCallServer().
This commit is contained in:
parent
8cd01eaf25
commit
141daf4de8
1 changed files with 6 additions and 3 deletions
|
@ -386,10 +386,13 @@ CsrClientCallServer(
|
|||
|
||||
/* Fill out the Port Message Header */
|
||||
ApiMessage->Header.u2.ZeroInit = 0;
|
||||
ApiMessage->Header.u1.s1.TotalLength = (CSHORT)DataLength +
|
||||
sizeof(CSR_API_MESSAGE) - sizeof(ApiMessage->Data); // FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
|
||||
/* DataLength = user_data_size + anything between
|
||||
* header and data, including intermediate padding */
|
||||
ApiMessage->Header.u1.s1.DataLength = (CSHORT)DataLength +
|
||||
FIELD_OFFSET(CSR_API_MESSAGE, Data) - sizeof(ApiMessage->Header); // ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
|
||||
FIELD_OFFSET(CSR_API_MESSAGE, Data) - sizeof(ApiMessage->Header);
|
||||
/* TotalLength = header_size + DataLength + any structure trailing padding */
|
||||
ApiMessage->Header.u1.s1.TotalLength = (CSHORT)DataLength +
|
||||
sizeof(CSR_API_MESSAGE) - sizeof(ApiMessage->Data);
|
||||
|
||||
/* Fill out the CSR Header */
|
||||
ApiMessage->ApiNumber = ApiNumber;
|
||||
|
|
Loading…
Reference in a new issue