Computer Science Canada pointes in VB |
Author: | liangchenen [ Mon Oct 03, 2005 11:00 pm ] |
Post subject: | pointes in VB |
how to make a pointer in VB. Also, how do you pass by reference in VB? |
Author: | wtd [ Tue Oct 04, 2005 1:12 am ] | ||
Post subject: | |||
VB6 or VB.NET? For VB.NET, to pass by reference, you'd have something like:
Pointers you don't really have. |
Author: | Monstrosity_ [ Tue Oct 04, 2005 12:01 pm ] |
Post subject: | Re: pointes in VB |
liangchenen wrote: how to make a pointer in VB.
Also, how do you pass by reference in VB? In VB6 (not sure about .NET) there are three undocumented functions VarPtr: Gives the memory address of a variable StrPtr: Gives the memory address of the contents of a string ObjPtr: Gives the memory address of the object |
Author: | liangchenen [ Tue Oct 04, 2005 2:45 pm ] | ||
Post subject: | |||
what if I have something like this:
This is code in C++, in the function, I pass the pointer of the array num1[500] and num2[500] into the function, so, when I add a[500] and b[500], I am actually manipulate arrays num1 and num2. Can you show me how it is done in VB6.? thx a lot |
Author: | wtd [ Tue Oct 04, 2005 4:45 pm ] |
Post subject: | |
Google is your friend, as is MSDN. |
Author: | Monstrosity_ [ Tue Oct 04, 2005 7:48 pm ] |
Post subject: | |
liangchenen wrote: I pass the pointer of the array num1[500] and num2[500] into the function, so, when I add a[500] and b[500], I am actually manipulate arrays num1 and num2.
Can you show me how it is done in VB6.? thx a lot In this case you dont need to worry about pointers, just as wtd had mentioned earlier, look up how to pass by refrence instead of by value. |