HI I tried CreateProcessEx on a 32 bit Windows 7, it fails with GetLastError() 123(ERROR_INVALID_NAME). Any suggestions as to why this could be? Thanks
Does the same thing happen with the regular Win32 API CreateProcessA/W? Obviously, you wouldn't append the extra DLL name parameter. That error code is usually a result of needing to relocate param 1 (ApplicationName) to param 2 (Commandline), make sure to set param 1 to NULL if you end up using param 2. If you're still getting the error please post your call parameters so we can see them
Thanks, I tried that but same error. It's a createProcessW callback, and the same parameters that were there for CreateProcessW are passed into CreateProcessExW along with the extra dll. Funny thing is it works for a 64 bit OS opening a 32 bit process, so I know the callback code, and what I'm injecting works there. Is there an environment related issue, that might be interfering? (GetLastError() 123)?
Thanks for replying. Hmmm, can you upload a sample project or show code? I’ll test before the weekend and try to reproduce, but it may be hard, depending on the params etc. Will try however
One last quick check, does this happen with CreateProcessExA() ? The cmdline is very different here, believe it or not, and it’s mentioned on MSDN. Basically, you shouldn’t use a literal/const string, but a buffer for the commandline arg
P.S: We really can help more with a code sample, otherwise we are reduced to *guess*work