?
Solved

How to use DLL on server.

Posted on 2003-02-26
7
Medium Priority
?
182 Views
Last Modified: 2010-05-01
I want to get information through a dll which is located on the server.
If possible don't use MTS.

For example :

Servername = "Server140"
DLL name = Club001C
Class name = "clsclub"
Method name = "openform"

My code is  :
    Dim vObj As Object
    dim vobjresult as boolean
    Set vObj = CreateObject("Club001C.clsclub")
    vobjResult = vObj.openform()
    Set vObj = Nothing

How do i have to fit in the servername. I tried allready some things but I got the errormessage  'Active X can't create object'

I think this is not such a difficult question for people who are experienced with VB.

Kind regards,
K.
0
Comment
Question by:koeke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Expert Comment

by:e-Diddy
ID: 8026642
Two things to try...
Of course register on the server with RegServ32 <path to dll>

Open Project..References...and browse to the Server and find the .dll and reference it that way also...

0
 
LVL 4

Expert Comment

by:RanaHossain
ID: 8027752
'Active X can't create object' - means
a) either the component is not registered,
b) wrong name.

once solved, you might right into another... not right permission. In which case allow IIS_USER AND IIS_MACHINE to access the dll.
0
 
LVL 4

Expert Comment

by:RanaHossain
ID: 8027764
'Active X can't create object' - means
a) either the component is not registered,
b) wrong name.

once solved, you might right into another... not right permission. In which case allow IIS_USER AND IIS_MACHINE to access the dll.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:merphie
ID: 8027866
Keep in mind also that on Win2000 everything runs in MTS (or renamed to Component Services)
0
 

Author Comment

by:koeke
ID: 8031753
Merphie,
Does this mean that i always have to create an objectcontext?
0
 

Accepted Solution

by:
merphie earned 200 total points
ID: 8033919
No,  It just means that everything runs through MTS.   Even if your Regsvr the DLL on the server it actually runs in the OutofProcess Application in Component Services.  

Just pointing out a fact.   It basically means you need to write all DLL's as if they were running in Component services.     (On Windows 2000)

I have never really ran a DLL from another server.   I have never found the need.    But the error could be a lot of things.     It's a general error.    Have you determined if any code in your DLL runs at all?    I ask because it could be running something in the function.

However according to MSDN the function is used by.

CreateObject(servername.typename [, location])

So it would be more like this.

Set vObj = CreateObject("Club001C.clsclub", "server140")

If the DLL is on another server you must specify that in the parameters.
0
 

Author Comment

by:koeke
ID: 8034317
Merphie,
This is just what I needed to know. I knew the solution was rather easy. My DLL was oke, it ran on my local puter but now I was looking for a system to put all the dll's on a server so they won't have any influence on the performance of my own pc. On professional behalve I was tought to put them on a server, but I never did it while I was only developing them and not implementating them until now. Anyway, thanks a lot for the information.
Kind regards,
K.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question