I am trying the example in the cxc book. following is the idl to define my interface,
just for test
#include "nsISupports.idl" [scriptable, uuid(...)]
interface iWeblock : nsISupports
{
  void test();
};
the IDL file compiles well and I got the c++ header and xpt file. then in the Weblock
c++ file,
class Weblock: public nsIObserver, public iWeblock
{
  public: ... NS_DECL_IWEBLOCK
}
and
NS_IMPL_ISUPPORTS2(weblock, nsIObserver, iWeblock);
and
NS_IMETHODIMP Weblock::Test(){ fopen("d:\\temp\\test.txt", "w"); }
the program is built successfully. Then I copy the DLL into mozilla component directory,
run regxpcom to register it. But from component viewer, I didn't see the iWeblock
interface under Weblock entry. Could anyone tell me what else I missed? thanks

--------------------------------------------------------------------------------


Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.

Reply via email to