Pointers with VB 
Author Message
 Pointers with VB

I play around with VB every so often on a university computer, but don't
really use it for any useful programing.

The main reason for this is that VB does not have any support for
pointers. Has this been added to VB 5.0 or is it likely to ever be added
at all? I would probably bother to buy it if it did - I hate using
inefficient kludges to build various data struictures.

Kris Sheglova



Sun, 25 Mar 2001 03:00:00 GMT  
 Pointers with VB
Hi

I guess you like to play or you are still in the middle ages

Look for objPtr VarPtr and StrPtr.

bye



Quote:
>I play around with VB every so often on a university computer, but don't
>really use it for any useful programing.

>The main reason for this is that VB does not have any support for
>pointers. Has this been added to VB 5.0 or is it likely to ever be added
>at all? I would probably bother to buy it if it did - I hate using
>inefficient kludges to build various data struictures.

>Kris Sheglova




Mon, 26 Mar 2001 03:00:00 GMT  
 Pointers with VB
Kris, VB has no support for pointers (other than AddressOf for functions as
a special case) and you can guarantee it will never support pointers as
such.

But you can use it to build and reference data structures nevertheless --
user-defined-types are (misnamed) structures, and variants can hold arrays
of arrays of arrays of variants and objects.

But you might want to check out J++ -- perhaps that might suit your style
better.

Bertie


Quote:
>I play around with VB every so often on a university computer, but don't
>really use it for any useful programing.

>The main reason for this is that VB does not have any support for
>pointers. Has this been added to VB 5.0 or is it likely to ever be added
>at all? I would probably bother to buy it if it did - I hate using
>inefficient kludges to build various data struictures.

>Kris Sheglova




Tue, 27 Mar 2001 03:00:00 GMT  
 Pointers with VB
Kris...

Quote:
>The main reason for this is that VB does not have any support for
>pointers. Has this been added to VB 5.0 or is it likely to ever be added
>at all?

VB has limited pointer support, and you can get around just about anything
that it doesn't want you to do. Use the VarPtr, StrPtr, and ObjPtr functions
to obtain pointers to variables, and the AddressOf operator to get the
address of a public procedure.
As for *accessing* a variable or object that's being pointed *to*, it can be
done with the RtlMoveMemory API call, more commonly known as CopyMemory.

--
Ben Baird, MVP
Visual Basic Thunder 3.0
http://www.{*filter*}highway.com/~psy/vbthunder/
Common Controls Replacement Project
http://www.*-*-*.com/
Please keep your questions on the newsgroups.



Tue, 27 Mar 2001 03:00:00 GMT  
 Pointers with VB
Visual Basic 5.0 had 3 undocumented functions that dealt with pointers. They
are VarPtr, StrPtr, and ObjPtr. These return the pointer to the spefic
variable/string/object. Just send it the name as a parameter and it will
return to you the address in memory where it is stored. VB also has the
AddressOf function that gets the address of a public procedure. AddressOf is
located in the Help file so you can get help for it their. Good Luck

Thank You
Farshad Hemmati


Quote:
>I play around with VB every so often on a university computer, but don't
>really use it for any useful programing.

>The main reason for this is that VB does not have any support for
>pointers. Has this been added to VB 5.0 or is it likely to ever be added
>at all? I would probably bother to buy it if it did - I hate using
>inefficient kludges to build various data struictures.

>Kris Sheglova




Tue, 27 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to use pointer and the pointer of pointedness pointer in vb

2. How to use pointer and the pointer of pointedness pointer in vb

3. How to use pointer and the pointer of pointedness pointer in vb

4. How to use pointer and the pointer of pointedness pointer in vb

5. How to use pointer and the pointer of pointedness pointer in vb

6. assigning a returned pointer to a pointer in VB

7. pointers to pointers in VB?

8. VB.NET comes as close to having pointers as VB ever has

9. Pointers in VB(Access 2.0 ->97)

10. Pointers in VB. NET

11. Pointers in VB.NET

12. Is there any pointer in VB?

 

 
Powered by phpBB® Forum Software