Discussion Locked

ActiveX DLL failed to run in OL form

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have written an ActiveX DLL using VB6, compiled and located at my computer, but this DLL failed to run in my OL form. However, no problem arise if i put the DLL under MTS (which is located at my computer too). The error i got from OL form is something like " ... the DLL didn't register correctly, please run the program setup again ...". This DLL is running fine inside a VB EXE project, but i dunno why it can't run in OL form. The code which i used to create the DLL from OL as below.

Dim myObj
Set myObj = Item.Application.CreateObject("myDLL.myClassName")

8 replies

by kevin.riggs

What do you mean by "OL form"? If you mean OnLine form as in a form accessed over the Internet or Intranet then you will probably get errors consistent with what you posted.

by gbworld

My first thought is you moved the DLL but did not register on the server the app is running on. Then, you put it in MTS, which will register the component and it ran fine.

If you want to run it outside of MTS, get on the box and run regsvr32 against the component.

MTS is actually a better option with web apps, as it allows you to replace components without having to bring the web server down. You should add the objectcontrol and objectcontext to the component prior to putting it in MTS as you can put in pieces of code to help MTS manage the objects.

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

by ohjani

sorry, what i meant for OL form is actually Outlook Form. I'm the Owner of the form, I compiled the DLL on my computer and MTS is running is on my computer as well. I never moved the DLL, I'm using it to test on my application, thus I supposed OL form shouldn't have problem accessing the DLL since VB EXE can do it without any problem.

by rrv

creating DLL in VB directory will work in VB environment. copy the DLL into system32 directory and run regsvr32 path\Myfile.dll

then in VB tools you have a tool called Depends. open this registered dll file in it. it should expose all the functions in your dll. otherwise the dll cannot be use in any other system or application. in that case check how to export the functions in DLL from your class module.

All the best
rrv@hotvoice.com

This discussion is closed to new replies.