I did HANDLE hHeap = GetProcessHeap(); which gives me the handle to the heap of the process then i did
DWORD dsize = 468178553;
(near pointer)PBYTE pBuffer = (LPBYTE)HeapAlloc(hHeap, 0, size);
but here i got pBuffer as NULL and then i did
_stprintf( (TCHAR*)pBuffer,"", , ,);
here my program crashes.............may be its bcoz the heap memory is less than
dsize(468178553)................how to solve this.........do i need to use a far pointer(LPBYTE).....plz help..
risa 0 Light Poster
vijayan121 1,152 Posting Virtuoso
risa 0 Light Poster
risa 0 Light Poster
vijayan121 1,152 Posting Virtuoso
mitrmkar 1,056 Posting Virtuoso
risa 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.