Go Back   Velocity Reviews > Newsgroups > MCSD
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

MCSD - Q: How can I pass UDTs into optional parameters in VB 6.0 ?

 
Thread Tools Search this Thread
Old 10-21-2003, 06:00 PM   #1
Default Q: How can I pass UDTs into optional parameters in VB 6.0 ?


I know VB does not allow passing UDTs as optional
parameters. One of my friends is looking for a workaround,
if possible. I will appreciate if anyone provides the
solution.




Ramesh
  Reply With Quote
Old 10-21-2003, 08:58 PM   #2
Kline Sphere
 
Posts: n/a
Default Re: Q: How can I pass UDTs into optional parameters in VB 6.0 ?
>I know VB does not allow passing UDTs as optional
>parameters. One of my friends is looking for a workaround,
>if possible. I will appreciate if anyone provides the
>solution.
>


If the udt is declared as part of a com class, it can be passed to
routines, although the parameter type in the routine signature must be
declared as a variant.

If not you have two options.

1 - Pass in a pointer to the udt and use the copymemory, movememory
etc api's to manipulate the udt - another reason why vb is crap.

2 - Simple use a class instead of a udt - easy.


Kline Sphere
  Reply With Quote
Old 10-22-2003, 03:12 AM   #3
Jaime
 
Posts: n/a
Default Re: How can I pass UDTs into optional parameters in VB 6.0 ?
omg a real question, thank you.
"Ramesh" <> wrote in message
news:02be01c397f4$df2dc900$...
> I know VB does not allow passing UDTs as optional
> parameters. One of my friends is looking for a workaround,
> if possible. I will appreciate if anyone provides the
> solution.
>
>





Jaime
  Reply With Quote
Old 10-22-2003, 07:22 PM   #4
Kline Sphere
 
Posts: n/a
Default Re: How can I pass UDTs into optional parameters in VB 6.0 ?
>omg a real question, thank you.

Although somewhat off topic, but still......


Kline Sphere
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure the compiler to write output classes-and pass parameters to JVM staticy2003 General Help Related Topics 0 02-24-2008 06:43 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46