Re: Dialogbased App: add Automation later?
"Joseph M. Newcomer" <newcomer@flounder.com> ha scritto nel messaggio
news:n8m424dh1b6qf4h2m9m78gdq7b8q97br4r@4ax.com...
Also, you declare _hisdllfunc ptr, you do ptr.CreateInstance, but then
you do
ptr->dothething. This should not even compile. Either ptr is an object,
or it is a
pointer to an object.
Hi Joe,
I think that OP's 'ptr' is a smart pointer. So it can have methods like
CreateInstance, that are correctly called using dot notation. And the smart
pointer overloads operator->, so the OP can call the original interface
methods (like 'dothething') using operator->.
It's similar to CComPtr, where you can do :
CComPtr< ISomeInterface > spX;
// Dot notation here, because you are using CComPtr::CoCreateInstance
HRESULT hr = spX.CoCreateInstance(...);
// Arrow notation here, because we are accessing wrapped interface methods
hr = spX->DoSomethingWithX(...);
You did not say what you mean by "crash", which is essentially a
meaningless term as you
have used it. When this error occurs, something VERY SPECIFIC is
displayed on your screen
to indicate the problem, and you have not said what that is.
I agree, of course. :)
Giovanni