Thanks David and Tomasz Motyl,
So now i have an idl file which looks like this
File Name: XPdb.idl
#include "nsIFoo.idl"
[scriptable, uuid(AB6F946A-0E56-4120-A020-2DC2E6AC7E12)]
interface nsIXPDBC : nsISupports
{
yourIFoo myFunction(yourIFoo);
}
[scriptable, uuid(AB6F946A-0E56-4120-A020-2DC2E6AC7E12)]
interface nsIXPDBC : nsISupports
{
yourIFoo myFunction(yourIFoo);
}
After this I compiled both nsIFoo.idl and XPdb.idl with XPIDL compiler.
Now i have 2 header files nsIFoo.h and XPdb.h . I now implement their methods in the same component using same CID in same dll.
Is this the correct method to do? Can u suggest some good method?
Now about accessing the nsIFoo in XPdb
NS_IMETHODIMP
myFunction(nsIFoo **yourIFoo)
{
nsCOMPtr<nsIFoo> sts;
sts->Foo();
*yourIFoo = sts;
}
Is it correct? Do i have to allocate memory to 'sts' above ?
Nikhil Kadu
Yahoo! India Matrimony: Find your life partner online.
