Armin Zingler said:
As you know, Sendmessage is a multi purpose function. The values
passed/returned is not always a pointer, it's a plattform specific
integer, which can be a pointer in one case or any other Integer value in
other cases. If you pass a structure containing fixed sized Integers, it
isn't plattform independet anymore, while an Intptr is. The problem in
VB.Net is that we can not do calculations with Intptrs whereas it can be
possible in other languages. For example see Herfried's declaration of
LONG_PTR: It's an __int64 or a long which can be used for calculations. In
most cases this isn't a problem because often Handles or pointers are
passed. 'Academia' now has the problem that the last two args of
SendMessage are IntPtr but he knows these are X- and Y- values without
knowing there size.
Academia, which message do you send? Is it a known (WM_* etc) or a user
defined message?
Armin
I there is one place where I use a user defined:
Private Const MY_MSG As Integer = WinH.WM_APP + &H230F
Everywhere else they come from some windows API h file.
They are all declared as Integer:
Public Const PFM_OFFSETINDENT As Integer = &H80000000
Maybe the should be defined as something else?
I'll repeate the problem below.
Thanks
Suppose SendMessage ends like this:
..., ByRef wParam As Integer, ByRef lParam As Integer) As IntPtr
and the call ends like this:
...,X,Y) 'X and Y are Integer
Because SendMessage returns X and Y.
If I change SendMessage to IntPtr's,
How do I change the call statement?