I am new to XPCOM and try to do my first component. What I want is to load a
specific URL into the Webbrowser. I don't wnat to do this by javascript. So
I get the current nsIDOMWindowInternal ant want to do an "open" on it. The
method "open" expects an url, a name and some options: nsIDOMWindow open
( DOMString url , DOMString name , DOMString options )
I have some problems when I try to compile my code with the VS6.0.
1. With the following code I get the "error C2660: 'Open' : function does
not take 3 parameters"
#include "nsString.h"
...
nsCOMPtr<nsIDOMWindow> ContentWnd;
...
nsCOMPtr<nsIDOMWindowInternal> wnd(do_QueryInterface(ContentWnd));
...
wnd->Open( NS_LITERAL_STRING("http://www.mozilla.org") ,
NS_LITERAL_STRING("Mozilla") , NS_LITERAL_STRING("") );
...
I looked into the header-file and it seems that it expects a 4th paramater
_retval. Ist that the ContentWnd? Cause I don't know I modify the line like
this:
wnd->Open( NS_LITERAL_STRING("http://www.mozilla.org") ,
NS_LITERAL_STRING("Mozilla") , NS_LITERAL_STRING(""), nsnull);
2. Cause the method "open" expects a DOMString I include "nsString.h" and
try to use the macto NS_LITERAL_STRING^but I get the following error:
MyComponent.obj : error LNK2001: unresolved external symbol "public: static
void const * const nsObsoleteAString::sCanonicalVTable"
([EMAIL PROTECTED]@@2PBXB)
MyComponent.obj : error LNK2001: unresolved external symbol "public:
__thiscall nsAString::~nsAString(void)" (??1nsAString@@[EMAIL PROTECTED])
The "idea" with the NS_LITERAL_STRING I get from
http://developer.mozilla.org/test/docs/XPCOM:Strings
Can anybody help me? Thanks in advance
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom