Code: Select all
BOOL GetProcessCommandLine (DWORD dwProcessId, LPTSTR pCmdLine, size_t len);
I am implementing this using madCodeHook to inject a DLL which simply calls GetCommandLine() in the context of the injected process, then uses madCodeHook's SendIpcMessage() to send it to the injector.
The problem is that madCode won't inject into a 16-bit app, including DOS boxes on Win9x. To workaround this, does anyone know how to implement GetProcessCommandLine() in a different way? It doesn't have to use madCodeHook, but I can't figure out how to do it without injection.
Thanks,
David