|
See if this helps:
WaitForSingleObject(si.hProcess, INFINITE);<br />
CloseHandle(si.hProcess);<br />
remove(stmpfile);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The WaitForSingleObject function halts program execution temporarily. This function allows a program to wait until something else has happened before execution continues.
The CloseHandle(si.hProcess); will thus in this case only execute after Acrobat is closed.
|
|
|
|
|
My biggest problem is why does the file not open with the ShellExecuteEx()structure when there is already an instance of Acrobat running, where as the ShellExecute() opens the document when there is already an instance of acrobat running.
Could it be due to the handle or process that has beed created to Acrobat using the ShellExecuteEx() structure? Where as ShellExecute() does not.
|
|
|
|
|
I'm aware of this, but you are still responsible for closing the process handle when using the SEE_MASK_NOCLOSEPROCESS flag. See the documentation!
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I got the folowing error while running a VC++ program. This program was complied on Debug mode.
====================
Error:-
Debug Assertion Failure.
Program: C:\Saurabh_Server.exe
File: dumpout.cpp
Line: 52
====================
This might be because of some memory leaks. Bcoz if these errors were due to Assertion failures in my code files, then error msg would have displayed my file name and line no itself.
But the file specified here does not belong to me.
I complied this program under "Release" version and it runs absolutely fine. Now my question is:
1. If I continue working on this code and at the end compile it to Release version, will it be Ok. Will it cause any error in future if user works on the Release version generated .EXE? Or this needs to be fixed immediately.
2. How it is to be fixed. Can anybody suggest the approach for it. (also for resolving the memory leaks).
Thanx and Regards,
Saurabh
|
|
|
|
|
Saurabh_Delhi wrote:
If I continue working on this code and at the end compile it to Release version, will it be Ok.
No.
The error will just go unnoticed. Maybe it will manifest itself under mysterious circumstances, or you will find a way to trigger.
Saurabh_Delhi wrote:
How it is to be fixed
How are we to know?
You did not show the relevant code.
Saurabh_Delhi wrote:
also for resolving the memory leaks
Delete every memory you allocate exactly once.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Thanx jhwurmbach.
But somebody told me that Debug Assertion errors does not comes under Release Version EXE. And so is happening with me. I am not getting any error in Release version EXE. If so is the case, then I can fix them later.
The code is comprised of many files so I can not post them here.
Is there any tool available to find memory leaks.
Regards,
Saurabh
|
|
|
|
|
Saurabh_Delhi wrote:
Debug Assertion errors does not comes under Release Version EXE
This is true. ASSERT in release builds is defined as 'nothing'.
The errors will not show up as an error, but they are there nonetheless. You just don't see them.
Or at least not in the beginning. You can never be sure that they will not come up later.
Not asserting does not mean that the error is magically fixed - it just turned off the error detection in the routine you called.
Saurabh_Delhi wrote:
Is there any tool available to find memory leaks
Yes. BoundsChecker springs to mind. But it is expensive, requires good knowledge and does not find every bug.
There may be others, even here at CP. Please use the 'search' facility.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Saurabh_Delhi wrote:
But somebody told me that Debug Assertion errors does not comes under Release Version EXE.
While it is true that assertions do not fire in release mode, the condition(s) that would have caused them to fire still exist.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Saurabh_Delhi wrote:
But the file specified here does not belong to me.
Which file does not belong to you, Saurabh_Server.exe or dumpout.cpp?
Saurabh_Delhi wrote:
If I continue working on this code and at the end compile it to Release version, will it be Ok.
If only errors were that easy to eliminate! An error is an error and will persist, regardless of whether the code is compiled in debug or release mode.
Saurabh_Delhi wrote:
...(also for resolving the memory leaks).
There are several ways of doing this. When your program is compiled in debug mode and you run it via F5, if any memory remains allocated (assuming the new operator was used, the results of such will show up in the debug window. Also, check out the CMemoryState class, and _CrtDumpMemoryLeaks() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
http://www.codeguru.com/forum/showthread.php?s=&threadid=265744
|
|
|
|
|
Ok?? Are you showing us that you posted the same question to another forum, or that you got more of the same answers, or that the problem is now resolved?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi
I need to know where i can find some code to study thru
iv'e looked but only finds snippets i want like complete
applications that i can study and work thru
they say its a good thing to do
regards
|
|
|
|
|
have a look at all the linux/bsd programs, and at some of the other freeware software out there.
http://sourceforge.net/[^] is a place to look for applications with source code.
There a a couple of windows applications available on sourceforge.
Have fun.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Code Project is choke full of code, both snippets and full programs.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi all,
This is a very simple question.. Please help.. I am using an edit box to input user address..and this edit box property multiline property is true..but when i enter data into that edit box..it doesnt understand enter to go to next line..instead it goes to OK button..please help me to make it behave like it should.. Any help is highly apprecaited..
thanks a lot in advance..
regards
himanshu
|
|
|
|
|
Does the edit control have the ES_WANTRETURN style?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks a lot..it did my work..
Himanshu
|
|
|
|
|
Recently I downloaded a file with the extension, ".hpp", and promptly changed it to ".h" before adding it to my project.
Ever since I did that, I've had nothing but problems with that file, and was wondering whether there might have been something different between those two extensions that should have been handled before using it.
Thanks for any insight.
William
Fortes in fide et opere!
|
|
|
|
|
The ".hpp" normally says that it is a c++ Header Files (cause the c++ source files are called ".cpp")
Beside beeing a naming convention (which is not popular at all when programming with Microsoft C++) it has (as much as i know) nothing to do with the way they are interpreted.
If you feel funny i guess you can change the extension of a header file to any name you want.
(e.g. the STL Headers come all without any Extension)
I just seen hpp from people programming not with Visual Studio. (Altough i think it would be more clear than .h)
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
WREY wrote:
I've had nothing but problems
Which type of problems? Your girlfriend did run away with a VB-coder?
When adding the file to your VC++ project (VC++6, right?), did you add it at the right place?
Under the 'header files' folder? You did put it into the right directory for your project?
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I want to program a ActiveX control.
It reads data from file, and show it.
(a kind of viewer)
Q1.
When i use this control in some html page,
i can use <object> or <embed /> tag.
But i don't know the difference between two tags.
(For exam, in <object> tag, codebase parameter decribes the link of install package, but what's the pluginpage paramter in <embed /> tag?)
And in the flash object insertion example, <embed /> tag is in the <object> tag, why?
When I tested html that have only <embed /> tag without <object> tag, it works well.
Q2.
When I develop the ActiveX control that is a kind of viewer, Does IE download the input file or does ActiveX control download?
How about the case of <embed /> tag?
--flash object example--
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
="" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="150" height="316">
<param name="movie" value="http://images.joins.com/common/joins_022.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="http://images.joins.com/common/joins_022.swf"
="" quality="high
" bgcolor="#FFFFFF
" width="150" height="316
" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />
|
|
|
|
|
I've a simple dialog based application, in which when i press OK button, a modeless dialog is created :
CParentDialog::OnOk()
{
CModelessChildDialog *pChild;
pChild = new CModelessChildDialog ();
pChild->Create(IDD_DIALOG1);
pChild->ShowWindow(SW_SHOW);
}
I want the desktop window to be the parent of my modeless dialog, so that it can be "separated" from the window which initiated it. For this purpose i am doing something like:
BOOL CModelessChildDialog::OnInitDialog()
{
SetParentWindow(GetDesktopWindow);
}
But still the modeless dialog is tightly coupled with the main application dialog that initiated it. I want my modeless dialog to be completely separated from the dialog that initiated it. How can i do so
|
|
|
|
|
Didn't you mean
pChild->Create(IDD_DIALOG1, GetDesktopWindow());
instead? If not, and you still wanted to do it in the dialog's OnInitDialog() method, change SetParentWindow() to SetParent() !
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Please, Can anybody helps me ?
I want to catch the CWnd pointer for the current dialog to use it in the CButton::Create() method. I tried to use "this" instead of CWnd in the OnButtonClick() its works ok, but when I tried to use "this" inside Custom Class (I created it) it doesn't work because the "this" pointer was pointing to the Current class.So " How can I get CWnd pointer for the current dialog ? "
Thank you at all.
Dr Abudawood
|
|
|
|