I have a created a minimal ATL ActiveX control through the WCE ATL COM
AppWizard in eVC++ V4 which i wish to instantiate in the PPC browser.
The project compiles without errors and the dll is registered on the
emulator. However, the project does not compile when the
IObjectSafetyImpl is used. The following error occurs;

'IObjectSafetyImpl' : base class undefined
syntax error : missing ',' before '<'
'<'

I have read through the various postings on this newsgroup, the
microsoft article on "Creating ActiveX Controls for Pocket Internet
Explorer on Pocket PC"
and the same article as described in the Pocket PC SDK. I have added
the appropriate ATL implementations to allow for accessing the
properties and methods of the ActiveX control through scripting in
Pocket Internet Explorer and to declare the control as safe for
scripting.

However, the object fails to instantiate using either of the following
approaches when called from within a web page.

<OBJECT
ID="obj1"
CLASSID="clsid:E63D0BB8-0532-430E-B397-39581CBFA368"
WIDTH=100
HEIGHT=100
>

<SCRIPT LANGUAGE="JScript">
function jsVPNConnect()
{
try{
var vpn = new ActiveXObject("AIRBEAM4.Connect");
window.alert("AIRBEAM4.Connect Instantiated");
}
catch(ex){
window.alert("Error instantiating AIRBEAM4.Connect");
}
}
</SCRIPT>

Does anyone know what could be causing this?

The "AXSample" application works fine.

Any help appreciated!

Re: Failure to instantiate ActiveX control by Gordon

Gordon
Thu Aug 21 17:20:25 CDT 2003

IObjectSafetyImpl is #ifdef'd out for PPC, (at least with eVC++ 3.0), PPC2K
doesn't have the problem.
If you're compiling for PPC you'll have to modify the atl file.

The other thing that article doesn't mention is to add the com interface
entry to the com map

BEGIN_COM_MAP()
..
..
COM_INTERFACE_ENTRY(IObjectSafety)
..
..
END_COM_MAP()

"Dr G" <wayneglanfield@hotmail.com> wrote in message
news:45824319.0308210841.40e28f61@posting.google.com...
> I have a created a minimal ATL ActiveX control through the WCE ATL COM
> AppWizard in eVC++ V4 which i wish to instantiate in the PPC browser.
> The project compiles without errors and the dll is registered on the
> emulator. However, the project does not compile when the
> IObjectSafetyImpl is used. The following error occurs;
>
> 'IObjectSafetyImpl' : base class undefined
> syntax error : missing ',' before '<'
> '<'
>
> I have read through the various postings on this newsgroup, the
> microsoft article on "Creating ActiveX Controls for Pocket Internet
> Explorer on Pocket PC"
> and the same article as described in the Pocket PC SDK. I have added
> the appropriate ATL implementations to allow for accessing the
> properties and methods of the ActiveX control through scripting in
> Pocket Internet Explorer and to declare the control as safe for
> scripting.
>
> However, the object fails to instantiate using either of the following
> approaches when called from within a web page.
>
> <OBJECT
> ID="obj1"
> CLASSID="clsid:E63D0BB8-0532-430E-B397-39581CBFA368"
> WIDTH=100
> HEIGHT=100
> >
>
> <SCRIPT LANGUAGE="JScript">
> function jsVPNConnect()
> {
> try{
> var vpn = new ActiveXObject("AIRBEAM4.Connect");
> window.alert("AIRBEAM4.Connect Instantiated");
> }
> catch(ex){
> window.alert("Error instantiating AIRBEAM4.Connect");
> }
> }
> </SCRIPT>
>
> Does anyone know what could be causing this?
>
> The "AXSample" application works fine.
>
> Any help appreciated!