|
-
Feb 28th, 2026, 05:24 AM
#5
Thread Starter
Lively Member
Re: Why do you still use datatype Long for pointers?
 Originally Posted by gilman
I think there are two different problems:
1. Accessing 64-bits pointers in a 32-bit application, which is what theTrick is addressing in thread [vb6] Read pointer from a x64 process.
2. Creating applications that are compatible with both 32-bit and 64-bit architectures.
In case 1, which I believe is the reason for this new thread, it doesn't make sense to use the LongPtr enumeration, since it will remain 32-bit and won't be able to obtain the 64-bit value. An alternative to theTrick's solution, as proposed by Fafalone, is to switch to TwinBasic and compile in 64-bit.
Well - moreover what I am trying to say is: be expressive in what you want to achieve.
If you want to deal with pointers use the proper datatype, it is as simple as that! In our case we have the datatype LongPtr in VBA since 2007.
Could you consider a person who writes C or C++ and using datatype long or int for pointers, though it is possible? And what are we doing in VB6? We are still using datatype Long for pointers - ***
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|