Board index » cppbuilder » Catching COM events

Catching COM events


2007-07-07 02:35:35 AM
cppbuilder74
I am using BCB6.0. I have created a COM component on the Borland component
pallet by importing the COM object Type Library and using the create
component feature. Once in a while one of the COM functions will fail. When
a COM function fails, the COM code throws up an error message box before
returning to my app so I am unable to handle this failure gracefully. Is
there anyway I can set up my code so the COM error message box can be
handled by my application?
Thanks
Larry Johnson.
 
 

Re:Catching COM events

"LarryJ" < XXXX@XXXXX.COM >wrote in message
Quote
Once in a while one of the COM functions will fail. When a COM
function fails, the COM code throws up an error message box
before returning to my app so I am unable to handle this failure
gracefully.
That is very unusual for a COM object to do. Are you sure that the
code is not simply throwing an Exception that you are not catching
instead?
Quote
Is there anyway I can set up my code so the COM error message
box can be handled by my application?
That depends on where the message box is actually coming from. If it
truely is inside the COM object itself, then there is no possibility
to handle it unless the COM object explicitally exposes such
functionality to you.
Gambit
 

Re:Catching COM events

The error is the HRCHECK coming from the OLE_CHECK. My other COM apps have
the NO_PROMPT_ON_HRCHECK_FAILURE in the condition list. I will add this to
my current project condition list and see if it solves the problem.
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

 

{smallsort}