The idl you posted used the interface name "iMyInterface" and the js you
posted used the name "iSN". That is a bad start.
The JS QueryInterface call will take the uuid that was discovered in the
typelib to be mapped to the interface name you passed in and will pass
that uuid to the C++ QueryInterface method of the object you created
with your createInstance call.
It seems that your C++ QueryInterface is responding with NS_NOINTERFACE
for whatever that uuid might be. I suggest your confirm that we you are
using only one interface name with one uuid and then set a breakpoint in
your C++ QueryInterface method to see what is going on.
John.
Rajendra Prasad Murakonda wrote:
On 5/22/06, Oliveiros Cristina <[EMAIL PROTECTED]> wrote:
Could you show your javascript function, please?
The code:
function doSomeThing()
{
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var cmgr = Components.classes["@dg/SN"].createInstance();
alert(cmgr);
var abc = Components.interfaces.iSN;
alert(abc);
cmgr = cmgr.QueryInterface (abc); // Exception is thrown here
} catch (err) {
alert(err);
alert("Sucks");
return;
}
}
I get the error : NS_NOINTERFACE
Thanks a lot,
- Rajendra Prasad Murakonda
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom