- This topic has 35 replies, 6 voices, and was last updated 16 years ago by autopilot.
-
AuthorPosts
-
March 3, 2008 at 4:19 am #187760DepartureMember
Reading this should help you
To bad your not coding in delphi because I have written an excellent little program that demonstates getting the systemlistview32 handel and items thanks to nanomachine for his example, and a another little fuction I wrote to get any handel of any window even if there are more than 1 instant of a control by using EnumChildProc which is very fast when coded correctly
March 3, 2008 at 6:09 am #187759ChikeMemberFirst of all I think you must use Long instead of integer. SendMessage integers’ are 32 bit and basic integer is 16 bit (not completely sure, but be safer to use Long.)
Second, you have the code you need just few posts before yours, look at MessageCrossProcess.
For your own process you can use VarPtr that to get the structure address, or declare another variant of send message to take lParam as Ref. However sending those messages to paltalk involves more than that. You need to allocate the structure in paltalk address space, and this code does it.
As for how to declare the LVITEM structure try to look at the attachment in this post.March 4, 2008 at 3:00 am #187758IMAFriendMember@Chike wrote:
First of all I think you must use Long instead of integer. SendMessage integers’ are 32 bit and basic integer is 16 bit (not completely sure, but be safer to use Long.)
vb.net variables of integer are 32 bit now. I’ll double check to make sure I’ve got 32 bits going into the sendmessage.
@Chike wrote:
Second, you have the code you need just few posts before yours, look at MessageCrossProcess.
@Chike wrote:
For your own process you can use VarPtr that to get the structure address, or declare another variant of send message to take lParam as Ref.
I’ll look at both these a bit closer. I’ve looked at so many files and samples and trying to update to the net stuff is a pain, I wish I had vb6 again. delegates and ‘as any’ and integers, oh my.
@Chike wrote:
However sending those messages to paltalk involves more than that. You need to allocate the structure in paltalk address space, and this code does it.
Okay, I am able to get the handle to the syslistview32, and with that handle I can get the Count, and I can run the scroll up and down. But to read the contents I need to dive deeper into the paltalk address space, right? I’ll review the code some more to work on that next.
@Chike wrote:
As for how to declare the LVITEM structure try to look at the attachment in this post.
Got that part taken care of.
Thanks bunches for the patience with me. I have a good app that I have in mind. Maybe not useful to many people, but useful to me and a few friends. So this is a good learning session for me. Just gotta keep working it til that light above my head turns on. 💡
March 4, 2008 at 5:39 am #187757DepartureMemberbut getting the count and actually getting the items is 2 diffrent things as chike said you have to look at memory cross process or what ever he called it.
the way it done in delphi and vb6 if I remeber correctly is open process then allocate memory then fill the memory with size then get the text and put it into our allocated memory ect…
ect… then write it to our listbox or what everMarch 4, 2008 at 2:48 pm #187756autopilotMemberMost of this thread is VB6 spacific. If you are using VB 2005, then try the attached module for learning how to interact with an external SysListView control.
March 4, 2008 at 3:48 pm #187755ChikeMember@autopilot wrote:
Most of this thread is VB6 spacific. If you are using VB 2005, then try the attached module for learning how to interact with an external SysListView control.
I think there’s a function to create a string from array of bytes instead the loops, probably much more efficient, I don’t know how you cast the buffer to that type in basic.
Also, I believe calling Trim is redundant. -
AuthorPosts
Related
- You must be logged in to reply to this topic.