• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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.
0
markbolton
Asked:
markbolton
  • 3
  • 2
1 Solution
 
mcriderCommented:
Public Const CREATE_SEPARATE_WOW_VDM = &H800

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


shell "start /SEPARATE <filename>"

Cheers!
0
 
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??


Cheers,

Mark.
0
 
mcriderCommented:
Read the following microsoft articles:

INFO: Running a Windows-Based Application in its Own VDM
http://support.microsoft.com/support/kb/articles/Q115/2/35.asp 
 
CreateProcess
http://msdn.microsoft.com/library/psdk/winbase/prothred_9dpv.htm 
 

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...


Cheers!



/************************************************************************
*                                                                       *
*   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_UNICODE_ENVIRONMENT  0x00000400

#define CREATE_SEPARATE_WOW_VDM     0x00000800
#define CREATE_SHARED_WOW_VDM       0x00001000

#define CREATE_DEFAULT_ERROR_MODE   0x04000000
#define CREATE_NO_WINDOW            0x08000000

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Erick37Commented:
0
 
mcriderCommented:
Erick37

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


Cheers!
0
 
Erick37Commented:
You're welcome.
Didn't see your answer while posting.
Can't compete with your cable modem!
:-)
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now