C# 클래스 Binarysharp.MemoryManagement.Threading.ThreadCore

Static core class providing tools for manipulating threads.
파일 보기 프로젝트 열기: ZenLulz/MemorySharp 1 사용 예제들

공개 메소드들

메소드 설명
CreateRemoteThread ( SafeMemoryHandle processHandle, IntPtr startAddress, IntPtr parameter, ThreadCreationFlags creationFlags = ThreadCreationFlags.Run ) : SafeMemoryHandle

Creates a thread that runs in the virtual address space of another process.

GetExitCodeThread ( SafeMemoryHandle threadHandle ) : IntPtr?

Retrieves the termination status of the specified thread.

GetThreadContext ( SafeMemoryHandle threadHandle, ThreadContextFlags contextFlags = ThreadContextFlags.Full ) : ThreadContext

Retrieves the context of the specified thread.

GetThreadSelectorEntry ( SafeMemoryHandle threadHandle, uint selector ) : LdtEntry

Retrieves a descriptor table entry for the specified selector and thread.

NtQueryInformationThread ( SafeMemoryHandle threadHandle ) : ThreadBasicInformation

Retrieves information about the specified thread.

OpenThread ( ThreadAccessFlags accessFlags, int threadId ) : SafeMemoryHandle

Opens an existing thread object.

ResumeThread ( SafeMemoryHandle threadHandle ) : uint

Decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.

SetThreadContext ( SafeMemoryHandle threadHandle, ThreadContext context ) : void

Sets the context for the specified thread.

SuspendThread ( SafeMemoryHandle threadHandle ) : uint

Suspends the specified thread.

TerminateThread ( SafeMemoryHandle threadHandle, int exitCode ) : void

Terminates a thread.

WaitForSingleObject ( SafeMemoryHandle handle ) : WaitValues

Waits an infinite amount of time for the specified object to become signaled.

WaitForSingleObject ( SafeMemoryHandle handle, System.TimeSpan timeout ) : WaitValues

Waits until the specified object is in the signaled state or the time-out interval elapses.

메소드 상세

CreateRemoteThread() 공개 정적인 메소드

Creates a thread that runs in the virtual address space of another process.
public static CreateRemoteThread ( SafeMemoryHandle processHandle, IntPtr startAddress, IntPtr parameter, ThreadCreationFlags creationFlags = ThreadCreationFlags.Run ) : SafeMemoryHandle
processHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the process in which the thread is to be created.
startAddress System.IntPtr A pointer to the application-defined function to be executed by the thread and represents the starting address of the thread in the remote process.
parameter System.IntPtr A pointer to a variable to be passed to the thread function.
creationFlags ThreadCreationFlags The flags that control the creation of the thread.
리턴 Binarysharp.MemoryManagement.Native.SafeMemoryHandle

GetExitCodeThread() 공개 정적인 메소드

Retrieves the termination status of the specified thread.
public static GetExitCodeThread ( SafeMemoryHandle threadHandle ) : IntPtr?
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread.
리턴 IntPtr?

GetThreadContext() 공개 정적인 메소드

Retrieves the context of the specified thread.
public static GetThreadContext ( SafeMemoryHandle threadHandle, ThreadContextFlags contextFlags = ThreadContextFlags.Full ) : ThreadContext
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread whose context is to be retrieved.
contextFlags ThreadContextFlags Determines which registers are returned or set.
리턴 Binarysharp.MemoryManagement.Native.ThreadContext

GetThreadSelectorEntry() 공개 정적인 메소드

Retrieves a descriptor table entry for the specified selector and thread.
public static GetThreadSelectorEntry ( SafeMemoryHandle threadHandle, uint selector ) : LdtEntry
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread containing the specified selector.
selector uint The global or local selector value to look up in the thread's descriptor tables.
리턴 Binarysharp.MemoryManagement.Native.LdtEntry

NtQueryInformationThread() 공개 정적인 메소드

Retrieves information about the specified thread.
public static NtQueryInformationThread ( SafeMemoryHandle threadHandle ) : ThreadBasicInformation
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread to query.
리턴 Binarysharp.MemoryManagement.Native.ThreadBasicInformation

OpenThread() 공개 정적인 메소드

Opens an existing thread object.
public static OpenThread ( ThreadAccessFlags accessFlags, int threadId ) : SafeMemoryHandle
accessFlags ThreadAccessFlags The access to the thread object.
threadId int The identifier of the thread to be opened.
리턴 Binarysharp.MemoryManagement.Native.SafeMemoryHandle

ResumeThread() 공개 정적인 메소드

Decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.
public static ResumeThread ( SafeMemoryHandle threadHandle ) : uint
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread to be restarted.
리턴 uint

SetThreadContext() 공개 정적인 메소드

Sets the context for the specified thread.
public static SetThreadContext ( SafeMemoryHandle threadHandle, ThreadContext context ) : void
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread whose context is to be set.
context Binarysharp.MemoryManagement.Native.ThreadContext A pointer to a structure that contains the context to be set in the specified thread.
리턴 void

SuspendThread() 공개 정적인 메소드

Suspends the specified thread.
public static SuspendThread ( SafeMemoryHandle threadHandle ) : uint
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread that is to be suspended.
리턴 uint

TerminateThread() 공개 정적인 메소드

Terminates a thread.
public static TerminateThread ( SafeMemoryHandle threadHandle, int exitCode ) : void
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread to be terminated.
exitCode int The exit code for the thread.
리턴 void

WaitForSingleObject() 공개 정적인 메소드

Waits an infinite amount of time for the specified object to become signaled.
public static WaitForSingleObject ( SafeMemoryHandle handle ) : WaitValues
handle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the object.
리턴 WaitValues

WaitForSingleObject() 공개 정적인 메소드

Waits until the specified object is in the signaled state or the time-out interval elapses.
public static WaitForSingleObject ( SafeMemoryHandle handle, System.TimeSpan timeout ) : WaitValues
handle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the object.
timeout System.TimeSpan The time-out interval. If this parameter is NULL, the function does not enter a wait state if the object is not signaled; it always returns immediately.
리턴 WaitValues