TechNet
Export (0) Print
Expand All

ProcessThread.StartAddress Property

 

Gets the memory address of the function that the operating system called that started this thread.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

public IntPtr StartAddress { get; }

Property Value

Type: System.IntPtr

The thread's starting address, which points to the application-defined function that the thread executes.

Exception Condition
PlatformNotSupportedException

The platform is Windows 98 or Windows Millennium Edition.

NotSupportedException

The process is on a remote computer.

Each process starts with a single thread, which is known as the primary thread. Any thread can create additional threads.

A process has a virtual address space, executable code, data, object handles, environment variables, a base priority, and minimum and maximum working set sizes. All the threads of a process share its virtual address space and system resources. In addition, each thread maintains exception handlers, a scheduling priority, and a set of structures in which the system saves the thread context while the thread is waiting to be scheduled. The thread context includes the thread's set of machine registers, the kernel stack, a thread environment block, and a user stack in the address space of the thread's process.

Every Windows thread actually begins execution in a system-supplied function, not the application-supplied function. The starting address for the primary thread is, therefore, the same (as it represents the address of the system-supplied function) for every Windows process in the system. However, the StartAddress property allows you to get the starting function address that is specific to your application.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft