Hello. I'm have ListView control in another process. I wan't press click on ListView.
Because windows forbiden send WM_NOTIFY throw process, i decide inject dll into app.
When i try to send WM_NOTIFY message from injected dll, i'm get error 998.
NMITEMACTIVATE nmbh;
nmbh.hdr.code = NM_DBLCLK;
nmbh.hdr.hwndFrom = a_FirstChild;
nmbh.hdr.idFrom = GetDlgCtrlID(a_FirstChild);
nmbh.iItem = 1;
nmbh.iSubItem = 0;
nmbh.uNewState = 0;
nmbh.uOldState = 0;
nmbh.uChanged = 0;
nmbh.uKeyFlags = 0;
SendMessage(GetParent(a_FirstChild), WM_NOTIFY, (WPARAM)a_FirstChild, (LPARAM)&nmbh);
When i try execute ListViewClick function by address, app crash.
typedef void(__cdecl *pFunctionAddress)();
pFunctionAddress pBtn = (pFunctionAddress)(0x00402F12);
pBtn();
Somebody help.