beeper1.beep
If I know the method 'beep' has an id of 3 in GetIDsOfNames
is there a way to use this value instead of 'beep' i.e.
beeper.3 ( well, this didn't work, but is there some other way? )
When you create you component in VB using early binding (type library
import) you are not using automation, cuz your call will be made through
v-table, the calls are made using IDispatch when you create component
instance using CreateObject(), and the calls can be made using
CallByName()....
[]'s
Roger
www.desenvolvendo.net
"Moody" <mo...@nospam.com> escreveu na mensagem
news:b5icl9$5oe$1...@titan.btinternet.com...
"Rogerio Wagner" <raw...@hotmail.com> wrote in message
news:e2Z5ggZ8...@TK2MSFTNGP11.phx.gbl...
Sure, IDispatch::Invoke. That's what GetIDsOfNames gets called for
anyway, so that the calling routine knows what ID to pass to Invoke.
--
Craig Powers
MVP - Visual C++
so if I use VB, I will need to somehow call invoke directly. I just thought
there might have been a way to call methods by their disp id's without
using invoke, but I gather there is no such thing.
In message <3E78B23F...@hal-pc.org>, I had a go at a quick way
to call Invoke in VB. Note the caveats - I'm not sure this is
actually possible. It might be necessary to produce some sort of
wrapper that would convert to VB-compatible argument types. Since
you're posting here in the ATL group, I wouldn't guess that would be
too much of an issue if it's necessary.
"Moody" <mo...@nospam.com> wrote in message
news:b5icl9$5oe$1...@titan.btinternet.com...
If the above conditions are met, VB will use DISPID binding and call
through IDispatch::Invoke only, using the DISPIDs from the TLB.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"me@home" <ho...@nospam.com> wrote in message news:b5n8dp$6f6$1...@hercules.btinternet.com...
"Brian Muth" <bm...@straightthroughnospam.com> wrote in message
news:elRJM9v8...@TK2MSFTNGP11.phx.gbl...