Component Fails When Used Within ASP

Component Fails When Used Within ASP

I am working on system that is built from many pieces, but they all use certain common settings. I developed a simple ActiveX DLL that reads those settings from the registry. The system works nicely in Windows 95. It also works fine in Windows NT 4 when I use this DLL within some executable, but it fails in NT when I use this DLL within Active Server Pages, which are also part of my project. The object is initialized correctly, but as soon as I invoke a method that reads registry settings it fails. Why does this component behave differently within standard EXE and ASP?

I have a few suspicions, though no definitive answers. You may want to check the following areas:

  1. Are all of the components ActiveX DLLs? It sounds like they are from your description, but you should check to insure that.
  2. How are you invoking the components? You should insure that you have both a program/project and a class ID (myComponent.myInterface) for your class.
  3. What are you using as your deployment language for ASP? Note that JavaScript does not have a CreateObject() function?it has an ActiveXObject() function instead, and must be preceded with a New keyword:
    var myObj=new ActiveXObject("myComponent.myInterface");
  4. If you are using VBScript, the syntax is different:
    dim myObjset myObj=CreateObject("myComponent.myInterface")
  5. The fact that your object is initializing correctly (although you should test that assertion thoroughly) makes me more inclined to suspect that the area may lie within the DLL you’re creating. Did you use Visual Basic for the control, or VC++ ATL? If the latter, you may want to check to make sure that you’re exposing the proper automation interfaces. Also, you may want to look carefully at which platforms you’re working on?especially with regard to the registry, Windows 9x and Windows NT have different API calls. This problem is made worse by a difference in calls between Windows NT3, NT4, and the beta on NT5.

Without knowing more particulars, I’d check those areas first.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of