Find.Execute using ATL

H

Horatiu Gilea

Does anybody know if the method execute of the object Find could be
used through a direct call (I mean, not through IDispatch)?

Apparently, the object is declared as dual and having an IDispatch
pointer for the Find object, this code should work (IFind definition
is taken from the code generated by ATL):

static const GUID iidIFind =
{ 0x000209b0, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x46 } };

HRESULT hr = m_lpDispatch->QueryInterface(iidIFind, (void**)&pIFind);

VARIANT_BOOL result;
hr = pIFind->Execute(pvarFindText, MatchCase, MatchWholeWord,
MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward, Wrap,
Format, ReplaceWith, Replace, &result);

It doesn't and after a quick look to the virtual method table, only
the entries for IUnknown and IDispatch seem to be properly
initialized.

Any Idea?

Thanks
Horatiu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top