Click here to Skip to main content
15,889,820 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Allocating struct with malloc, shows as undefined in Visual C++ debugger Pin
CP Visitor8-Mar-05 5:45
CP Visitor8-Mar-05 5:45 
Generalremove() files but not into recycle bin Pin
User 17288848-Mar-05 0:35
User 17288848-Mar-05 0:35 
GeneralRe: remove() files but not into recycle bin Pin
ThatsAlok8-Mar-05 2:13
ThatsAlok8-Mar-05 2:13 
GeneralRe: remove() files but not into recycle bin Pin
TheGreatAndPowerfulOz8-Mar-05 3:38
TheGreatAndPowerfulOz8-Mar-05 3:38 
GeneralRe: remove() files but not into recycle bin Pin
Mike Dimmick8-Mar-05 8:04
Mike Dimmick8-Mar-05 8:04 
GeneralProcess is signaled on start up if another instance is running Pin
lulacapixaba8-Mar-05 0:17
lulacapixaba8-Mar-05 0:17 
GeneralRe: Process is signaled on start up if another instance is running Pin
Mike Dimmick8-Mar-05 2:36
Mike Dimmick8-Mar-05 2:36 
GeneralRe: Process is signaled on start up if another instance is running Pin
lulacapixaba8-Mar-05 3:02
lulacapixaba8-Mar-05 3:02 
Thanks, Mike.

This explains everything. But it also means that there is no safe way to wait for a process to terminate. Suppose an instance has been started manually by the user. Now, because your application does not know there is one instance of the viewer running, you try to launch one and wait for it to terminate. Just as you've described, it will return immediatelly and your application will think that the process has terminated... which is true, in some sense, but the viewer is still running with your file in it. In other words, if you are waiting for the application to terminate to free resources (deleting temporary files, for instance), you will do it prematurely.

How would you implement this?

Lula Capixaba
GeneralRe: Process is signaled on start up if another instance is running Pin
TheGreatAndPowerfulOz8-Mar-05 3:36
TheGreatAndPowerfulOz8-Mar-05 3:36 
GeneralUsing Regions Pin
Kyudos8-Mar-05 0:02
Kyudos8-Mar-05 0:02 
GeneralRe: Using Regions Pin
namaskaaram8-Mar-05 17:12
namaskaaram8-Mar-05 17:12 
Generalvideo codec Pin
codecfvc17-Mar-05 23:53
codecfvc17-Mar-05 23:53 
GeneralA program within a program Pin
Ubik K7-Mar-05 23:36
Ubik K7-Mar-05 23:36 
GeneralRe: A program within a program Pin
BlackDice8-Mar-05 2:38
BlackDice8-Mar-05 2:38 
GeneralRe: A program within a program Pin
u6ik8-Mar-05 3:00
u6ik8-Mar-05 3:00 
GeneralRe: A program within a program Pin
Phil J Pearson8-Mar-05 4:47
Phil J Pearson8-Mar-05 4:47 
GeneralRe: A program within a program Pin
David Crow8-Mar-05 3:56
David Crow8-Mar-05 3:56 
GeneralRe: A program within a program Pin
u6ik8-Mar-05 4:12
u6ik8-Mar-05 4:12 
GeneralRe: A program within a program Pin
David Crow8-Mar-05 4:41
David Crow8-Mar-05 4:41 
QuestionData types mismatches or just incompatibility? Pin
Axonn Echysttas7-Mar-05 23:18
Axonn Echysttas7-Mar-05 23:18 
AnswerRe: Data types mismatches or just incompatibility? Pin
Cedric Moonen8-Mar-05 0:02
Cedric Moonen8-Mar-05 0:02 
GeneralRe: Data types mismatches or just incompatibility? Pin
Axonn Echysttas8-Mar-05 3:16
Axonn Echysttas8-Mar-05 3:16 
Generalscreen capture driver Pin
TomLismont7-Mar-05 23:06
TomLismont7-Mar-05 23:06 
General3D border frame Pin
Joris van der Pol7-Mar-05 23:01
Joris van der Pol7-Mar-05 23:01 
GeneralRe: 3D border frame Pin
namaskaaram8-Mar-05 0:07
namaskaaram8-Mar-05 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.