473,799 Members | 2,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_<machinena me> to use it.

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

Dim loCertCryptCOM As New CCOMCRYPTLib.CC rypt

As you can see, this testtool uses "CCOMCRYPTLib.C Crypt" 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.Createob ject("CCOMCRYPT Lib.CCrypt")

I get an "Server.CreateO bject 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.CCry pt" 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.Createob ject("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.C reateHash').

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 2207
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
2871
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" onclick="show(this)">111111</li>
1
1574
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 is not executed, and when the form is opened (it is, but without triggering any LOAD event) I try to click on any button, It gets a message like "Access cannot communicate with ActiveX server, bla, bla..."
12
3006
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 create a client side object set some properties and have it run some code. I know that in VB6/asp it was fairly straight forward by creating an ActiveX control, register it and then VBScripting the CreateObject("xxx.xxxx") command and it worked...
10
4030
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 application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms, remove the controls on each of them, and then close the form, but this code should execute only...
5
5972
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) for it. We use this control on an ASP page. We put the CAB file for the AX control and VBRun60.CAB in the same folder with all the ASP files. When we call the ASP page using any machine with IE 6 SP2 (we tried it with multiple IE6 SP2...
19
2527
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 classes that are graphical contain a sprite object.
0
1421
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 have a .NET custom control (DLL) called ActiveXDotNet.dll. I want to include this component into my ASP .NET (VB .NET). I have add the control into the Global Assembly Cache. At the same time, I
0
3284
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: http://www.codeproject.com/cs/miscctrl/htmlwincontrol.asp However, hardcoding the object in the HTML document itself isn't flexible enough for my purposes. What I would really like to be able
7
2127
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) type as in "template <typename T>" or "template <class T>" 2) non-type as in "template <int N>" 3) class template as in "template <template<typenameclass C>" "
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10485
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10252
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7565
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.