SendMessage API

  • Thread starter Thread starter JSK
  • Start date Start date
J

JSK

Hi,

As any one worked in VB.NET and made use of Sendmessage API?
The Issue I am running into is how to pass pointers of Data Structures (UDT)
to the SendMessage.
I starting looking at "IntPrt" as a data type but it appears to fall short
of using pointer types.
Any help or insight would be greatly appreciated.

Thank You
 
JSK said:
Hi,

As any one worked in VB.NET and made use of Sendmessage API?
The Issue I am running into is how to pass pointers of Data Structures (UDT)
to the SendMessage.
I starting looking at "IntPrt" as a data type but it appears to fall short
of using pointer types.
Any help or insight would be greatly appreciated.

Thank You

Well, you generally declare the parameter as ByRef ... As MyUDT. If you
have a specific example of what your trying to accomplish, I could be
more specific.

Tom Shelton
 
Hello,

JSK said:
As any one worked in VB.NET and made use of Sendmessage API?
The Issue I am running into is how to pass pointers of Data Structures (UDT)
to the SendMessage.
I starting looking at "IntPrt" as a data type but it appears to fall short
of using pointer types.

Please give us more details on which message you use. Maybe you whould pass
the structure by reference.
 
Hi JSK, For each data type you want to use in the lParam of SendMessage,
you'd declare an overload for it:

SendMessage(IntPtr, Integer, Integer, Integer)
SendMessage(IntPtr, Integer, Integer, String)
SendMessage(IntPtr, Integer, Integer, IntPtr)
SendMessage(IntPtr, Integer, Integer, MyStructure)
SendMessage(IntPtr, Integer, Integer, Integer)

Structures need to be passed ByRef

Please provide an example of your code.


--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"


:
: Hi,
:
: As any one worked in VB.NET and made use of Sendmessage API?
: The Issue I am running into is how to pass pointers of Data Structures
(UDT)
: to the SendMessage.
: I starting looking at "IntPrt" as a data type but it appears to fall short
: of using pointer types.
: Any help or insight would be greatly appreciated.
:
: Thank You
:
:
 
Back
Top