nickget pal build 485

This topic contains 11 replies, has 3 voices, and was last updated by  Chike 6 years, 4 months ago.

  • Author
    Posts
    1 Star2 Stars3 Stars4 Stars5 Stars Rate it First!
  • #15219
    Member
    Posts: 62

    this code don’t work with pal build 485 ,why?

    Private Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As String) As Long
    Dim strCaption As String
    Dim lLen As Long
    Dim syslistview As Long, cwndmembertree As Long
    Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long
    Dim atlaae As Long, atlaaed As Long
    dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text)
    splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString)
    atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString)
    atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString)
    hWndlvw = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString)
    
    ' If we've found a window with the SysListView32 class
    ' check to see if parent window caption is the one we are looking for
    If hWndlvw <> 0 Then
    lLen = GetWindowTextLength(hwnd)
    If lLen > 0 Then
    strCaption = Space(lLen)
    GetWindowText hwnd, strCaption, lLen + 1
    End If
    End If
    EnumWindowsProc = (hWndlvw = 0 And strCaption <> lParam)
    End Function

    and

    Function NickGet()
    
    Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long
    Dim atlaae As Long, atlaaed As Long, syslistview As Long
    dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text)
    splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString)
    classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString)
    atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString)
    atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString)
    atlaaed = GetWindow(atlaaed, GW_CHILD)
    syslistview = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString)
    Call GetListviewItem(syslistview)
    End Function

     

    #38259
    Member
    Posts: 62

    I upload an example

    #38260
    Administrator
    Posts: 1093

    And what you expect us do, debug it for you?
    Which of the lines does not work exactly?

    #38261
    Member
    Posts: 62

    i don’t now
    i need to get highlight the nicks in paltalk listview
    i couldn’t modify my old code which was for paltalk 10.2 build 474
    i used PAT or JK’s to find the code but not work

    #38257
    Administrator
    Posts: 432

    Your spy screen shot sows the class as ATL:00A1AED0 yet in your code you are still trying to get a handle for a syslistview32.

    #38258
    Administrator
    Posts: 1093

    You seem not to understand, people here are not going to debug your code, you need to do it by yourself.

    Anyway as I have said, you will keep running after your tail every little change they will make.
    The following code works, and will continue to work as long there is one SysListView32 window in the group window.
    I am not sure about marshalling so left it without any.
    GetRoomNamesList takes the room handle as input and returns the handle to the SysListView32

    Public Delegate Function EnumWChildindowaProc(ByVal Handle As IntPtr, ByRef Parameter As Integer) As Boolean
    
    Public Declare Auto Function EnumChildWindows Lib "User32.dll" _
    (ByVal hwnd As IntPtr, ByVal Callback As EnumWChildindowaProc, ByRef lParam As Integer) As Boolean
    
    Private Declare Auto Function RealGetWindowClass Lib "User32.dll" _
    (hwnd As Integer, pszType As StringBuilder, ByVal cchType As UInteger) As Integer
    
    Function NamesListEnumProc(ByVal hWnd As IntPtr, ByRef lParam As Integer) As Boolean
    Dim buffer As StringBuilder = New StringBuilder(128)
    buffer.Length = RealGetWindowClass(hWnd, buffer, 128)
    If (buffer.Length > 0) And (buffer.ToString = "SysListView32") Then
    lParam = hWnd
    Return False
    End If
    
    Return True
    End Function
    
    Public Function GetRoomNamesList(ByVal hWndRoom As IntPtr) As Integer
    Dim result As Integer = 0
    EnumChildWindows(hWndRoom, AddressOf NamesListEnumProc, result)
    Return result
    End Function

     

    #38262
    Member
    Posts: 62

    I found the problem in my code and solved it 🙂
    thanks autopilot and chike

    #38263
    Administrator
    Posts: 1093

    You will have another tomorrow.
    Get rid of the problems alltogether. That code would work on any still working paltalk version.

    #38264
    Member
    Posts: 62

    How can I get nick without using PAT or JK’s api spy?

    #38265
    Administrator
    Posts: 1093

    I just showed you how.
    The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.

    #38266
    Administrator
    Posts: 432

    @chike wrote:

    I just showed you how.
    The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.

    in the most current version they have wrapped the syslistview32 into an ATL control. even though it is wrapped in an ATL, you can still read and select the same way as before. just need to use the new control name to fine the handle.

    #38267
    Administrator
    Posts: 1093

    @autopilot wrote:

    @chike wrote:

    I just showed you how.
    The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.

    in the most current version they have wrapped the syslistview32 into an ATL control. even though it is wrapped in an ATL, you can still read and select the same way as before. just need to use the new control name to fine the handle.

    Yes luckily it still function as SysListView32.
    So quick change and the code should work on both this version and previous.
    I also made some changes for a bit better efficiency

    Private Declare Auto Function GetParent Lib "User32.dll" _
    (hWnd As Integer) As Integer
    
    Function NamesListEnumProc(ByVal hWnd As IntPtr, ByRef lParam As Integer) As Boolean
    Static SysHeader32 As New String("SysHeader32")
    Static buffer As StringBuilder = New StringBuilder(128)
    buffer.Length = RealGetWindowClass(hWnd, buffer, 128)
    REM Console.WriteLine(buffer.ToString())
    If (buffer.Length > 0) And (String.CompareOrdinal(buffer.ToString(), SysHeader32) = 0) Then
    lParam = GetParent(hWnd)
    Return False
    End If

     

You must be logged in to reply to this topic.