I'm trying to get the pzsText and lParam variables out of a list view item.
When it reaches the failing line, the debugger shows the following message:Code://declaration of LVITEM struct LVITEM lvit; ZeroMemory(&lvit, sizeof(lvit)); lvit.mask=LVIF_TEXT|LVIF_PARAM; //I want to get the text and lParam of the item lvit.iSubItem=2; //from the 3rd column lvit.cchTextMax=20; lvit.pszText=""; for(int iteration=0; iteration<atoi(iterations); iteration++) { for(int i=0; i<ListView_GetItemCount(hwnd_ListView); i++) { lvit.iItem=i; //item ListView_GetItem(hwnd_ListView, &lvit); //This line fails } }
Unhandled exception at 0x7c80a268 in PDS.exe: 0xC0000005: Access violation writing location 0x00448e16.
I couldn't find a function which directly gets lParam, so I tried with ListView_GetItem()
I'm really stuck here, thanks for any help.