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". |
| ma...@malch.com Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Malcolm Hoar" <ma...@malch.com> wrote in message
news:hgrjqb261...@news.sonic.net...
Heh, well it was eventually.
The environment structure was initially assembled in a
CString and then copied to a buffer.
Apparently, the handling of embedded nulls in a CString
changed from Visual Studio 6.0 and 9.0.