Link to home
Start Free TrialLog in
Avatar of Dean_Reedy
Dean_Reedy

asked on

Active X DLL, calling from server

I have written a simple Active X Dll and would like to store it on a local server.

If the DLL is Stored on the Client,this code works:

DLL:

Function MakeBig(Value As String) As String
MakeBig = UCase(Value)
End Function

After making reference to DLL:

Dim Test As Project1.Class1
Private Sub Form_Load()
Dim bb As String
Set Test = New Project1.Class1
bb = Test.MakeBig("Reedy")
End Sub


I want to call it on the server and making a reference to the dll isn't what I need.

I have tried, but this doesn't work:

Declare Function makebig Lib "d:\Dll\Test.dll" (x As String) As String


bb = makebig("Reedy")


Error: Can't find dll entry point makebig in "C:\Dll\Test.Dll"


I want the dll on the server for when changes needed, it's easier to update!


Avatar of manojamin
manojamin

I don't think you can call VB dll function as simple dll function. I think what you are looking for is DCOM.


Read this, it will help you...

http://www.vb2themax.com/books/vbcom/dcom_2.asp

To understand all about DCOM read this,

http://www.vb2themax.com/books/vbcom/dcom_1.asp
I think you have to make a typelib for your client in
Project Properties|Component because you are using a remote dll

Then you reference this typelib
and set up Remote automation

Declaring a function is only for C/C++ like DLL's (these export their functions, VB ActiveX's do not)
To run it on a server it needs to be an activex exe methinks.
ASKER CERTIFIED SOLUTION
Avatar of Gordonp
Gordonp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dean_Reedy

ASKER

Thanks again!
Time to learn DCOM!!!!
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed.  Also a question is posted there specific to these changes that apply to the experts here.  Also, I am including the link to our All Topics, since many new ones have recently been added.

https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange