Here is how to call a simple ActiveX object installed on the client.
///////////////////////////////////////////////////////////////////////////////////
// AxComp.cs
// Creates a simple ActiveX component.
//
// 1. Compile into a class library, or use:
// csc /t:library AxComp.cs
// 2. Register and generate the Typelib on the client's machine with:
// regasm AxComp.dll /tlb:AxCompNet.dll /codebase
///////////////////////////////////////////////////////////////////////////////////
using System;
using System.Runtime.InteropServices;
namespace AxComponent
{
public interface IAxTest
{
string CallIt();
}
[ClassInterface(ClassInterfaceType.AutoDual)]
public class AxComp : IAxTest
{
public string CallIt()
{
return "This is a test.";
}
}
}
///////////////////////////////////////////////////////////////////////////////////
// Tester.htm
// Test the ActiveX component.
///////////////////////////////////////////////////////////////////////////////////
<html>
<head>
<script language=JavaScript>
var g_axComponent = new ActiveXObject('AxComponent.AxComp');
alert(g_axComponent.CallIt());
</script>
</head>
<body>
<h1>Tester.htm</h1>
</body>
</html>
Here is a link that might help: http://aspnet.4guysfromrolla.com/articles/052604-1.aspx
NC...