View Single Post
Old 12-11-2006, 11:52 PM
MerijnB MerijnB is offline
Senior Member
Join Date: Mar 2001
Posts: 452
Default RE: Get the param string of an exe

I know there are a few ways to achieve this, but it isn't easy though.

You can try to create a thread in the other process (CreateRemoteThread()). This won't work for the DOS programs, but then again, are you sure these aren't just console applications?. In this thread you can call GetCommandLine() from within the other application. Then you'll need to do some more calls to get the string into your application. I don't know if DEP will prevent you from doing this nowadays though.

Other way could be to make a hook, I don't know exactly how this works but afaik you should be able to get some info this way.

If you've read this post and have no idea what I'm saying, it might be a good idea to just drop it, because this isn't easy
Reply With Quote