PC Review


Reply
Thread Tools Rate Thread

Weird issue when launching processes.

 
 
MacScotsman
Guest
Posts: n/a
 
      2nd Nov 2010
I'm responsible for a piece of a launching app of a larger piece of
legacy software. My app is the starting point for the client side.
Running my application (VC++) kicks off a few self terminating process
to check file versions, etc... and finally launches a seperate
application (outside my control) and closes itself. This second
application then launches a third. This 3rd app launches a 16 bit app
to access data. The third app also launches a seperate 16 bit app
which needs to use the first 16 bit app to access data as well.

My problem is that when I run my app, the 2 16 bit apps down launch
under the same instance of NTVDM for the first attempt only. Once the
app is shut down, all subsequent attempts will launch the 16 bit apps
under seperate NTVDMs, causing the application to hang.

If I run the 2nd app in the chain directly, it works correctly
everytime. Presumably, I'm launching the 2nd app incorrectly from the
my application, but I can't figure out what the issue could be.

I'm currently using the following code to launch the 2nd app.

STARTUPINFOW si = { sizeof si };
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = show_cmd;
if (!::CreateProcessW(
app_name,
const_cast<wchar_t*>(cmd_line),
NULL,
NULL,
TRUE,
0,
NULL,
NULL,
&si,
&m_pi))
{
std:stringstream os;
os << "Could not create process \"" << app_name << "\": ";
throw OS::Error(os.str(), ::GetLastError());
}

I'd appreciate any help anyone could provide (or at least a direction
to go in)... I've tried a number of things, but I'm not really a C++
developer, so my kung-fu is not that string.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
launching/not launching programs upon logging in John Goche Windows Vista General Discussion 2 18th Sep 2009 08:01 PM
weird weird weird... multiple text boxes alves Microsoft Powerpoint 6 12th Oct 2007 04:53 PM
Launching Access .mdb file directly vs. launching with VBA microb0x Microsoft Access 5 17th Aug 2006 09:55 PM
Launching Excel programmatically not the same as launching excel manually Atchoum Microsoft Excel Programming 2 24th Nov 2004 07:24 PM
Screen display goes weird when launching an application Chris Nagel Windows XP Performance 0 30th Jul 2003 03:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:29 AM.