C# Class EasyHook.NativeAPI

显示文件 Open project: gerich-home/lua-inject Class Usage Examples

Public Properties

Property Type Description
EASYHOOK_INJECT_DEFAULT System.Int32
EASYHOOK_INJECT_MANAGED System.Int32
Is64Bit System.Boolean

Public Methods

Method Description
DbgAttachDebugger ( ) : void
DbgGetProcessIdByHandle ( IntPtr InProcessHandle, Int32 &OutProcessId ) : void
DbgGetThreadIdByHandle ( IntPtr InThreadHandle, Int32 &OutThreadId ) : void
DbgHandleToObjectName ( IntPtr InNamedHandle, IntPtr OutNameBuffer, Int32 InBufferSize, Int32 &OutRequiredSize ) : void
GacCreateContext ( ) : IntPtr
GacInstallAssembly ( IntPtr InContext, String InAssemblyPath, String InDescription, String InUniqueID ) : void
GacReleaseContext ( IntPtr &RefContext ) : void
GacUninstallAssembly ( IntPtr InContext, String InAssemblyName, String InDescription, String InUniqueID ) : void
LhBarrierBeginStackTrace ( IntPtr &OutBackup ) : void
LhBarrierEndStackTrace ( IntPtr OutBackup ) : void
LhBarrierGetAddressOfReturnAddress ( IntPtr &OutValue ) : void
LhBarrierGetCallback ( IntPtr &OutValue ) : void
LhBarrierGetCallingModule ( IntPtr &OutValue ) : void
LhBarrierGetReturnAddress ( IntPtr &OutValue ) : void
LhInstallHook ( IntPtr InEntryPoint, IntPtr InHookProc, IntPtr InCallback, IntPtr OutHandle ) : void
LhIsThreadIntercepted ( IntPtr InHandle, Int32 InThreadID, System.Boolean &OutResult ) : void
LhSetExclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount, IntPtr InHandle ) : void
LhSetGlobalExclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount ) : void
LhSetGlobalInclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount ) : void
LhSetInclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount, IntPtr InHandle ) : void
LhUninstallAllHooks ( ) : void
LhUninstallHook ( IntPtr RefHandle ) : void
LhWaitForPendingRemovals ( ) : void
RhGetProcessToken ( Int32 InProcessId, IntPtr &OutToken ) : void
RhInjectLibrary ( Int32 InTargetPID, Int32 InWakeUpTID, Int32 InInjectionOptions, String InLibraryPath_x86, String InLibraryPath_x64, IntPtr InPassThruBuffer, Int32 InPassThruSize ) : void
RhInjectLibraryEx ( Int32 InTargetPID, Int32 InWakeUpTID, Int32 InInjectionOptions, String InLibraryPath_x86, String InLibraryPath_x64, IntPtr InPassThruBuffer, Int32 InPassThruSize ) : Int32
RhInstallDriver ( String InDriverPath, String InDriverName ) : void
RhInstallSupportDriver ( ) : void
RhIsAdministrator ( ) : System.Boolean
RhIsX64Process ( Int32 InProcessId, System.Boolean &OutResult ) : void
RhIsX64System ( ) : System.Boolean
RhWakeUpProcess ( ) : void
RtlCreateSuspendedProcess ( String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, Int32 &OutProcessId, Int32 &OutThreadId ) : void
RtlGetLastError ( ) : Int32
RtlGetLastErrorString ( ) : String
RtlInstallService ( String InServiceName, String InExePath, String InChannelName ) : void

Private Methods

Method Description
CloseHandle ( IntPtr InHandle ) : void
ComposeString ( ) : String
Force ( Int32 InErrorCode ) : void
GetCurrentProcessId ( ) : int
GetCurrentThreadId ( ) : int
GetModuleHandle ( String InPath ) : IntPtr
GetProcAddress ( IntPtr InModule, String InProcName ) : IntPtr
LoadLibrary ( String InPath ) : IntPtr
RtlCaptureStackBackTrace ( Int32 InFramesToSkip, Int32 InFramesToCapture, IntPtr OutBackTrace, IntPtr OutBackTraceHash ) : Int16

Method Details

DbgAttachDebugger() public static method

public static DbgAttachDebugger ( ) : void
return void

DbgGetProcessIdByHandle() public static method

public static DbgGetProcessIdByHandle ( IntPtr InProcessHandle, Int32 &OutProcessId ) : void
InProcessHandle System.IntPtr
OutProcessId System.Int32
return void

DbgGetThreadIdByHandle() public static method

public static DbgGetThreadIdByHandle ( IntPtr InThreadHandle, Int32 &OutThreadId ) : void
InThreadHandle System.IntPtr
OutThreadId System.Int32
return void

DbgHandleToObjectName() public static method

public static DbgHandleToObjectName ( IntPtr InNamedHandle, IntPtr OutNameBuffer, Int32 InBufferSize, Int32 &OutRequiredSize ) : void
InNamedHandle System.IntPtr
OutNameBuffer System.IntPtr
InBufferSize System.Int32
OutRequiredSize System.Int32
return void

GacCreateContext() public static method

public static GacCreateContext ( ) : IntPtr
return System.IntPtr

GacInstallAssembly() public static method

public static GacInstallAssembly ( IntPtr InContext, String InAssemblyPath, String InDescription, String InUniqueID ) : void
InContext System.IntPtr
InAssemblyPath String
InDescription String
InUniqueID String
return void

GacReleaseContext() public static method

public static GacReleaseContext ( IntPtr &RefContext ) : void
RefContext System.IntPtr
return void

GacUninstallAssembly() public static method

public static GacUninstallAssembly ( IntPtr InContext, String InAssemblyName, String InDescription, String InUniqueID ) : void
InContext System.IntPtr
InAssemblyName String
InDescription String
InUniqueID String
return void

LhBarrierBeginStackTrace() public static method

public static LhBarrierBeginStackTrace ( IntPtr &OutBackup ) : void
OutBackup System.IntPtr
return void

LhBarrierEndStackTrace() public static method

public static LhBarrierEndStackTrace ( IntPtr OutBackup ) : void
OutBackup System.IntPtr
return void

LhBarrierGetAddressOfReturnAddress() public static method

public static LhBarrierGetAddressOfReturnAddress ( IntPtr &OutValue ) : void
OutValue System.IntPtr
return void

LhBarrierGetCallback() public static method

public static LhBarrierGetCallback ( IntPtr &OutValue ) : void
OutValue System.IntPtr
return void

LhBarrierGetCallingModule() public static method

public static LhBarrierGetCallingModule ( IntPtr &OutValue ) : void
OutValue System.IntPtr
return void

LhBarrierGetReturnAddress() public static method

public static LhBarrierGetReturnAddress ( IntPtr &OutValue ) : void
OutValue System.IntPtr
return void

LhInstallHook() public static method

public static LhInstallHook ( IntPtr InEntryPoint, IntPtr InHookProc, IntPtr InCallback, IntPtr OutHandle ) : void
InEntryPoint System.IntPtr
InHookProc System.IntPtr
InCallback System.IntPtr
OutHandle System.IntPtr
return void

LhIsThreadIntercepted() public static method

public static LhIsThreadIntercepted ( IntPtr InHandle, Int32 InThreadID, System.Boolean &OutResult ) : void
InHandle System.IntPtr
InThreadID System.Int32
OutResult System.Boolean
return void

LhSetExclusiveACL() public static method

public static LhSetExclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount, IntPtr InHandle ) : void
InThreadIdList System.Int32
InThreadCount System.Int32
InHandle System.IntPtr
return void

LhSetGlobalExclusiveACL() public static method

public static LhSetGlobalExclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount ) : void
InThreadIdList System.Int32
InThreadCount System.Int32
return void

LhSetGlobalInclusiveACL() public static method

public static LhSetGlobalInclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount ) : void
InThreadIdList System.Int32
InThreadCount System.Int32
return void

LhSetInclusiveACL() public static method

public static LhSetInclusiveACL ( Int32 InThreadIdList, Int32 InThreadCount, IntPtr InHandle ) : void
InThreadIdList System.Int32
InThreadCount System.Int32
InHandle System.IntPtr
return void

LhUninstallAllHooks() public static method

public static LhUninstallAllHooks ( ) : void
return void

LhUninstallHook() public static method

public static LhUninstallHook ( IntPtr RefHandle ) : void
RefHandle System.IntPtr
return void

LhWaitForPendingRemovals() public static method

public static LhWaitForPendingRemovals ( ) : void
return void

RhGetProcessToken() public static method

public static RhGetProcessToken ( Int32 InProcessId, IntPtr &OutToken ) : void
InProcessId System.Int32
OutToken System.IntPtr
return void

RhInjectLibrary() public static method

public static RhInjectLibrary ( Int32 InTargetPID, Int32 InWakeUpTID, Int32 InInjectionOptions, String InLibraryPath_x86, String InLibraryPath_x64, IntPtr InPassThruBuffer, Int32 InPassThruSize ) : void
InTargetPID System.Int32
InWakeUpTID System.Int32
InInjectionOptions System.Int32
InLibraryPath_x86 String
InLibraryPath_x64 String
InPassThruBuffer System.IntPtr
InPassThruSize System.Int32
return void

RhInjectLibraryEx() public static method

public static RhInjectLibraryEx ( Int32 InTargetPID, Int32 InWakeUpTID, Int32 InInjectionOptions, String InLibraryPath_x86, String InLibraryPath_x64, IntPtr InPassThruBuffer, Int32 InPassThruSize ) : Int32
InTargetPID System.Int32
InWakeUpTID System.Int32
InInjectionOptions System.Int32
InLibraryPath_x86 String
InLibraryPath_x64 String
InPassThruBuffer System.IntPtr
InPassThruSize System.Int32
return System.Int32

RhInstallDriver() public static method

public static RhInstallDriver ( String InDriverPath, String InDriverName ) : void
InDriverPath String
InDriverName String
return void

RhInstallSupportDriver() public static method

public static RhInstallSupportDriver ( ) : void
return void

RhIsAdministrator() public static method

public static RhIsAdministrator ( ) : System.Boolean
return System.Boolean

RhIsX64Process() public static method

public static RhIsX64Process ( Int32 InProcessId, System.Boolean &OutResult ) : void
InProcessId System.Int32
OutResult System.Boolean
return void

RhIsX64System() public static method

public static RhIsX64System ( ) : System.Boolean
return System.Boolean

RhWakeUpProcess() public static method

public static RhWakeUpProcess ( ) : void
return void

RtlCreateSuspendedProcess() public static method

public static RtlCreateSuspendedProcess ( String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, Int32 &OutProcessId, Int32 &OutThreadId ) : void
InEXEPath String
InCommandLine String
InProcessCreationFlags System.Int32
OutProcessId System.Int32
OutThreadId System.Int32
return void

RtlGetLastError() public static method

public static RtlGetLastError ( ) : Int32
return System.Int32

RtlGetLastErrorString() public static method

public static RtlGetLastErrorString ( ) : String
return String

RtlInstallService() public static method

public static RtlInstallService ( String InServiceName, String InExePath, String InChannelName ) : void
InServiceName String
InExePath String
InChannelName String
return void

Property Details

EASYHOOK_INJECT_DEFAULT public_oe static_oe property

public static Int32,System EASYHOOK_INJECT_DEFAULT
return System.Int32

EASYHOOK_INJECT_MANAGED public_oe static_oe property

public static Int32,System EASYHOOK_INJECT_MANAGED
return System.Int32

Is64Bit public_oe static_oe property

public static Boolean,System Is64Bit
return System.Boolean