// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*****************************************************************************
 **                                                                         **
 ** XCordebug.idl - Experimental (undocumented) Debugging interfaces.       **
 **                                                                         **
 *****************************************************************************/


/* ------------------------------------------------------------------------- *
 * Imported types
 * ------------------------------------------------------------------------- */

import "cordebug.idl";




// @dbgtodo : proper API docs here.
// - include failure semantics of Filter.  What does failure mean?
//
/* Comments to add to ICorDebugDataTarget docs:
 * Whenever the target process changes, the debugger client must
 * call ICorDebugProcess4::ProcessStateChanged before issuing any other
 * ICorDebug API calls.
*/
[
    object,
    local,
    uuid(E930C679-78AF-4953-8AB7-B0AABF0F9F80),
    pointer_default(unique)
]
interface ICorDebugProcess4 : IUnknown
{
    /*
     * Process native debug events.
     */
    HRESULT Filter(
        [in, length_is(countBytes), size_is(countBytes)]  const BYTE pRecord[],
        [in] DWORD countBytes,
        [in] CorDebugRecordFormat format,
        [in] DWORD dwFlags,
        [in] DWORD dwThreadId,
        [in] ICorDebugManagedCallback * pCallback,
        [in, out] CORDB_CONTINUE_STATUS * pContinueStatus);

    /*
     * Debugger calls this to notify ICorDebug that the process is running.
     *
     * Notes:
     *   ProcessStateChanged(PROCESS_RUNNING) has similar semantics to ICorDebugProcess::Continue();
     */
    HRESULT ProcessStateChanged([in] CorDebugStateChange eChange);

};
