StringCopy
#include <Windows.h>
PWCHAR StringCopyW(_Inout_ PWCHAR String1, _In_ LPCWSTR String2)
{
PWCHAR p = String1;
while ((*p++ = *String2++) != 0);
return String1;
}
INT main(VOID)
{
WCHAR StringExample[256] = L"Hash This String";
WCHAR EmptyBuffer[256] = { 0 };
//copy stringexample into emptybuffer
StringCopyW(EmptyBuffer, StringExample);
return ERROR_SUCCESS;
}Last updated