aaaron123@roadrunner.com
Well-known member
- Joined
- Jan 23, 2011
- Messages
- 179
- Programming Experience
- 10+
VB.NET:
Public Declare Auto Function SendMessage Lib "user32.dll" (hWnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr) As IntPtr
Public Declare Auto Function SendMessage Lib "user32.dll" (hWnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As Integer) As IntPtr
This is old 32-bit code that still works with 64-bits.
But since integer and IntPtr are equal in size only at 32 bits and not at 64 bits I wonder why.
Integers and floating-point numbers, are blittable and do not require marshalling.
I have not been able to learn the default marshalling of Intptr.
Can you explain why passing a 32-bit and a 64-bit both work?
I would like to have only one declare and compensate at the calls.
Can you suggest which would be the better choice?