Create CharStringToWCharString.cpp

This commit is contained in:
vxunderground
2022-07-14 22:14:46 -05:00
committed by GitHub
parent eff6c46a90
commit 9f2931c7bb
@@ -0,0 +1,12 @@
SIZE_T CharStringToWCharString(PWCHAR Destination, PCHAR Source, SIZE_T MaximumAllowed)
{
INT Length = (INT)MaximumAllowed;
while (--Length >= 0)
{
if (!(*Destination++ = *Source++))
return MaximumAllowed - Length - 1;
}
return MaximumAllowed - Length;
}