none
vb.net get BaseAddress process RRS feed

  • Question

  • hello

    i want get BaseAddress from GetProcessesByName 

        Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress)
            Next

    Saturday, September 7, 2019 10:43 PM

All replies

  • hello

    i want get BaseAddress from GetProcessesByName 

        Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress)
            Next

    A process can have any number of modules loaded.  Each module has its own base address.  So which module are you interested in?

    If you want to examine the address space of a process to see what it contains (e.g., modules, heaps, stacks, etc.) then download Microsoft's https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap

    Sunday, September 8, 2019 2:03 AM
  • hello

    i want get BaseAddress from GetProcessesByName 

        Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress)
            Next

    A process can have any number of modules loaded.  Each module has its own base address.  So which module are you interested in?

    If you want to examine the address space of a process to see what it contains (e.g., modules, heaps, stacks, etc.) then download Microsoft's https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap

    Give me an example on notepad or fom1
    Sunday, September 8, 2019 8:10 PM
  • hello

    i want get BaseAddress from GetProcessesByName 

        Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress)
            Next

    A process can have any number of modules loaded.  Each module has its own base address.  So which module are you interested in?

    If you want to examine the address space of a process to see what it contains (e.g., modules, heaps, stacks, etc.) then download Microsoft's https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap

    Give me an example on notepad or fom1
    The snippet posted will display a messagebox showing the base address for each module loaded into the notepad process that is returned as target.  What is your question?
    Sunday, September 8, 2019 8:15 PM
  • hello

    i want get BaseAddress from GetProcessesByName 

        Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress)
            Next

    A process can have any number of modules loaded.  Each module has its own base address.  So which module are you interested in?

    If you want to examine the address space of a process to see what it contains (e.g., modules, heaps, stacks, etc.) then download Microsoft's https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap

    Give me an example on notepad or fom1

    The snippet posted will display a messagebox showing the base address for each module loaded into the notepad process that is returned as target.  What is your question?
    I want to get the Baseaddress because this code is not working
    Sunday, September 8, 2019 10:03 PM
  • I want to get the Baseaddress because this code is not working

    Is an instance of notepad running? What exactly do you mean by "not working"?

    What Baseaddress are you referring to?  For which module?

    Sunday, September 8, 2019 10:04 PM
  • Hi,

    uncheck Prefer 32-bit,

    then try the following code:

     Dim target As Process = Process.GetProcessesByName("notepad")(0)
            For Each mo As ProcessModule In target.Modules
                MsgBox(mo.BaseAddress.ToString())
            Next

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 10, 2019 3:23 AM
    Moderator