Skip to content

Get user status in pt room vb6 code source

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #188230

    seem no new prog for pt, I’ll show you how to get user status in pt room (version 9.0) and use your imagination to make new proggy

    copyleft nanomachine007 😆

    #188241
    Admin
    Administrator

    man you make the job so much easier Thanks 😆

    #188240
    Admin
    Administrator

    Nano if ya got time, how I go about getting the first user name isntead of all the users 🙂 I cant figure it out so far 😥

    #188239

    what do you mean, you wanna get the first nick in the room

    SendMessage(lstviewhwnd, LVM_GETITEMTEXT, 0, ByVal pMyItemMemory)

    #188238
    Admin
    Administrator

    yeps, i just want the first nick 🙂 ah where i put that ❓

    #188237

    here is that function to get the nick by position


    Public Function GetListviewItemByPos(ByVal lstviewhwnd As Long, ByVal item As Long) As String
    Dim result As Long
    Dim myItem As LV_ITEMA
    Dim pHandle As Long
    Dim pStrBufferMemory As Long
    Dim pMyItemMemory As Long
    Dim strBuffer() As Byte
    Dim index As Long
    Dim tmpString, tmp2 As String
    Dim strLength As Long
    Dim ProcessID As Long
    Dim ItemCount, i As Long

    '**********************
    'init the string buffer
    '**********************
    ReDim strBuffer(MAX_LVMSTRING)

    '***********************************************************
    'open a handle to the process and allocate the string buffer
    '***********************************************************
    Call GetWindowThreadProcessId(lstviewhwnd, ProcessID)
    pHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, ProcessID)
    pStrBufferMemory = VirtualAllocEx(pHandle, 0, MAX_LVMSTRING, MEM_COMMIT, PAGE_READWRITE)

    '************************************************************************************
    'initialize the local LV_ITEM structure
    'The myItem.iSubItem member is set to the index of the column that is being retrieved
    '************************************************************************************
    myItem.mask = LVIF_TEXT
    myItem.iSubItem = 2
    myItem.pszText = pStrBufferMemory
    myItem.cchTextMax = MAX_LVMSTRING

    '**********************************************************
    'write the structure into the remote process's memory space
    '**********************************************************
    pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem), MEM_COMMIT, PAGE_READWRITE)


    result = WriteProcessMemory(pHandle, pMyItemMemory, myItem, Len(myItem), 0)

    '*************************************************************
    'send the get the item message and write back the memory space
    '*************************************************************
    result = SendMessage(lstviewhwnd, LVM_GETITEMTEXT, item, ByVal pMyItemMemory)
    result = ReadProcessMemory(pHandle, pStrBufferMemory, strBuffer(0), MAX_LVMSTRING, 0)
    result = ReadProcessMemory(pHandle, pMyItemMemory, myItem, Len(myItem), 0)

    '**************************************************
    'turn the byte array into a string and send it back
    '**************************************************
    For index = LBound(strBuffer) To UBound(strBuffer)
    If Chr(strBuffer(index)) = vbNullChar Then Exit For
    tmpString = tmpString & Chr(strBuffer(index))
    tmp2 = tmp2 & Chr(strBuffer(index))
    Next index
    tmp2 = tmp2 & vbCr
    MsgBox tmp2


    '
    '**************************************************
    'deallocate the memory and close the process handle
    '**************************************************
    result = VirtualFreeEx(pHandle, pStrBufferMemory, 0, MEM_RELEASE)
    result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE)

    result = CloseHandle(pHandle)

    If Len(tmpString) > 0 Then GetListviewItemByPos = tmpString
    End Function

    use that function like this




    firstnick= GetListviewItemByPos(hListview, 0)

    #188236

    if you are still stuck on that, just tell Me I will post a complete example about get first nick but I think u got it 😆

    #188235
    Admin
    Administrator

    Execellent man I think I got it is the code I suppose to use

    mywindowclass = FindWindow("DlgGroupChat Window Class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atla = GetWindow(wtlsplitterwindow, GW_CHILD)
    atla = GetWindow(atla, GW_HWNDNEXT)
    syslistview = FindWindowEx(atla, 0&, "syslistview32", vbNullString)
    firstnick = GetListviewItemByPos(syslistview, 0)

    Works greattttttt thank a lot 😆

    #188234
    method
    Member

    loco could you upload the complete working of this example. It has been long time i didn’t look at this.Thanks

    #188233
    Admin
    Administrator

    Method, where ya being man 🙂 aigh i gonna try to do the code tomorrow for ya 🙂

    #188232
    BeSt_Of_ALL
    Member

    wow!!! nice man its interesting !!! 🙂

    #188231
    Admin
    Administrator

    Hey that code still works for the new paltalk 🙂 what ya having problems with method?

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