Thread32First help vb.net menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thread32First help vb.net

    Move to VB Forums?

    I'm trying to find tls base by using the NtQueryInformationThread method, but when I call Thread32First it keeps returning nothing..or...the structure I pass to it is unchanged. Code below..

    API
    Public Declare Function Thread32First Lib "kernel32" (ByVal hSnapshot As IntPtr, ByRef lpte As ThreadEntry32) As Boolean

    Public Structure ThreadEntry32
    Public dwSize As UInt32
    Public cntUsage As UInt32
    Public th32ThreadID As UInt32
    Public the32OwnerProcessID As UInt32
    Public tpBasePri As UInt32
    Public tpDeltaPri As UInt32
    Public dwFlags As UInt32
    Public th32Accesskey As UInt32
    Public th32CurrentProcessId As UInt32
    End Structure
    ...code

    'TLSSLOTPOINTER = &H135D9FC
    Dim TLSSlotNumber As UInt32 = ReadUInt32(wowProcessHandle, TLSSLOTPOINTER)
    'How to know if fails, is normally 0 so..
    Dim threadSnapshotHandle As IntPtr = IntPtr.Zero
    threadSnapshotHandle = CreateToolhelp32Snapshot(4, wowProcessID(0).Id)
    Thread32First(threadSnapshotHandle, threadStruct)

    I'm 99% sure my problem is in ThreadEntry32 structure..probably the variable types? While debugging, after Thread32First() threadStruct still contains no data (except for .dwsize which was set before the call)


    I think this is something basic to do w/ structures I'm messing up :S


    PS. I've seen a few example that just have a static address g_clientConnection, and they use that + offset to find the Object Manager..I thought you had to use the whole NTQueryThread w/e to get the TEB base address and go from there, what is this g_clientConnection and how are you finding it each update?
    Last edited by abuckau907; 06-12-2009 at 12:20 AM. Reason: Read the .ps

    Thread32First help vb.net

Similar Threads

  1. Need help! Battle.net name change!
    By Dassell in forum World of Warcraft General
    Replies: 4
    Last Post: 04-11-2013, 02:19 PM
  2. Timer help. - VB.net
    By Fireking300 in forum Programming
    Replies: 9
    Last Post: 03-01-2009, 06:19 PM
  3. [HELP] F#.NET Addin for VS 2008(Shell)
    By Clain in forum Programming
    Replies: 1
    Last Post: 01-02-2009, 09:59 AM
  4. Net tools help SMTP
    By pixie12 in forum Community Chat
    Replies: 1
    Last Post: 05-08-2008, 06:53 PM
  5. [VB.NET] I give up. Need help! Socket related
    By ReidE96 in forum Programming
    Replies: 3
    Last Post: 04-25-2008, 01:20 PM
All times are GMT -5. The time now is 11:43 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search