My project has two interfaces IObjectContext and IObjectFactory.
One way to use Interface as parameter is:
interface IObjectFactory: IDispatch{
[id(1)] HRESULT create([in] IObjectContext* context);
}
...
STDMETHODIMP CObjectFactory::create(IObjectContext* context)
{
CObjectContext *ctx= dynamic_cast<CObjectContext*>(context);
if(ctx!=NULL)
...
}
If I'm not mistaken, I read somewhere that using interface as parameter can cause security problems. I do not remember where I read.
Is it really possible? Can be Interface used as a parameter or not recommended?
Articles are welcome.