> Um... did you not say that the way suggested before was OK, and faster
> than IDispatch::Invoke()?
I wrote that email after reading his Thu, 11 Sep 2003 13:14:36 -0400
post (which I had quoted in my email) but it waited a bit long in my
outbox. I wrote the second email when I knew what he meant in detail,
and at that time I'd disagree with him, and to be clear enough, the
second time I described the method I was mentioning.
Sorry for the confusion.
> I should also say again that I only have an IDispatch pointer to work
> with, I want to get that existing control, not create a new instance.
Then, you should replace your IDispatch pointer with my sample's pFoo,
and call QueryInterface( ) on that pointer.
> But I couldn't even get it to compile - and in this case I KNEW the
> long was supposed to be a pointer to the object, it was just a safety
> measure to use
> xxx_cast<>() (which I have abandonned since, since I found
> the OCX wrapper class alternative).
You should compile with RTTI support (-GR) for dynamic_cast to work.
And even then, you should compile all your modules (.dll and .exe) with
this option enabled, or it will fail at runtime.
Anyway, like I said, this is a very dangerous thing to do.
-------------
Ehsan Akhgari
List Owner: [EMAIL PROTECTED]
[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]
"He felt that his whole life was some kind of dream and he sometimes
wondered whose it was and whether they were enjoying it."
