SysListView32 LVM_Getitemtext Crashes when external listview handle is read

Posted on 2005-04-16
Last Modified: 2013-12-26

When I try to read the text of the External listview handle, the external application crashes.

My Code is

          Dim LI As LV_ITEM
          LI.mask = &H1
          LI.iSubItem = 0
          LI.cchTextMax = 26000
          LI.pszText = Space$(26000)
          Call SendMessage(h, LVM_GETITEMTEXT, i&, LI)
          MsgBox LI.pszText

Please give me the correct code to overcome this problem

Question by:VIMALCHAND
    1 Comment
    LVL 32

    Accepted Solution

    There are few people in the world who know how to do this properly in VB. Ark is one of them--

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now