Found Api's Causing Heap Corruption
-
These lines in My DrawItem Api are causing the heap corruption
if(arrayptr[pdi->itemID] == NULL)
arrayptr[pdi->itemID] = new char(9);
memset(arrayptr[pdi->itemID], 0x00, 9);
memcpy(arrayptr[pdi->itemID], lpszText, 8);Don't understand it as I allocated everything on the Heap
-
These lines in My DrawItem Api are causing the heap corruption
if(arrayptr[pdi->itemID] == NULL)
arrayptr[pdi->itemID] = new char(9);
memset(arrayptr[pdi->itemID], 0x00, 9);
memcpy(arrayptr[pdi->itemID], lpszText, 8);Don't understand it as I allocated everything on the Heap
-
Quote:
arrayptr[pdi->itemID] = new char(9);
Should be
arrayptr[pdi->itemID] = new char[9];
-
Quote:
arrayptr[pdi->itemID] = new char(9);
Should be
arrayptr[pdi->itemID] = new char[9];
-
Quote:
arrayptr[pdi->itemID] = new char(9);
Should be
arrayptr[pdi->itemID] = new char[9];