473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem instantiating object from custom ActiveX DLL

I've been provided with a custom ActiveX DLL (written in C++) that reads a certiifcate to generate a signature for a passed XML string, and I'm having trouble instantiating it.
The DLL is registered succesfully on my computer and I've explicitly granted IUSR_<machinename> to use it.

The DLL comes with a testtool (written in Visual Basic) which instantiates the object like this:

Dim loCertCryptCOM As New CCOMCRYPTLib.CCrypt

As you can see, this testtool uses "CCOMCRYPTLib.CCrypt" to instantiate the object from the DLL.

However, if I try to do the same from my ASP/VBscript application, like this:

Set l_oCertCrypt = Server.Createobject("CCOMCRYPTLib.CCrypt")

I get an "Server.CreateObject Failed. Invalid Class string" error.

I also have the C++ sources for this DLL and browsing those, I saw that the ProgID for the DLL is "CComCrypt.CCrypt" which puzzles me, since the VB-application uses something else for the instantiation.

To test, I tried instantiating the object like this:

Set l_oCertCrypt = Server.Createobject("CComCrypt.CCrypt")

and it seems to work, except that the function call that I need to trigger is not recognised then (error: Type mismatch: 'l_oCertCrypt.CreateHash').

It seems strange that the Visual Basis application is successfull in instantiating an object that I can't instantiate from my ASP/VBscript webapplication.
And the Visual Basic application has no problem triggering the CreateHash() method, and I can't get that working.

Any ideas what I might be doing wrong here?

--
Marja
Dec 16 '05 #1
1 2186
I still don't understand why I need to instantiate another object in my ASP/VBscript application than the Visual Basic application needs to do, but I did find a probable cause for my problem.

For those of you who are interested:
The object's method is defined in de DLL to expect 5 parameters: 2 in and 3 out.
The 3 out parameters are declared as [out] parameters (that is, by reference) and they are declared as type 'string' while they should be declared as type 'variant' to be used from ASP.
(see: http://support.microsoft.com/kb/197957/EN-US/)

I do have the C++ sources of the DLL as well, so I will try to change this and see what happens then.

Regards, Marja
Dec 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: abs | last post by:
Hi all. My list: <ul> <li id="a" onclick="show(this)">Aaaaaaaa</li> <li id="b" onclick="show(this)">Bbbbbbbb</li> <li id="c" onclick="show(this)">Cccccccc <ul> <li id="d"...
1
by: Bogdan Zamfir | last post by:
Hi, I have big troubles with an Access2002 application I wrote it under Acc2002 Romanian, and try to run it on Acc2002 US version, and I have the following troubles For some forms, Load event...
12
by: ShepardBerry | last post by:
This may be a dumb question, but I'm not finding anything specifically what I'm looking for. Still kind of new to .NET as well. What I'm trying to do that I know I could do in VB6.0/ASP is to...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
5
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file)...
19
by: Chocawok | last post by:
Some of the classes in my app are graphical. To encapsulate the graphical side of things I had created a class called "sprite" which holds a bit map and knows how to draw itself etc. The...
0
by: Budhi Saputra Prasetya | last post by:
Hi All, I have a problem regarding embedding ActiveX into ASP .NET page. I can't make it working. No error is thrown, but what i can see from the ActiveX Area is only disabled text area. I...
0
by: ndronen | last post by:
Hi: I have a DLL compiled from C# that I have to be able to use within an HTML document. This is relatively easy to do following the suggestions on this page: ...
7
by: StephQ | last post by:
First of all: distinction of keywords typename and class in template arguments. Accoarding to a post in a well known moderated group: "There are three possibilities for template arguments: 1)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.