Re: Help with CreateProcess problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



This is very simple debugging. Did you display the memory pointed to by the
parameter you are passing for the environment? Have you determined if the
CreateProcess call you are making requires ASCII or wide characters? Visual
Studio 2005 and 2008 have good interactive debugging engines for
applications they compile.

"Malcolm Hoar" <malch@xxxxxxxxx> wrote in message
news:hgrjqb261q4002malch@xxxxxxxxxxxxxxxxx

I am converting a (working) application from VC++ 6 to
Visual Studio 2008.

The app calls CreateProcess with a lpEnvironment parameter.

This appears to be set up correctly:
* Name value pairs terminated by a null
* An extra null after the last name-value pair

Like this:
Name1=Value1#Name2=Value2##
where # represents a null.

The new process is created successfully but it does
not correctly inherit the environment. It's picking
up a single environment var:

Name1=Value1Name2=Value2

I have searched for similar problems and am completely
stuck. Any thoughts as to the cause, or suggestions for
how to approach diagnosing the problem?

--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar "The more I practice, the luckier I get". |
| malch@xxxxxxxxx Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


.



Relevant Pages

  • Re: How to get Interface reference counting in ATL
    ... component is actually called from an ASP page. ... application in production environment, not step by step. ... Debugging in an production environment is a very bad idea, ...
    (microsoft.public.vc.atl)
  • Re: Emacs vs GPS vs Eclipse, Ada vs Lisp vs Lua vs Java
    ... I don't expect Emacs to do that. ... Are you saying GPS supports that? ... a huge help when debugging GtkAda applications.) ... tools) as the Emacs environment. ...
    (comp.lang.ada)
  • Re: Debugging: Am I a dreamer. . . ?
    ... Are you objecting to the use of the C function printf() within a embedded ... environment for debugging or are you objecting to the use of serial port ... software UART for debugging output. ... This is in an hobbyist environment, but yes the UART driver code is included ...
    (comp.arch.embedded)
  • Re: DesignBAIS/Dave Bryant
    ... a REAL debugging environment for Visage, ... similar to the inbuilt trace/debug facilities we provide in Visage (we ... the Visage client side debugging facility has always offered this ...
    (comp.databases.pick)
  • Re: CreateProcess in a loop
    ... a loop is OK. ... I am running this in Windows PE environment and I got 0 ... returned from CreateProcess call which indicates a failure. ...
    (microsoft.public.vc.mfc)