Create Process parameters

I am using CreateProcess to call a 16-Bit application and will need a number of instances of this code to run simultaneously.   For this reason, I need to start each instance in it's own memory space - so need to use the CREATE_SEPARATE_WOW_VDM parameter.   My problem is that I do not know how to declare this constant in Visual Basic.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


You can also start programs in their seperate space by doing:

shell "start /SEPARATE <filename>"

markboltonAuthor Commented:
Thanks for that.   Unfortunately neither method seems to be helping me.

Using the shell "start..." just returns a runtime error 53 - File not found, although it does work fine running it from DOS.

I'll try a bit more with the createprocess parameters - is there somewhere that I can find a complete list of all these constant settings??


Read the following microsoft articles:

INFO: Running a Windows-Based Application in its Own VDM 

The only place CREATE_SEPARATE_WOW_VDM is defined is in the C Header file "Winbase.h".

I am including an excerpt from this file...


*                                                                       *
*   winbase.h -- This module defines the 32-Bit Windows Base APIs       *
*                                                                       *
*   Copyright (c) 1990-1995, Microsoft Corp. All rights reserved.       *
*                                                                       *
// dwCreationFlag values

#define DEBUG_PROCESS               0x00000001
#define DEBUG_ONLY_THIS_PROCESS     0x00000002

#define CREATE_SUSPENDED            0x00000004

#define DETACHED_PROCESS            0x00000008

#define CREATE_NEW_CONSOLE          0x00000010

#define NORMAL_PRIORITY_CLASS       0x00000020
#define IDLE_PRIORITY_CLASS         0x00000040
#define HIGH_PRIORITY_CLASS         0x00000080
#define REALTIME_PRIORITY_CLASS     0x00000100

#define CREATE_NEW_PROCESS_GROUP    0x00000200

#define CREATE_SEPARATE_WOW_VDM     0x00000800
#define CREATE_SHARED_WOW_VDM       0x00001000

#define CREATE_DEFAULT_ERROR_MODE   0x04000000
#define CREATE_NO_WINDOW            0x08000000


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!


Thanks for repeating the same link I already gave...

You're welcome.
Didn't see your answer while posting.
Can't compete with your cable modem!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.