Jey
Jey

Reputation: 2127

VB Script code not calling c# function

I have created a C# dll and registerd as Com object. (Used ProgID, Set Comvisible True and Sign the assembly using Strong name).

I am trying to call c# method using the below vbscript code

Option Explicit 
Dim testwfhandler 
Set testwfhandler= CreateObject("CoreComponentWorkflow.WorkflowHandler") 
If Not testwfhandler Is Nothing Then     
Call testwfhandler.test()     
End If 
Set testwfhandler= Nothing 

am i missing anything? or am doing anything wrong?

The below is the registry informaton of my registered dll.

enter image description here

Upvotes: 2

Views: 371

Answers (1)

Chris Ballance
Chris Ballance

Reputation: 34357

Make sure you have set ComVisible to True for the C# assembly

Register the assembly using:

regasm /codebase YourAssembly.dll

Then call it as you have above.

Upvotes: 0

Related Questions