コード例 #1
0
ファイル: MainWindow.cs プロジェクト: ohio813/Prochook32
 /// <summary>
 /// Stops the prochook
 /// </summary>
 /// <param name="sender">who clicked</param>
 /// <param name="e">event args</param>
 private void stopButton_Click(object sender, EventArgs e)
 {
     if (this.isHooked == true)
     {
         Thirty2BitHookWrapper.StopMonitoring();
         this.isHooked = false;
     }
 }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: ohio813/Prochook32
        /// <summary>
        /// Gets the text buffers from the hook
        /// </summary>
        /// <param name="sender">who clicked</param>
        /// <param name="e">event args</param>
        private void getText_Click(object sender, EventArgs e)
        {
            // setup the string buffer for the call
            ulong         bufferSize = 0;
            StringBuilder buffer     = new StringBuilder(String.Empty, 200000);

            // get the prochook text buffer
            Thirty2BitHookWrapper.GetTextBuffer(buffer, ref bufferSize);

            // display the text
            hookText.Text = buffer.ToString();

            // get the prochook text buffer
            buffer = new StringBuilder(String.Empty, 200000);
            Thirty2BitHookWrapper.GetKeyBuffer(buffer, ref bufferSize);

            // display the text
            keyText.Text = buffer.ToString();
        }