none of the gecko core people use microsoft projects to do builds.
iow: asking here for information about how to adapt a visual studio 98
(or 2002, 2003, 2005, 2007, ...) project is not a good idea.

to answer the topic question, yes you can have a library that has both
com and xpcom components, and in fact com and xpcom are binary
compatible. all you need is to make sure you have the entry points
required for both.

in xpcom, the entrypoint is NSGetModule (there are lots of macros to do
this part), i don't remember what the entry point is for com, but
presumably you know it.

for xpcom interfaces, you should use xpidl to compile them, not midl.
for com interfaces you should use midl, not xpidl.

note that you should probably only need to use one of xpidl/midl for
the actual building, and can merely ship the other idl or resulting
typelib file.

you probably end up w/ 2 entry points, a module that implements two
different interfaces (nsIModule, whatever the ms equivalent is), a
factory that implements two different interfaces (nsIFactory, whatever
the ms equivalent is), with the modules chaining to the factories and
the CreateInstance methods creating the same objects using new.

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to