views:

106

answers:

2

I have two computer PC1 and PC2

In PC1 I have a .Net C# dll file that provides operations on SQL Server database.

My question is - "how can I use this dll file on PC2 through VBScript within Outlook 2003".

I tried this same task on PC1 and I succeeded using the CreateObject("dllfilename.classname") method of VBScript within outlook 2003.

But now I want to use that dll file on PC2.

Is there any efficient way by which I can use that dll on PC2 without having to copy dll on PC2.

A: 

There isn't really a seamless way to do this. You could expose the assembly (DLL) on PC2 as a web service using WCF. Then write a .Net proxy client to run on PC1 and expose that client via COM interop so that the VBScript can call it.

Marcelo Cantos
A: 

No, there isn't an efficient way to use a dll located on another machine through VBScript. VBScript is using COM to instantiate objects, so "dllfilename.classname" has to registered in the registry of the machine where the script is executing. It might be possible to register a UNC (network) path to the dll though, but then you would in any case need the registry modifications on PC2.

Can you be a bit more specific on why you don't wan to copy the DLL? More details will make it easier to provide good answers.

Anders Abel