#include <windows.h>
#include <stdio.h>
int __cdecl wmain(int argc, wchar_t* pArgs[])
{
BYTE* pAlloc1 = NULL;
char str[] = "Hello Heap!";
HANDLE hProcessHeap = GetProcessHeap();
pAlloc1 = (BYTE*)HeapAlloc(hProcessHeap, 0, 20);
strcpy_s((char *)pAlloc1,strlen(str)+1,str);
HeapFree(hProcessHeap, 0, pAlloc1);
return 0;
}
I2luY2x1ZGUgPHdpbmRvd3MuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgX19jZGVjbCB3bWFpbihpbnQgYXJnYywgd2NoYXJfdCogcEFyZ3NbXSkKewoJQllURSogcEFsbG9jMSA9IE5VTEw7CgljaGFyIHN0cltdID0gIkhlbGxvIEhlYXAhIjsKCUhBTkRMRSBoUHJvY2Vzc0hlYXAgPSBHZXRQcm9jZXNzSGVhcCgpOwoJcEFsbG9jMSA9IChCWVRFKilIZWFwQWxsb2MoaFByb2Nlc3NIZWFwLCAwLCAyMCk7CiAgICBzdHJjcHlfcygoY2hhciAqKXBBbGxvYzEsc3RybGVuKHN0cikrMSxzdHIpOwoJSGVhcEZyZWUoaFByb2Nlc3NIZWFwLCAwLCBwQWxsb2MxKTsKCXJldHVybiAwOwp9Cg==