{
ULONG NextId, Size, Length, MaxLength;
PANSI_STRINGAnsiString;
va_list va;
va_start(va, Format);
ASSERT(IdBuffer->Count);
/* Choose the next static ANSI_STRING to use */
NextId = IdBuffer->Count - 1;
/* Max length is from the end of the buffer up until the current pointer */
MaxLength = (PCHAR)(IdBuffer + 1) - IdBuffer->CharBuffer;
/* Do the actual append, and return the length this string took */
Length = vsprintf(IdBuffer->CharBuffer - 1, Format, va);
ASSERT(Length < MaxLength);
/* Select the static ANSI_STRING, and update its length information */
AnsiString = &IdBuffer->Strings[NextId];
AnsiString->Length += Length;
AnsiString->MaximumLength += Length;
/* Calculate the final size of the string, in Unicode */
Size = RtlAnsiStringToUnicodeSize(AnsiString);
/* Update the buffer with the size, and update the character pointer */
IdBuffer->StringSize[NextId] = Size;
IdBuffer->TotalLength += Size;
IdBuffer->CharBuffer += Length;
/* Return the size */returnSize;
}
Generated on Sat May 26 2012 05:22:12 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.