Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- namespace Injector
- {
- public class InjectorResult
- {
- public enum InjectorStatusCode
- {
- Success,
- TargetDllNotFound,
- ProcessNotFound,
- OpenThreadFailed,
- RetrieveLoadLibraryFailed,
- AllocationFailed,
- WritePayloadFailed,
- ImpersonationFailed,
- CreateLoadLibraryThreadFailed,
- RevertAfterImpersonationFailed,
- LoadLibraryTimeoutExceeded,
- LoadedRemoteModuleNotFound,
- CreateRemoteRunThreadFailed,
- CouldNotLoadTargetDll,
- ExportedRunMethodNotFound
- }
- public InjectorStatusCode Status { get; }
- public IntPtr RemoteLibraryAddress { get; }
- public int LastError { get; }
- private InjectorResult()
- {
- LastError = Marshal.GetLastWin32Error();
- }
- public InjectorResult(InjectorStatusCode status)
- : this()
- {
- Status = status;
- }
- public InjectorResult(IntPtr remoteLibraryAddress)
- : this(InjectorStatusCode.Success)
- {
- RemoteLibraryAddress = remoteLibraryAddress;
- }
- }
- }
Add Comment
Please, Sign In to add comment