Jump to content
  • Advertisement
Sign in to follow this  
Reidu

CreateProcess giving error code 998

This topic is 4863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all you Win32-ers out there... Can anybody tell me what could be causing CreateProcess to fail with the ERROR_NOACCESS error (error 998)? I can't seem to find any documentation on this, beyond the unhelpful "Invalid access to memory location." that MSDN provides. Edit: oh, I should mention that I'm calling it like so: CreateProcess(NULL, arg_str, NULL, NULL, FALSE, 0, NULL, NULL, &comp_si, &comp_pi); arg_str is a valid command line (with a ton of arguments), and comp_si and comp_pi are empty STARTUPINFO and PROCESS_INFORMATION structures, respectively. - Reid

Share this post


Link to post
Share on other sites
Advertisement
Could you provide the relevant code from your application? Chances are, your parameters are incorrect. Are you perhaps passing in a function pointer to a non-static class member?

Share this post


Link to post
Share on other sites
Off the top of my head: a pointer passed to CreateProcess() was borked, one of the structures wasn't zeroed properly or had an invalid value such as a negative size entry or a dwFlags entry specified an option that wasn't actually utilized in a structure.

Share this post


Link to post
Share on other sites
initial post modified.

I'm definitely not passing any function pointers around...how could I even pass one to CreateProcess?

Share this post


Link to post
Share on other sites
When you say empty, did you remember to set the cb member of the STARTUPINFO structure?

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
When you say empty, did you remember to set the cb member of the STARTUPINFO structure?


err, no, I just used memset to zero out the whole structure. But it looks like just setting the cb member doesn't work either. What else am I supposed to initialise? CreateProcess has worked fine for me before when I just pass it an "empty" STARTUPINFO structurre (and by empty, I mean zeros).

BTW, thanks everyone for the ultra-zippy responses. This is amazing.

- Reid

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!