PDA

Click to See Complete Forum and Search --> : Calling A COM From An Executable


razzaj
May 16th, 2001, 02:12 PM
I am calling a COM from an Executable and it is working fine , the COM is supposed to add an entry to a Database.

For some reason , sometimes an error occures while trying to update the Database. the error is not my issue here , my issue is that My exe program will stall not do anything , and then suddenly terminate.
( I am running it on Win2k) I think i can oversome this by using threads but I have no idea how.

I am basically looping in a list and for each item i Am performing a sries of actions among which Calling this COM function.

What I would like is make this Function run in a different thread so that if an error occures my program doesnt stall , and continues processing the other entries regardless of failing entries.

wolfofthenorth
May 16th, 2001, 06:31 PM
Hi,

You can use a timer, or settimer & killtimer APIs to start a background operation. Call a function in the object that initializes a timer. When the timer event fires, it is running in a different thread.

Hope this helps

:)

razzaj
May 16th, 2001, 06:52 PM
well , yes but i want a more explicit way of running a process in a different or new thread