Page 1 of 1

PARSECMDLINESENDW crash

Posted: Wed Aug 07, 2019 6:44 am
by Diamen
Why this code crash?

Code: Select all

typedef struct {
	const wchar_t* pCmdLine;
	const wchar_t* pWorkDir;
} PARSECMDLINESENDW;
PARSECMDLINESENDW pcls;
pcls.pCmdLine = L"/Exec(\"calc.exe\")";
pcls.pWorkDir = L"";
SendMessage(FindWindow("AkelPad4", NULL), WM_USER + 125, 0, (LPARAM)& pcls);

Posted: Mon Nov 11, 2019 4:05 pm
by Instructor
Diamen
You will get crash if you call PARSECMDLINESENDW not inside AkelPad.exe process. Because any process can't access other process memory directly (&pcls pointer). You can send WM_COPYDATA with CD_PARSECMDLINEW, see AkelDLL.h.