Insert an item into syslistview32?

Posted on 2005-05-07
Last Modified: 2010-10-05
I injected Plugin.dll into target.exe and got the handle of its syslistview32 component. All I want to do is to insert an item into the syslistview32. Well, I tried ListView_InsertItem function and succeeded to insert an item and its subitems (The value of ListView_GetItemCount increases). But it seems that target.exe doesn't know the insert event. When I make a double click on an item, an edit dialog should pop up, but when I click on the new item inserted by plugin.dll, it raises an error-"Please choose an item".

The style of this syslistview32 is LVS_OWNERDRAWFIXED.

Can anyone help me? Thanks very much.
Question by:klemperer
    1 Comment
    LVL 33

    Accepted Solution

    I hope that someone can give you the correct code to solve your problem?
    But if you are hacking into another programs process, and hope to use it's control like an syslistview32 that is LVS_OWNERDRAWFIXED then you may have a difficult time of it, if you do not know the coding methods that are used for the owner draw aspects of the list view and the internal code that the process uses to handle double clicks, as you have said -
    " it seems that target.exe doesn't know the insert event"

    because you have not added the data so it knows that you inserted an item, an this data may not be part of the list view "Item" data that you send in the ListView_InsertItem function. . . . .

    there is likely an array of some type or list view Item pointer reference that gives the process the information it uses for a Double click event popup and other list view item functions that use information from the list view item, if you do a List View with a double click event then you will have to have an information storage (pointer, array, variable) for the text or other data to use in that event

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now