• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Camfrog CTreeViewTS chat member list

#1
I'm stumped. I've been trying to get a list of the chatroom members from a Camfrog chatroom for over a week now, to no avail. Any help is appreciated!

'''' VB.NET ''''
Code:
System.Runtime.InteropServices.DllImport("user32.dll", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)>
Private Shared Function FindWindowEx(ByVal parentHandle As IntPtr, ByVal childAfter As IntPtr, ByVal lclassName As String, ByVal windowTitle As String) As IntPtr
End Function

Declare Auto Function FindWindow Lib "user32.dll" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

find objects starting with public lobby chatroom. The title may need to be changed to get the first hWnd.
Dim hWnd As IntPtr = FindWindow("#32770", "Camfrog: Video Chat Room") '
If hWnd = 0 Then
MsgBox("The video chat room does not exist.")
End
End If
Dim hwndObject0 As Long = FindWindowEx(hWnd, IntPtr.Zero, "#32770", "")
Dim hwndObject1 As Long = FindWindowEx(hWnd, hwndObject0, "#32770", "")
Dim hwndObject2 As Long = FindWindowEx(hWnd, hwndObject1, "#32770", "")
Dim hwndObject3 As Long = FindWindowEx(hwndObject2, IntPtr.Zero, "CSplitterCtrlsTS", "")
Dim hwndObject4 As Long = FindWindowEx(hwndObject3, IntPtr.Zero, "CSplitterCtrlsTS", "")
Dim ListhWnd As Long = FindWindowEx(hwndObject4, IntPtr.Zero, "CTreeViewTS", "") 'Here is the TreeView.

  Reply
#2
Instead of getting the list of CSplitterCtrlsTS in CF, refer to its real-time counting @ the top of the users list in a room
  Reply
#3
Your code above is not enough. You need a custom Treeview class or module. I am a bit busy right now to create one. See if you can create your own or find one out there.
  Reply
#4
i'm currently working on this. stay tuned. Smile
  Reply
#5
Code:
Private Function GetTreeviewHandlesFrom(ByVal hwnd As IntPtr) As List(Of IntPtr)
        TVList.Clear()
        EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
        Return TVList
    End Function

    Private Function EnumChildWindowProc(ByVal hwnd As IntPtr, ByVal lParam As Integer) As Integer
        Dim cn As New StringBuilder(255)
        GetClassNameW(hwnd, cn, 255)
        If cn.ToString.ToLower.ToLower.Contains("systreeview32") Then 'Make sure the child window is a Treeview before adding its handle to the List
            TVList.Add(hwnd)
        End If
        Return 1
    End Function

    <DllImport("user32.dll", EntryPoint:="FindWindowW")> _
    Private Shared Function FindWindowW(<MarshalAs(UnmanagedType.LPTStr)> ByVal lpClassName As String, <MarshalAs(UnmanagedType.LPTStr)> ByVal lpWindowName As String) As IntPtr
    End Function

    <DllImport("user32.dll", EntryPoint:="GetClassNameW")> _
    Private Shared Function GetClassNameW(ByVal hWnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer) As Integer
    End Function

    Private Delegate Function EnumCallBackDelegate(ByVal hwnd As IntPtr, ByVal lParam As Integer) As Integer

    <DllImport("user32.dll", EntryPoint:="EnumChildWindows")> _
    Private Shared Function EnumChildWindows(ByVal hWndParent As System.IntPtr, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As <MarshalAs(UnmanagedType.Bool)> Boolean
    End Function

  Reply
#6
https://social.msdn.microsoft.com/Forums...=vbgeneral
  Reply


Related Threads
Thread Author Replies Views Last Post
  Camfrog Op Tool Source Code locohacker 1 46 01-28-2019, 05:09 AM
Last Post: jmes
  Camfrog BOT .NET Source locohacker 0 41 04-02-2016, 02:21 AM
Last Post: locohacker
  Camfrog Send Text String 0 42 04-17-2012, 09:58 PM
Last Post: String
  Pal friend list to textbox VB6 String 10 63 05-20-2011, 12:42 AM
Last Post: method
  Anyone being successful with pal list in VB 6.0? locohacker 5 34 10-06-2010, 01:48 AM
Last Post: String

Forum Jump:


Users browsing this thread: 1 Guest(s)