Hi Rick,
If you create a COM server with VB.NET, then a VBS script can use it
like any other COM server, e.g., instantiating it with
the CreateObject function. .NET will automatically marshall method
parameters and return values that are common data types like integers,
strings, and arrays into variant equivalents, and vice versa.
Jamal
On 3/10/2011 7:31 AM, RicksPlace wrote:
Hi: Has anyone called a DLL from a VBS script that runs under
Windoweyes? I ask because I am wondering about creating .net scripts,
registering them and then passing data to their functions, subs and
properties to use the .net classes of the .net framework. For example:
if I create a dll to work with a TreeView Control, I might be able to
pass parameters to the methods, properties etc... of the .net TreeView
and return non-typed data from it if I can define such data in VB.net or
C#.net. One dll per advanced, managed UI control or other objects might
give me the ability to use the .net objects. The caviot is that passing
data back and forth might be a problem if there is no varient equivlant
in VB.net or C#.net. That might throw a damper on this idea. Has anyone
used a dll from within a Windoweyes vbs script? And, or, has anyone
passed non-variant data between a vbs script app and a dll or other
program? The question here would be if their is some way to convert
variant and non-variant data back and forth somehow.
That is where I start to get confused since I'm not sure if that can be
done between VB.net and VBS.
Well, this is just another thought while I take Chip's classes and read
up on VBS and all that jazz.
Rick USA