COM interoperability

  • Thread starter Thread starter cotarelo
  • Start date Start date
C

cotarelo

I want to use a Class Library (DLL) on ASP .NET (2003). I'm using
JavaScript on the client side. My web must sign documents and I want to
call some functions from the class i have created. I have no problems
if i call the Capicom dll from javascript but if i call my class I
cannot use it and there are some errors:
<script lang="javascript>
var a = new ActiveXObject("CAPICOM.Certificate"); //No problem

But, if i want to use my class "signLibrary"

When I use var b = new ActiveXObject("signLibrary.Certs") there's an
error on the javascript

</script>

How do i have to call the library? How do i have to create the library
for using it on the website without errors? How do i have to reference
it from the website? Is there any other solution to do this?

Thank you
 
I assume your JavaScript runs on the client side. In this case, the DLL must
be deployed to each client machine and properly registered within the system
(as far as I remember, the regasm.exe tool should be used). I am not sure
what is Capicom DLL and is it already properly deployed to the clients,
might be you should just replicate the same steps for your class library.

Of course, everything above assumes that your class library is ready for COM
interop (all proper attributes applied etc.)
 
Back
Top