{
PVOIDDestination;
SIZE_T StringLength;
ULONG Align;
/* Calculate the string length */if (IsUnicode)
{
/* Get the length in bytes and use WCHAR alignment */
StringLength = (wcslen((LPWSTR)String) + 1) * sizeof(WCHAR);
Align = sizeof(WCHAR);
}
else
{
/* Get the length in bytes and use CHAR alignment */
StringLength = strlen((LPSTR)String) + 1;
Align = sizeof(CHAR);
}
/* Now reserve the memory */
Destination = FlatBuf_Arg_Reserve(Position, FreeSize, StringLength, Align);
if (Destination)
{
/* We have space, do the copy */RtlCopyMemory(Destination, String, StringLength);
}
/* Return the pointer to the data */returnDestination;
}
Generated on Fri May 25 2012 06:01:27 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.