Arthur
January 19th, 2006, 10:23 AM
Hello,
I created a simple ATL ActiveX control, with one property on the interface:
Url. It is added by clicking some wizard stuf an it creates the following
The IDL describes it as follows:
[propget, id(1), helpstring("property URL")] HRESULT URL([out, retval] BSTR* pVal);
[propput, id(1), helpstring("property URL")] HRESULT URL([in] BSTR newVal);
As well as 2 methods:
STDMETHOD(get_URL)(BSTR* pVal);
STDMETHOD(put_URL)(BSTR newVal);
Now, if I call the interface like this in VBScript:
Dim object
Set object = CreateObject("ActiveXTest.testje.1")
object.URL = "http://www.codeguru.com"
My fantastic ATL ActiveX control URL property is invoked!
If I do this in IE:
<OBJECT ID="INXT_ActiveX" WIDTH="100%" HEIGHT="100%" CLASSID="CLSID:83CD4A17-89ED-4B7D-A654-22F8E4D6CD0A">
<PARAM NAME="Url" VALUE="http://www.codeguru.com">
</OBJECT>
The Url property is not set.
Could someone tell me what I am doing wrong here?
Thanks in advance,
Arthur
I created a simple ATL ActiveX control, with one property on the interface:
Url. It is added by clicking some wizard stuf an it creates the following
The IDL describes it as follows:
[propget, id(1), helpstring("property URL")] HRESULT URL([out, retval] BSTR* pVal);
[propput, id(1), helpstring("property URL")] HRESULT URL([in] BSTR newVal);
As well as 2 methods:
STDMETHOD(get_URL)(BSTR* pVal);
STDMETHOD(put_URL)(BSTR newVal);
Now, if I call the interface like this in VBScript:
Dim object
Set object = CreateObject("ActiveXTest.testje.1")
object.URL = "http://www.codeguru.com"
My fantastic ATL ActiveX control URL property is invoked!
If I do this in IE:
<OBJECT ID="INXT_ActiveX" WIDTH="100%" HEIGHT="100%" CLASSID="CLSID:83CD4A17-89ED-4B7D-A654-22F8E4D6CD0A">
<PARAM NAME="Url" VALUE="http://www.codeguru.com">
</OBJECT>
The Url property is not set.
Could someone tell me what I am doing wrong here?
Thanks in advance,
Arthur