#include #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND WindowsMediaPlayer = FindWindow(NULL,"Windows Media Player"); if(!WindowsMediaPlayer) { MessageBox(NULL,"Error!","Windows Media Player not found!",MB_ICONEXCLAMATION); return 0; } HWND WMPAppHost = FindWindowEx(WindowsMediaPlayer,NULL,"WMPAppHost",NULL); if(!WMPAppHost) { MessageBox(NULL,"Error!","Control not found!",MB_ICONEXCLAMATION); return 0; } HWND SkinHost = FindWindowEx(WMPAppHost,NULL,"WMP Skin Host",NULL); if(!SkinHost) { MessageBox(NULL,"Error!","Skin Host not found!",MB_ICONEXCLAMATION); return 0; } HWND irw = FindWindowEx(SkinHost,NULL,NULL,"LibraryContainer"); if(!irw) { MessageBox(NULL,"Error!","Library Container not found!",MB_ICONEXCLAMATION); return 0; } HWND oi = FindWindowEx(irw,NULL,NULL,"BasketListView"); // Setting up STRUCTURE char buffer[256]; LVITEM what; what.iItem = 0; what.mask = LVIF_TEXT; what.pszText = &buffer; what.cchTextMax = 256; LVITEM FAR* pitem; pitem = &what; int a = ListView_GetItem(oi,pitem); // RETURNS 0 , SHOULD RETURN 1[SUCCESS] BUT HELL NO WHYYYY printf("%d",a); return 0; }