상속: IHawkeyeHost
예제 #1
0
        /// <summary>
        /// Initializes the <see cref="HawkeyeApplication"/> class.
        /// </summary>
        static HawkeyeApplication()
        {
            applicationInfo = new HawkeyeApplicationInfo();

            var clrVersion = typeof(int).Assembly.GetName().Version;
            currentClr = clrVersion.Major == 4 ? Clr.Net4 : Clr.Net2;
            currentBitness = IntPtr.Size == 8 ? Bitness.x64 : Bitness.x86;

            Shell = new Shell();
        }
예제 #2
0
 /// <summary>
 /// Determines whether Hawkeye can be injected given the specified window info.
 /// </summary>
 /// <param name="info">The window info.</param>
 /// <returns>
 ///   <c>true</c> if Hawkeye can be injected; otherwise, <c>false</c>.
 /// </returns>
 public static bool CanInject(IWindowInfo info)
 {
     return(Shell.CanInject(info));
 }
예제 #3
0
 /// <summary>
 /// Operations that should be realized before we close Hawkeye.
 /// </summary>
 public static void Close()
 {
     Shell.Close();
 }
예제 #4
0
 /// <summary>
 /// Runs the Hawkeye application.
 /// </summary>
 /// <param name="windowToSpy">The window to spy.</param>
 /// <param name="windowToKill">The window to kill.</param>
 /// <remarks>
 /// Use this method to run Hawkeye in its own process.
 /// </remarks>
 public static void Run(IntPtr windowToSpy, IntPtr windowToKill)
 {
     Shell.Run(windowToSpy, windowToKill);
 }
예제 #5
0
 /// <summary>
 /// Runs the Hawkeye application.
 /// </summary>
 /// <remarks>
 /// Use this method to run Hawkeye in its own process.
 /// </remarks>
 public static void Run()
 {
     Shell.Run();
 }
예제 #6
0
 /// <summary>
 /// Attaches the (injected) Hawkeye application to the specified target window
 /// (and destroys the original Hawkeye window).
 /// </summary>
 /// <param name="targetWindowHandle">The target window.</param>
 /// <param name="hawkeyeWindowHandle">The original Hawkeye window.</param>
 public static void Attach(IntPtr targetWindowHandle, IntPtr hawkeyeWindowHandle)
 {
     Shell.Attach(targetWindowHandle, hawkeyeWindowHandle);
 }
예제 #7
0
 /// <summary>
 /// Injects the Hawkeye application into the process owning the specified window.
 /// </summary>
 /// <param name="info">The target window information.</param>
 public static void Inject(IWindowInfo info)
 {
     Shell.Inject(info);
 }