Get user status in pt room vb6 code source

You can talk about VB programming here

Get user status in pt room vb6 code source

Postby BattleStar-Galactica » Sat Nov 18, 2006 8:50 pm


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 :lol:
Attachments
getExternalListViewItems.zip
(3.44 KiB) Downloaded 332 times
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby locohacker » Sun Nov 19, 2006 9:49 am

man you make the job so much easier Thanks :lol:
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby locohacker » Mon Dec 11, 2006 3:50 pm

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 :cry:
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby BattleStar-Galactica » Mon Dec 11, 2006 4:37 pm

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

SendMessage(lstviewhwnd, LVM_GETITEMTEXT, 0, ByVal pMyItemMemory)
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby locohacker » Mon Dec 11, 2006 5:07 pm

yeps, i just want the first nick :) ah where i put that :?:
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby BattleStar-Galactica » Mon Dec 11, 2006 6:27 pm

here is that function to get the nick by position

Code: Select all
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

Code: Select all


firstnick= GetListviewItemByPos(hListview, 0)

Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby BattleStar-Galactica » Tue Dec 12, 2006 4:46 am

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 :lol:
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby locohacker » Tue Dec 12, 2006 8:14 am

Execellent man I think I got it is the code I suppose to use
Code: Select all
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 :lol:
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby method » Thu May 03, 2007 10:59 am

loco could you upload the complete working of this example. It has been long time i didn't look at this.Thanks
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Postby locohacker » Thu May 03, 2007 1:19 pm

Method, where ya being man :) aigh i gonna try to do the code tomorrow for ya :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby BeSt_Of_ALL » Thu May 03, 2007 1:52 pm

wow!!! nice man its interesting !!! :)
Image
User avatar
BeSt_Of_ALL
Forum Moderator
Forum Moderator
 
Posts: 564
Joined: Fri Mar 30, 2007 8:21 am
Location: Pluto ( city- pluto mania 99)

Postby locohacker » Sat May 05, 2007 7:43 am

Hey that code still works for the new paltalk :) what ya having problems with method?
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest