Hello all,

I'm trying to access an activex control from a web-page in
winCE 4.2 on CEPC. This code currently works on windows
2000. And I don't know what im' doing wrong.

I made an MFC activex control through the wizard in evc4.
I added two methods. SetNumber and GetNumber. This is the
html code I'm using to try and access the activex object:
<HTML>
<HEAD>
<TITLE>MFC WinCE ActiveX Ctrl Test</TITLE>
</HEAD>
<BODY>



<OBJECT ID=Simplex CLASSID="CLSID:56DE9F36-AB7B-411A-8289-
D3FE4A7CCE40" width=352 height=240></OBJECT>
<BR>


<FORM NAME="Controls">


<INPUT TYPE="button" VALUE="SetNumber" onClick="doSetNumber
()">
<INPUT TYPE="button" VALUE="GetNumber" onClick="doGetNumber
()">
<BR>

<INPUT TYPE="text" NAME="Number" VALUE="7" SIZE="20">
<BR>

</FORM>



<SCRIPT LANGUAGE="JavaScript">

function doSetNumber()
{
alert("Number ==" + document.Controls.Number.value);

document.Simplex.SetNumber
(document.Controls.Number.value);
}

function doGetNumber()
{
rv = document.Simplex.GetNumber();

alert("GetNumber() returned" + rv);
}

</SCRIPT>


</BODY>
</HTML>



The activex control comes up in IE fine. I see the elipse
in the box. I just can't access any methods.

This is the message I always see:
8541458 PID:c3ef422a TID:a3c8f002 0x83cb8d30: Script
Error -- URL:http://bolt/simplex2.htm LINE:38 CHAR:3
Error:Object doesn't support this property or method


I've tried referencing the object like
this "Simplex.GetNumber()" without the "document.". I
tried putting the object in the form.

I'm regestering the activex control at runtime, through
DllRegisterServer().

Any help please?

Thanks,
frank

Re: Accessing activex control from a web page by Paul

Paul
Tue Nov 11 15:52:41 CST 2003

You don't want to use document.Simplex. Just use Simplex. Are you sure
that the CLSID that you gave there is correct? And your object has a dual
interface?

You might also try creating a new custom method which takes no parameters
and does not return a value and try calling that. That works for me 100% of
the time...

Paul T.

"Frank" <anonymous@discussions.microsoft.com> wrote in message
news:153701c3a88f$cf151180$a601280a@phx.gbl...
> Hello all,
>
> I'm trying to access an activex control from a web-page in
> winCE 4.2 on CEPC. This code currently works on windows
> 2000. And I don't know what im' doing wrong.
>
> I made an MFC activex control through the wizard in evc4.
> I added two methods. SetNumber and GetNumber. This is the
> html code I'm using to try and access the activex object:
> <HTML>
> <HEAD>
> <TITLE>MFC WinCE ActiveX Ctrl Test</TITLE>
> </HEAD>
> <BODY>
>
>
>
> <OBJECT ID=Simplex CLASSID="CLSID:56DE9F36-AB7B-411A-8289-
> D3FE4A7CCE40" width=352 height=240></OBJECT>
> <BR>
>
>
> <FORM NAME="Controls">
>
>
> <INPUT TYPE="button" VALUE="SetNumber" onClick="doSetNumber
> ()">
> <INPUT TYPE="button" VALUE="GetNumber" onClick="doGetNumber
> ()">
> <BR>
>
> <INPUT TYPE="text" NAME="Number" VALUE="7" SIZE="20">
> <BR>
>
> </FORM>
>
>
>
> <SCRIPT LANGUAGE="JavaScript">
>
> function doSetNumber()
> {
> alert("Number ==" + document.Controls.Number.value);
>
> document.Simplex.SetNumber
> (document.Controls.Number.value);
> }
>
> function doGetNumber()
> {
> rv = document.Simplex.GetNumber();
>
> alert("GetNumber() returned" + rv);
> }
>
> </SCRIPT>
>
>
> </BODY>
> </HTML>
>
>
>
> The activex control comes up in IE fine. I see the elipse
> in the box. I just can't access any methods.
>
> This is the message I always see:
> 8541458 PID:c3ef422a TID:a3c8f002 0x83cb8d30: Script
> Error -- URL:http://bolt/simplex2.htm LINE:38 CHAR:3
> Error:Object doesn't support this property or method
>
>
> I've tried referencing the object like
> this "Simplex.GetNumber()" without the "document.". I
> tried putting the object in the form.
>
> I'm regestering the activex control at runtime, through
> DllRegisterServer().
>
> Any help please?
>
> Thanks,
> frank
>



Re: Accessing activex control from a web page by anonymous

anonymous
Tue Nov 11 17:23:43 CST 2003

Hi Paul,

I think the problem is I wasn't exposing the IObjectSafety
Interface. I added this to the DLLRegisterServer()
function but its still not registering correct.

I going to find out what is cuase the activex control to
not register the interface and then write back. Anyone
already do this and see any steps I'm doing wrong.

Thanks,
Frank

>-----Original Message-----
>You don't want to use document.Simplex. Just use
Simplex. Are you sure
>that the CLSID that you gave there is correct? And your
object has a dual
>interface?
>
>You might also try creating a new custom method which
takes no parameters
>and does not return a value and try calling that. That
works for me 100% of
>the time...
>
>Paul T.
>
>"Frank" <anonymous@discussions.microsoft.com> wrote in
message
>news:153701c3a88f$cf151180$a601280a@phx.gbl...
>> Hello all,
>>
>> I'm trying to access an activex control from a web-page
in
>> winCE 4.2 on CEPC. This code currently works on windows
>> 2000. And I don't know what im' doing wrong.
>>
>> I made an MFC activex control through the wizard in
evc4.
>> I added two methods. SetNumber and GetNumber. This is
the
>> html code I'm using to try and access the activex
object:
>> <HTML>
>> <HEAD>
>> <TITLE>MFC WinCE ActiveX Ctrl Test</TITLE>
>> </HEAD>
>> <BODY>
>>
>>
>>
>> <OBJECT ID=Simplex CLASSID="CLSID:56DE9F36-AB7B-411A-
8289-
>> D3FE4A7CCE40" width=352 height=240></OBJECT>
>> <BR>
>>
>>
>> <FORM NAME="Controls">
>>
>>
>> <INPUT TYPE="button" VALUE="SetNumber"
onClick="doSetNumber
>> ()">
>> <INPUT TYPE="button" VALUE="GetNumber"
onClick="doGetNumber
>> ()">
>> <BR>
>>
>> <INPUT TYPE="text" NAME="Number" VALUE="7" SIZE="20">
>> <BR>
>>
>> </FORM>
>>
>>
>>
>> <SCRIPT LANGUAGE="JavaScript">
>>
>> function doSetNumber()
>> {
>> alert("Number ==" + document.Controls.Number.value);
>>
>> document.Simplex.SetNumber
>> (document.Controls.Number.value);
>> }
>>
>> function doGetNumber()
>> {
>> rv = document.Simplex.GetNumber();
>>
>> alert("GetNumber() returned&quo