Re: VB to VC
Ok, then the method signature would most likely be:
HRESULT CreatePageGenerator([in] VARIANT* GroupPath,
[out, retval] IDispatch** generator);
You call it like this:
#import "type library here"
IEngineInterfaceNamePtr crxPgEngine;
// Obtain the engine instance by whatever means necessary
// That part is not clear from your post
IGeneratorInterfaceNamePtr crxPgGen;
_variant_t GroupPath;
GroupPath.ChangeType(VT_ARRAY | VT_VARIANT);
try {
crxPgGen = crxPgEngine.CreatePageGenerator(&GroupPath);
} catch (_com_error& e) {
// Handle errors here
}
I assume Array() creates NULL safe array. If that's not the case
you'll have to explicitly create an empty safe array and store it
in the VARIANT.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Vishal" <vishalmore@rediffmail.com> wrote in message
news:1160126969.806502.196870@h48g2000cwc.googlegroups.com...
GroupPath is not defined in my application, I am not using Option
Explicit
So by default its Variant..
Alexander Nickolov wrote:
So what is the type of GroupPath in VB?
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Vishal" <vishalmore@rediffmail.com> wrote in message
news:1160072233.713021.288190@i3g2000cwc.googlegroups.com...
Hi All,
What would be the possible code of VC++ for following VB code ???
GroupPath = Array()
Set crxPgGen = crxPgEngine.CreatePageGenerator(GroupPath)
I have tried everything only problem I am facing is passing the
parameter, I have tried lot more
options with no luck...
I will appriciate if some one take me out of this trouble...
thanks in advance,
regards,
vishal