次の方法で共有


IDebugEngine2::ContinueFromSynchronousEvent

Called by the session debug manager (SDM) to indicate that a synchronous debug event, previously sent by the debug engine (DE) to the SDM, was received and processed.

HRESULT ContinueFromSynchronousEvent( 
   IDebugEvent2* pEvent
);
HRESULT ContinueFromSynchronousEvent( 
   IDebugEvent2 pEvent
);

Parameters

  • pEvent
    [in] An IDebugEvent2 object that represents the previously sent synchronous event from which the debugger should now continue.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

The DE must verify that it was the source of the event represented by the pEvent parameter.

Example

The following example shows how to implement this method for a simple CEngine object that implements the IDebugEngine2 interface.

HRESULT CEngine::ContinueFromSynchronousEvent(IDebugEvent2* pEvent)
{
   HRESULT hr;
  
   // Create a pointer to a unique event interface defined for batch file
   // breaks.  
   IAmABatchFileEvent *pBatEvent;
   // Check for successful query for the unique batch file event
   // interface.
   if (SUCCEEDED(pEvent->QueryInterface(IID_IAmABatchFileEvent,
                                       (void **)&pBatEvent)))
   {
      // Release the result of the QI.
      pBatEvent->Release();
      // Check thread message for notification to continue.
      if (PostThreadMessage(GetCurrentThreadId(),
                            WM_CONTINUE_SYNC_EVENT,
                            0,
                            0))
      {  
         hr = S_OK;
      }
      else
      {
         hr = HRESULT_FROM_WIN32(GetLastError());
      }
   }
   else
   {
      hr = E_INVALIDARG;
   }
   return hr;
}

See Also

Reference

IDebugEngine2

IDebugEvent2