|
You can try ResetEvent or change this event handle to an "empty" event you only create but never fire,
but I think the best way is to recreate the handle array without the process handle (be aware of that also the WAIT_OBJECT_0 + x value for all other events (after the process handle) changes if you remove this handle).
Here some pseudocode how I would solve this problem.
#define TIMEOUT_EVENT 0
struct WaitObject
{
HANDLE hWaitFor;
int nEventId;
}
int WaitForObjects(WaitObject[] waitObjects, bool bWaitAny, ....)
{
int nRetVal = 0;
int nLoop = 0;
HANDLE arrayWaitObjectHandles[waitObjects.Length];
for(; nLoop < waitObjects.Length; nLoop++)
arrayWaitObjectHandles[nLoop] = waitObjects[nLoop].hWaitFor;
nRetVal = WaitForMultipleObjects(waitObjects.Length, &arrayWaitObjectHandles, ...);
if(nRetVal == TIMEOUT)
return TIMEOUT_EVENT;
return waitObjects[nRetVal - WAIT_OBJECT_0].nEventId;
}
I know that this is not fully C (its too long ago^^) but I hope you understand the idea behind this,
just to build a function that waits for you and returns event ids (you assigned), so it will be easier
to remove the process handle from this array, because you waits for your assigned event ids.
I hope that helps.
PS: Viel Spass damit!
Greetings
Covean
|
|
|
|
|
Hi all,
I have changed my program Unicode based, from MBCS by changing in preprocessor. I have used all unicode supported syntex. Lastly it gives -
"cannot open file "mfc42ud.lib"
Can any one tell me why it is?
Thanks
|
|
|
|
|
|
Hi,
I have apply all this things. But it does not work. Can you tell me, which component will i install from visual studio cd.
|
|
|
|
|
Your original message statest that mfc42ud.lib could not be found. Have you istalled all the MFC libraries? Check the various library directories that are set in Visual Studio.
|
|
|
|
|
Did you run a search on your hard disk to see if mfc42ud.lib is actually present somewhere?
-Suhredayan
|
|
|
|
|
Hi,
Shaheen.India wrote: Can any one tell me why it is?
If I remember correctly... Visual Studio 6 did *not* install those Unicode MFC DLL's by default. When you install VS6 you need to navigate through the install choices and add the unicode DLL's. I would recommend getting your VS6 CD and modifying your installation.
Best Wishes,
-David Delaune
|
|
|
|
|
I am working on Excel Automation.
Application is MFC application without GUI.
All callbacks work perfectly in machine where office version is 2007 but same is not working in 2003.
When checking Excel.tli or tlh in both the machines, the size is different and AfterCalculate call back is missing in tli and tlh.
What needs to be added to application, to make it work for both versions.
This is how I imported:
#import "libid:00020813-0000-0000-C000-000000000046" auto_search no_dual_interfaces \
rename("DialogBox", "excelDialogBox") \
rename("RGB", "excelRGB") \
rename("DocumentProperties", "excelDocumentProperties") \
rename("SearchPath", "excelSearchPath") \
rename("CopyFile", "excelCopyFile") \
rename("ReplaceText", "excelReplaceText")
Please give me clue.
Regards,
KTTransfer.
|
|
|
|
|
try this one
#import \
".\MSO.DLL" \
rename("DocumentProperties","DocumentPropertiesXL") \
rename("RGB", "RGBXL")
#import \
".\VBE6EXT.OLB"
#import ".\EXCEL.EXE" \
rename("DialogBox", "DialogBoxXL") rename("RGB", "RGBXL") \
rename("DocumentProperties", "DocumentPropertiesXL") \
rename("ReplaceText","ReplaceTextXL") \
rename("CopyFile","CopyFileXL") \
exclude("IFont","IPicture") no_dual_interfaces
|
|
|
|
|
No its not working.
AfterCalculate event is introduced in office 2007.
So its not available in 2003.
But is there any way to get it by including any thing in application which works for both the versions.
If any idea.. .
Thanks in advance.
Regards,
KTTransfer.
|
|
|
|
|
ok it's working fine for me.But any way can you tell what you want to do?
|
|
|
|
|
I found this sample code "A Spell Checking Engine" but when I compiled this in VS C++ 2005 I got Lots of warnings and errors. Is there any updated version of this code which is compatible to VS C++ 2005?
|
|
|
|
|
napadaan wrote: I found this sample code "A Spell Checking Engine"
where did you find it?
napadaan wrote: I got Lots of warnings and errors
such as ?
napadaan wrote: Is there any updated version of this code which is compatible to VS C++ 2005?
why are you asking here ?
|
|
|
|
|
Hi,
Anyone know what is this dwExtraInfo in KBDLLHOOKSTRUCT.
thanks
Nitheesh.
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
I'm not really sure about but I think it has only to do with the
function keybd_event where you can emulate a key-action and add
an extra 32 bit value for your own purposes.
Greetings
Covean
|
|
|
|
|
Hi,
i have an exe in a DVD and i placed the DVD named "A" in the Drive and invoked the exe from the DVD
and in the invoked exe which contains a Dialog with a button in it..and now i pressed the button it will throw a message box(im throwing message box from code) which tells to insert another DVD called "B" into the same drive....and now i removed the DVD and inserted the second DVD ("B")now ill press ok in the message box then what should happen is it should invoke the setupo.exe which is present in the second DVD "B".....but im getting a windows message like Wrong Volume is in the Drive.Please insert the DVD "A" into drive F: ..and it is not allowing to go further and the thing is this error comes only in windows XP machine only and everything works fine in windows 2003,2008 server....and one morething this message comes in windows 2003,2008 also but it comes only when i invoke taskmanager...and it doesn"t create any problem in that machines...
Please help me regarding the same...
modified on Wednesday, November 11, 2009 6:03 AM
|
|
|
|
|
HI all,
i m using help file of application like test.chm,
in my application i m using help button on each and every dialog or forms,
i m using shellexecute function to open the chm file,that is exist on location where exe of application present.
i want when i click on help button from any dialog or form than the chm file open with corresponding page of CHM file.
please tell me how can i do this,
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: i want when i click on help button from any dialog or form than the chm file open with corresponding page of CHM file.
You should use HtmlHelp API Function for this.
May be this Tutorial[^] will help. You can google for more tutorials on HTML Help and related functions.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Actully i m not created the chm,i m used the chm that is already created,so i have no knowledge about this,can please explain me or send me some sample application to resolve my problem.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: Actully i m not created the chm,i m used the chm that is already created,
If you have not created the CHM file, I am not sure if you will be able to achieve this.
I have myself never created the CHM files so i wont be able to help much in this case.
Regards,
Sandip.
|
|
|
|
|
Le@rner wrote: i want when i click on help button from any dialog or form than the chm file open with corresponding page of CHM file.
Can you do something like:
.../MyHelpFile.chm::/SomeTopic.htm
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
How can i do this, when i have not created the chm file,i m open the chm file with shellexecute api,but use like this the path of file is not correct and chm file not open.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: How can i do this, when i have not created the chm file...
Then how do you know that separate topics even exist?
Le@rner wrote: ...but use like this the path of file is not correct and chm file not open.
What I showed was only an example. It's up to you to make it fit your needs.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks its done.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi ,
I am having a trouble in displaying Folder Dialog.My requirement is to open the folder dialog to a default path like C:\SomeDirectoryName\SomeDirectotryName .
I have written the code like this.
<br />
CFolderDialog obj(NULL,tstrTitle.c_str(),BIF_EDITBOX|BIF_STATUSTEXT);<br />
obj.SetSelection ( strExportPath.c_str() );<br />
but this is opening a FolderDialog Box to "My Computer" path and not to a give directory's path. I am using WTL Version 7.1 which does not have
SetInitialFolder ( ); function . This function is there in WTL Version 7.5 for which its works fine. Is there any other way to show the folder dialog to the give directory's Path.
Thanks in Advance.
|
|
|
|