Hi Rick:
If you are creating classes to consume from com, it might be worth reading up 
on .net attributes and interop as they apply to com:
http://msdn.microsoft.com/en-us/library/kew41ycz(v=vs.71).aspx
should be a good starting point.
Hth
Sean.
-----Original Message-----
From: RicksPlace [mailto:ofbgm...@mi.rr.com] 
Sent: 10 March 2011 14:13
To: gw-scripting@gwmicro.com
Subject: Re: Calling DLL From VBS

Hi Jamal: That is good news! I am looking at how to create a Interop Dll in 
VB.net express 2008. Googling says the checkbox for making the Class Library a 
Visible COM object is not there in Express but I just slogged to the properties 
window and one of the dialogs in that window and I saw the Com Visible check 
box and checked it and it seemed to take. I just closed the Class Library 
project at that point since it was a shocker to see that option available after 
reading all the Google postings that it was not there in the Express modules. 
That and the fact that I know very little, never created or even read up on 
class libraries yet or using Interop from vbs.
Anyway, it sounds cool if not too time consuming to create the Library Classes.
Later Jamal...
Rick USA

----- Original Message -----
From: "Jamal Mazrui" <empo...@smart.net>
To: <gw-scripting@gwmicro.com>
Cc: "RicksPlace" <ofbgm...@mi.rr.com>
Sent: Thursday, March 10, 2011 8:57 AM
Subject: Re: Calling DLL From VBS


> 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 

Reply via email to