x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Load COM at Pocket Internet Explorer

Leandro Jekimim
Leandro Jekimim Page Icon Posted 2006-06-07 6:53 PM
#
Status:
Hi,

Does anybody know if it is possible to load and use COM objects inside a HTML at Pocket Internet Explorer?
I'm trying to do this in a Pocket PC 2003 using the Object tag and calling the COM's function in javascript, but it is not working. I receive a message saying that the object is undefined.

Thanks,
Leandro Jekimim Goulart
 Top of the page
C:Amie Page Icon Posted 2006-06-07 7:20 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,012
Location:
United Kingdom
Status:
I am certainly no expert here on the PPC, and it wouldn't be a good idea to use the word expert on development for the H/PC either, however I do not believe that this is a possiblity for you. JS is a client side, platform independent run-time language, where as COM everything JS isn't. JS is controled from JScript.dll a PIE module.

You can use ActiveX controls within PIE to extend browser functionality and you could probably manipulate your JS from the AX, but not the other way around.
 Top of the page
Leandro Jekimim
Leandro Jekimim Page Icon Posted 2006-06-07 7:39 PM
#
Status:
Hi C:Amie,

Thanks for your reply.

I asked that because the link said that the OBJECT tag is not supported.

I declare my ActiveX using this tag:
<object ID="UICE" classid="CLSID:here is the clsid xxx-xxx-xxx" codebase="\Windows\Mydll.dll"></object>

And when I try to call an function in a javascript:
UICE.Function_called(); // the function is part of the ActiveX component

I got an error:
Microsoft JScript runtime error
...
Error: 'UICE' is undefined
Source: (null)

The COM object is registered (I developed a C++ standalone application consuming this COM and it worked fine).

Does somebody know how can I use this COM in a HTML/javascript?
 Top of the page
C:Amie Page Icon Posted 2006-06-07 7:54 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,012
Location:
United Kingdom
Status:
Oh, I see, you're already in AX land. Right.

CESDD0001 only goes up to PIE3, a PPC2003 device runs PIE5.

This is the Code Reference for the PIE Object Tag:
<object> element/object Inserts an ActiveX control onto the page. The OBJECT element is a block element and requires a closing tag. Note: There is no mechanism in Pocket IE to download controls. The author is limited to using controls that have been pre-installed on the device. Attributes ALIGN - sAlign: specifies the alignment for the control. Possible values are: baseline top center middle bottom CLASS - sClass: not supported in Pocket IE. CLASSID - sClassId: specifies the class identifier for the control. The format is "clsidXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX". This attribute is mandatory for the control to render. HEIGHT - sHeight: specifies the height of the ActiveX control in pixels HSPACE - iMargin: sets the horizontal margin for the control in pixels. ID - sId: specifies the string identifying the object. Can be used so that the OBJECT can be referenced from script. This attribute is mandatory for the control to render. NAME - sName: not supported in Pocket IE. VSPACE - iMargin: sets the vertical margin for the control in pixels. WIDTH - sWidth: specifies the width of the ActiveX control in pixels Properties, Methods, Events, Collections none

Are you sure that the dll has registered with PIE?
 Top of the page
Leandro Jekimim
Leandro Jekimim Page Icon Posted 2006-06-07 8:35 PM
#
Status:
And can I call the ActiveX function like the following javascript code?

UICE.Function_called(); // the function is part of the ActiveX component

UICE is the ID at the Object tag
I have enabled the errors (this link) and I'm alwayg getting the same error at the Pocket Internet Explorer: 'UICE' is undefined. I don't know why javascript is not recognizing UICE.

Thanks,
Leandro Jekimim Goulart
 Top of the page
Guest
Guest Page Icon Posted 2006-06-07 8:43 PM
#
Status:
Oh, sorry. I didn't read your last question (Are you sure that the dll has registered with PIE?)

The dll was developed using eVC 4.0 and when we deploy the dll (through eVC), the dll is registered, right?
I have checked the Pocket PC registry and I found references at [HKEY_CLASSES_ROOT\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}]
where xxxx is the clsid of my object, at [HKEY_CLASSES_ROOT\TypeLib\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] and other two entries inside the [HKEY_CLASSES_ROOT] key.

Does it means that it is registered?

Leandro Jekimim Goulart
 Top of the page
Jump to forum:
Seconds to generate: 0.140 - Cached queries : 60 - Executed queries : 8