แก้ไข

แชร์ผ่าน


ProcessThread.StartAddress Property

Definition

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

public:
 property IntPtr StartAddress { IntPtr get(); };
public IntPtr StartAddress { get; }
member this.StartAddress : nativeint
Public ReadOnly Property StartAddress As IntPtr

Property Value

IntPtr

nativeint

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

Exceptions

The process is on a remote computer.

Remarks

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.

Applies to