Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

How to use DLL on server.

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
koeke
Asked:
koeke
  • 2
  • 2
  • 2
  • +1
1 Solution
 
e-DiddyCommented:
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
 
RanaHossainCommented:
'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
 
RanaHossainCommented:
'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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
merphieCommented:
Keep in mind also that on Win2000 everything runs in MTS (or renamed to Component Services)
0
 
koekeAuthor Commented:
Merphie,
Does this mean that i always have to create an objectcontext?
0
 
merphieCommented:
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
 
koekeAuthor Commented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now