R
rene.goris
We are trying to develop an ActiveX Control for the Pocket PC...
HTML code for installing and calling object:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test Cab</title>
</head>
<body>
<a href="MyObjCab.cab">Install CAB file</a>
<script language="jscript">
try
{
var objParser = new ActiveXObject("MyObj.MyClass");
alert (objParser.MyString);
}
catch (ex)
{
alert("Error message: " + ex.message + "\n\nError
number: " + ex.number);
}
</script>
</body>
</html>
The C Source code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace MyObj
{
[GuidAttribute("D959E687-11FF-4c49-88B6-C64FF7CF5E74")]
[ComVisible(true)]
public class MyClass
{
private string myString = "Hello World";
public string MyString
{
get { return myString; }
set { myString = value; }
}
}
}
The problem is that after installing (goes well, component visible in
configuration/add remove programs) we get an error:
Error message: Automation server can't create object
Error code: -2146827859
Please help!
Greetings,
Rene
HTML code for installing and calling object:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test Cab</title>
</head>
<body>
<a href="MyObjCab.cab">Install CAB file</a>
<script language="jscript">
try
{
var objParser = new ActiveXObject("MyObj.MyClass");
alert (objParser.MyString);
}
catch (ex)
{
alert("Error message: " + ex.message + "\n\nError
number: " + ex.number);
}
</script>
</body>
</html>
The C Source code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace MyObj
{
[GuidAttribute("D959E687-11FF-4c49-88B6-C64FF7CF5E74")]
[ComVisible(true)]
public class MyClass
{
private string myString = "Hello World";
public string MyString
{
get { return myString; }
set { myString = value; }
}
}
}
The problem is that after installing (goes well, component visible in
configuration/add remove programs) we get an error:
Error message: Automation server can't create object
Error code: -2146827859
Please help!
Greetings,
Rene