By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,163 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,163 IT Pros & Developers. It's quick & easy.

SendMessage API

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
JSK wrote:
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

Nov 20 '05 #2

P: n/a
Hello,

"JSK" <ji*@tesecinc.com> schrieb:
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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
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'"
"JSK" <ji*@tesecinc.com> wrote in message
news:3e*****************@newssvr33.news.prodigy.co m...
:
: 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
:
:
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.