
Passing Err.Number to VB from C++
return Error("Whoa thar!", IID_IMyClass, hr);
where hr is an HRESULT. This can be a variable tossed from another function
or one of your own, like E_POINTER, E_FAIL, or E_INVALIDARG. You can make
up your own if you really insist, but I feel it's best to use the built-in
ones if you're doing a COM for the mid tier.
-Dale
Quote:
> How do I "throw" an error in C++ / ATL and allow VB to retrieve
> Err.Number? There seems only to be a way to send a text description
> using the ATL Error functions.
> Presently, I'm doing this...
> return Error("Whoa thar!", IID_IMyClass, 0);