I have a DLL (written in C#) containing a class with 2 Constructors; a default (no arguments) constructor, and another one with 3 arguments.
In VBscript, I want to call the second constructor, but CreateObject
only receives a classValue
parameter, no possible arguments
parameters.
I guess the underlying implementation of CreateObject
uses the system's CoCreateObject
function, which according to this answer does not support arguments, but on the other hand there's QTP/UFT's DotNetFactory
that is capable of such thing, so there must be a way to do it in pure VBscript.
(I want to avoid the obvious init
method solution if possible).
Any ideas for how to call my non-default constructor?