Vázquez Landa, David
2009-01-09 14:56:41 UTC
Hi, I have a quick question.
Say I have an IDL such as:
Interface BaseInterface
{
void forty(int two);
};
Interface ChildInterface : BaseInterface
{
};
And then in the c++ implementation I want to have something like:
// --- some random class does:
Void test (BaseInterface_var baseInterface)
{
cout << "yay";
}
// --- I want to call this function with the child interface.
// For the sake of the argument:
ChildInterface_var childInterface = getChildInterface();
// This doesn't work
test(childInterface);
So, what would be the way to make this work? Should I use ChildInterface_ptr instead?
And if I use ChildInterface_ptr, do I have to explicitly destroy it once I'm finished using it? If so, how?
Hmm... This is kind of driving me nuts ??
Thanks :)
David.
Say I have an IDL such as:
Interface BaseInterface
{
void forty(int two);
};
Interface ChildInterface : BaseInterface
{
};
And then in the c++ implementation I want to have something like:
// --- some random class does:
Void test (BaseInterface_var baseInterface)
{
cout << "yay";
}
// --- I want to call this function with the child interface.
// For the sake of the argument:
ChildInterface_var childInterface = getChildInterface();
// This doesn't work
test(childInterface);
So, what would be the way to make this work? Should I use ChildInterface_ptr instead?
And if I use ChildInterface_ptr, do I have to explicitly destroy it once I'm finished using it? If so, how?
Hmm... This is kind of driving me nuts ??
Thanks :)
David.