Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 1st, 2006, 08:52 AM
Athono Athono is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 54 Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 1 m 27 sec
Reputation Power: 4
Passing Variable List Arguments

I have pretty much figured out how to pass variables to and from VB and C++ programs. Now I need to do the same for Variable List Arguments (where you have those elipses... in the argument list.

This seems to be a whole lot trickier and takes things to another level of complexity.

Does anyone have any ideas?

Variable List Arguments are described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_va_arg.2c_.va_end.2c_.va_start.asp

Reply With Quote
  #2  
Old March 1st, 2006, 09:47 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,747 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 43 m 27 sec
Reputation Power: 1914
as far as I know, use void* in C++ to pass and get variable list argument.

Reply With Quote
  #3  
Old March 1st, 2006, 12:12 PM
Athono Athono is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 54 Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level)Athono User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 1 m 27 sec
Reputation Power: 4
Quote:
Originally Posted by Shadow Wizard
as far as I know, use void* in C++ to pass and get variable list argument.


In C you can declare a function like this
int average( int first, ... )
Where the ellipses denote a variable argument list.
If I have a function like that in a c++ DLL and I want to link a Visual Basic GUI to it, how would that function be declared in the Visual Basic program.

The Visual Basic 6 text I have talks about something called Optional Variant but it looks like it will only apply for one variable and not a list of unknown variables.

Reply With Quote
  #4  
Old March 1st, 2006, 03:16 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,747 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1Folding Points: 379399 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 43 m 27 sec
Reputation Power: 1914
the answer is probably here:
http://msdn.microsoft.com/library/d...oprocedures.asp
under "Using an Indefinite Number of Arguments".

Last edited by Shadow Wizard : March 1st, 2006 at 03:35 PM.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Passing Variable List Arguments


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT