ProcessThread.StartAddress 屬性

定義

取得作業系統啟動這個執行緒所呼叫之函式的記憶體位址。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

屬性值

執行緒的起始位址,指向執行緒執行之應用程式定義的函式。The thread's starting address, which points to the application-defined function that the thread executes.

例外狀況

處理序位於遠端電腦上。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.

每個 Windows 執行緒實際上都是在系統提供的函式中開始執行, 而不是應用程式提供的函式。Every Windows thread actually begins execution in a system-supplied function, not the application-supplied function. 主要執行緒的起始位址是, 因此它會是系統中每個 Windows 進程的相同 (因為它代表系統提供之函式的位址)。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. 不過, StartAddress屬性可讓您取得應用程式特定的起始函式位址。However, the StartAddress property allows you to get the starting function address that is specific to your application.

適用於