Getting UDT's in VBScript 
Author Message
 Getting UDT's in VBScript

I've written an ActiveX DLL that I use in VB apps.  It uses a Property Get
statement to return a User Defined Data Type array.  I'm trying to use these
DLLs to return information to my web page.  Since VB Script treats
everything as variants, am I able to get this data into my web page or am I
going to have to change from UDT's to simply using regular multi-dimensional
arrays?

I haven't been able to get the UDT's to work but don't want to have to
re-write my com object to return standard arrays instead of my User Defined
Type array.

Any insight would be most appreciated.  Please reply to the newsgroup as

Thanks,

John Granade



Mon, 16 Jul 2001 03:00:00 GMT  
 Getting UDT's in VBScript
Hi John,


Quote:
>I haven't been able to get the UDT's to work but don't want to have to
>re-write my com object to return standard arrays instead of my User Defined
>Type array.

I'd recommend that you return an object that exposes the properties that
were part of your UDT, rather than an array. This way, for example,
statement completion will work in VisualStudio.

It would also work just as well in VB (and other COM consumers) as it does
in Script, and you'd get type safety, etc. (depending on what language you
are using) that you just wouldn't get with an array of Variants. You could
also make the properties read-only (if you wanted), add some methods, you
know the deal.

Peter

--
Peter Torr, Developer / Webmaster, Vantage Systems Australia.



Sat, 21 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting UDT's in VBScript

2. UDT's in VBScript

3. Objects, UDT's and variants

4. UDT's and DLL's

5. Help with UDT - Converting a UDT to a string Variable

6. Help with UDT - Converting a UDT to a string Variable

7. UDT to ByteArray and back to UDT

8. Consuming webservice with UDT's

9. Determining available properties of objects and UDT's

10. Array of UDT's to disk and back

11. Passing UDT's between Control & Client

12. Passing arrays of UDT's from VB to C

 

 
Powered by phpBB® Forum Software