Results 1 to 2 of 2

Thread: CREATE_NO_WINDOW and DETACHED_PROCESS flags aren't working correctly

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,096

    CREATE_NO_WINDOW and DETACHED_PROCESS flags aren't working correctly

    I'm using these flags in the STARTUPINFO structure to try to suppress the console spawning of a console program being run from my VB6 program by calling CreateProcess. There's no need for a user-interactive console in this case, as my program will provide all the needed pipes (StdIn, StdOut, and StdErr) in place of the normal console input and output, so it would make less clutter on the screen if unnecessary console didn't also spawn. I've tried both the CREATE_NO_WINDOW and DETACHED_PROCESS flags, separately and together, and the console ALWAYS spawns. Either these flags no longer work in the current version of Windows 10 (in which case the MS documentation on them needs to be updated) or else the program is detecting the lack of a console (due to these flags preventing the normal console from spawning) and then the console program is calling the AllocConsole function to create a new console, against my wishes. Whatever the case, I definitely want to hide the console for the purposes I'm using it for. Can somebody here maybe point me in the right direction for doing this?

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,096

    Re: CREATE_NO_WINDOW and DETACHED_PROCESS flags aren't working correctly

    I figured out that it actually was my own mistake. The CREATE_NO_WINDOW and DETACHED_PROCESS flags aren't actually used in the flags field of the STARTUPINFO structure. Instead they are actually used in the flags parameter of the CreateProcess function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width