Skip to content

nickget pal build 485

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #186677
    light 2012
    Member

    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

     

    #186688
    light 2012
    Member

    I upload an example

    #186687
    Chike
    Member

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

    #186686
    light 2012
    Member

    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

    #186685
    autopilot
    Member

    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.

    #186684
    Chike
    Member

    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

     

    #186683
    light 2012
    Member

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

    #186682
    Chike
    Member

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

    #186681
    light 2012
    Member

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

    #186680
    Chike
    Member

    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.

    #186679
    autopilot
    Member

    @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.

    #186678
    Chike
    Member

    @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

     

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.