Error in COM
-
Hello everyone, I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object. Busy Bee
Hi Busy, Sorry, but the COM standard only allow COM-errors, if you want it to throw a generic error, you can write a wrapper for your COM-module, that catch a com error and then throw an error. /_henrik Henrik Sternberg, Cambridge Technolgy Partners Central Europe www.ctp.com/ce
-
Hello everyone, I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object. Busy Bee
Are you working with ATL? Cheers Carlos Antollini.
-
Hello everyone, I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object. Busy Bee
Look at IErrorInfo in combination with HRESULT. There is plenty of info in MSDN. Michael :-)
-
Hello everyone, I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object. Busy Bee
if you are using ATL then you can use the method Error to throw the exception, this will be caught in a _com_error catch e.g. instead of returning S_OK; do the following return Error(_bstr_t(ErrorDescription).copy(), IID_IObj);
-
Hello everyone, I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object. Busy Bee