// msdbg170.idl /******************************************************** * * * Copyright (C) Microsoft. All rights reserved. * * * *********************************************************/ cpp_quote("/********************************************************") cpp_quote("* *") cpp_quote("* Copyright (C) Microsoft. All rights reserved. *") cpp_quote("* *") cpp_quote("*********************************************************/") import "oaidl.idl"; import "ocidl.idl"; #ifndef DEBUGGER_PIA_BUILD import "msdbg.idl"; import "msdbg100.idl"; import "msdbg156.idl"; import "msdbg157.idl"; #endif #ifdef DEBUGGER_PIA_BUILD #define XINT32 int #else #define XINT32 ULONG32 #endif interface IDebugCustomMsvsmonChannelFactory170; interface IDebugCustomMsvsmonChannelName170; interface IAsyncCustomMsvsmonChannelConnectCompletionHandler170; interface IDebugCustomMsvsmonChannel170; enum enum_DEBUGPROP_INFO_FLAGS170 { /*********************************************************************** // --------------------------------------------------------------------- // VS 8.0 values DEBUGPROP150_INFO_FULLNAME = 0x00000001, DEBUGPROP150_INFO_NAME = 0x00000002, DEBUGPROP150_INFO_TYPE = 0x00000004, DEBUGPROP150_INFO_VALUE = 0x00000008, DEBUGPROP150_INFO_ATTRIB = 0x00000010, DEBUGPROP150_INFO_PROP = 0x00000020, DEBUGPROP150_INFO_VALUE_AUTOEXPAND = 0x00010000, DEBUGPROP150_INFO_NOFUNCEVAL = 0x00020000, // Tell EE not to perform ANY type of func-eval. DEBUGPROP150_INFO_VALUE_RAW = 0x00040000, // Tell EE not to return any beautified values or members. DEBUGPROP150_INFO_VALUE_NO_TOSTRING = 0x00080000, // Tell EE not to return any special synthesized values (ToString() for instance). DEBUGPROP150_INFO_NO_NONPUBLIC_MEMBERS = 0x00100000, // Tell EE to return non-public members for non-user objects. DEBUGPROP150_INFO_NONE = 0x00000000, DEBUGPROP150_INFO_STANDARD = DEBUGPROP150_INFO_ATTRIB | DEBUGPROP150_INFO_NAME | DEBUGPROP150_INFO_TYPE | DEBUGPROP150_INFO_VALUE, DEBUGPROP150_INFO_ALL = 0xffffffff, // --------------------------------------------------------------------- // VS 9.0 values DEBUGPROP150_INFO_NOSIDEEFFECTS = 0x00200000, // Tell EE not to perform any eval that has side effects // --------------------------------------------------------------------- // VS 10.0 values //Disable use of the IL interpreter. DEBUGPROP150_INFO_NO_IL_INTERPRETER = 0x00400000, // Force the EE to allow func-evals (not just ToString() or property getters) even if EVAL100_NOSIDEEFFECTS is present. DEBUGPROP150_INFO_ALLOW_FUNC_EVALS_EVEN_IF_NO_SIDE_EFFECTS = 0x00800000, DEBUGPROP150_INFO_ALLOW_THREADSLIPPING = 0x01000000, // Tell EE that slipping threads during funcevals is ok // This flag says to use real funceval for evaluation when interpreted evalutaion is being used. DEBUGPROP150_INFO_FORCE_REAL_FUNCEVAL = 0x02000000, //Indicates that the IL interpreter is being used for the evaluation. This includes real-func eval //cases where the EE is talking to vil. The only time this is cleared is when the interpreter is completely //disabled (as in the C# EE talks directly to vil). This flag is cleared in all non-Concord scenarios. DEBUGPROP150_INFO_ILINTERPRETER_BEING_USED = 0x04000000, // VS 15.0 DEBUGPROP150_INFO_FORCE_EVALUATION_NOW_WITH_EXT_SIDE_EFFECTS = 0x08000000, // To force evaluation now, same as EVAL90_FORCE_EVALUATION_NOW | EVAL150_ALLOW_EXTENDED_SIDE_EFFECTS. // VS 16.4 DEBUGPROP_INFO_FILTER_TO_FAVORITES = 0x10000000, // When an item has favorites, only return the favorite children in the expansion DEBUGPROP_INFO_USE_SHORT_DISPLAY_NAME = 0x20000000, // When an item's display string is computed from its favorites, do not include field names in the value ***********************************************************************/ DEBUGPROP_INFO_SUPPORT_SEARCHING = 0x40000000 // Track additional state to support later searching an item and its children. }; typedef DWORD DEBUGPROP170_INFO_FLAGS; typedef struct _SEARCH_PATH_ITEM { UINT32 position; UINT32 totalCount; } SEARCH_PATH_ITEM; // ------------------------------------------------------------------ // IListSearchPathItemInfo // Represents a list of items on the search path that can be indexed like an array. // // NOTE: the implementation of this interface _MUST_ be thread agile. This is the // default if implementing the interface in managed code. If implementing in native code, // implementations should aggregate the free threaded marshaler. [ local, object, uuid(4994564E-2188-48FF-895A-1FE4541F4F15), pointer_default(unique) ] interface IListSearchPathItemInfo : IUnknown { [propget] HRESULT Count([out, retval, annotation("_Out_")] XINT32* result); [propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item([in] XINT32 lIndex, [out, retval, annotation("_Out_")] SEARCH_PATH_ITEM* pPropertyInfo); HRESULT GetItems( [in] XINT32 index, [in] XINT32 count, [out, size_is(count), length_is(*pCountReturned), annotation("_Out_writes_to_(count, *pCountReturned)")] SEARCH_PATH_ITEM* itemsArray, [in, out, annotation("_Out_")] XINT32* pCountReturned); }; // ------------------------------------------------------------------ // IAsyncDebugPropertySearchCompletionHandler [ object, uuid(551021E6-68DD-4869-A6A4-1130362B97FB), pointer_default(unique) ] interface IAsyncDebugPropertySearchCompletionHandler : IUnknown { HRESULT OnSearchComplete( [in] HRESULT hr, // S_FALSE if no matching item was found [in] IListSearchPathItemInfo* pathItems, [in] UINT32 depth); }; // ------------------------------------------------------------------ // IAsyncDebugPropertiesSearchProvider [ object, uuid(50291DA6-0DB4-486C-9362-5E42BC711896), pointer_default(unique) ] interface IAsyncDebugPropertySearchProvider : IUnknown { HRESULT SearchPropertiesAsync( [in] BSTR pSearchTerm, [in] UINT32 searchDepth, [in, size_is(countItems)] IDebugProperty2** pItems, [in] UINT32 countItems, [in, size_is(currentPositonDepth)] UINT32* pCurrentPosition, [in] UINT32 currentPositonDepth, [in] IAsyncDebugPropertySearchCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation); }; // ------------------------------------------------------------------ // IDebugStackFrame170 [ object, uuid(1626D701-3D6E-466E-B8FE-637A3A5DACEA), pointer_default(unique) ] interface IDebugStackFrame170 : IUnknown { HRESULT GetPropertySearchProvider( [in] DEBUGPROP_INFO_FLAGS dwFields, [in] UINT nRadix, [in] DWORD dwTimeout, [out] IAsyncDebugPropertySearchProvider** ppSearchProvider ); }; enum enum_EXCEPTION_STATE170 { /************************************** EXCEPTION_NONE = 0x0000, EXCEPTION_STOP_FIRST_CHANCE = 0x0001, EXCEPTION_STOP_SECOND_CHANCE = 0x0002, EXCEPTION_STOP_USER_FIRST_CHANCE = 0x0010, EXCEPTION_STOP_USER_UNCAUGHT = 0x0020, EXCEPTION_STOP_ALL = 0x00FF, EXCEPTION_CANNOT_BE_CONTINUED = 0x0100, EXCEPTION_CODE_SUPPORTED = 0x1000, EXCEPTION_CODE_DISPLAY_IN_HEX = 0x2000, EXCEPTION_JUST_MY_CODE_SUPPORTED = 0x4000, EXCEPTION_MANAGED_DEBUG_ASSISTANT = 0x8000, EXCEPTION_IS_VSCODE_FILTER = 0x10000, ***************************************/ // EXCEPTION_INFO marked with this state represents an exception that has been caught and is // being reported for visualization, the exception itself is not the stopping event. // This flag has no bearing on exception settings EXCEPTION_CAUGHT = 0x20000, }; typedef DWORD EXCEPTION_STATE; // ------------------------------------------------------------------ // IDebugStepCompleteWithCaughtExceptionEvent170 [ object, uuid(bbd315ad-14dc-4b0c-8e0d-978b9d99a62d), pointer_default(unique) ] interface IDebugStepCompleteWithCaughtExceptionEvent170 : IUnknown { HRESULT GetCaughtException( [out] IDebugExceptionEvent2 **ppCaughtException ); }; enum SymbolLoadFlags { SymbolLoad_None = 0x00000000, SymbolLoad_ManualLoad = 0x00000001, // Use the symbol include list instead of exclude list SymbolLoad_LoadAdjacent = 0x00000002, // When using the include list, also load symbols that are next to the module SymbolLoad_Automatic = 0x00000004 // Automatically load symbols as needed (i.e. during stack walk or when stepping) }; cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SymbolLoadFlags)") // ------------------------------------------------------------------ // IDebugSymbolSettings170 [ object, uuid(eadebdf6-5fb8-44ff-967c-beac8246d3e0), pointer_default(unique) ] interface IDebugSymbolSettings170 : IUnknown { HRESULT SetSymbolLoadState170( [in] enum SymbolLoadFlags flags, [in] BSTR bstrIncludeList, [in] BSTR bstrExcludeList ); }; // Interface which can be QI'ed from the implementation of IVsDebuggerSymbolSettings120A to set/get the automatic load setting [ uuid(aa6086eb-b8f7-4b4a-be6b-37e4dfe1a933), version(1.0), pointer_default(unique), local ] interface IVsDebuggerSymbolSettings170 : IUnknown { // Controls whether extra symbols are automatically loaded when using a symbol include list [propput] HRESULT AutomaticSymbolLoad([in] VARIANT_BOOL flag); [propget] HRESULT AutomaticSymbolLoad([out, retval] VARIANT_BOOL* flag); }; // NOTE: the implementation of IEnumDebugProcesses2 _MUST_ be thread agile. This is the // default if implementing the interface in managed code. If implementing in native code, // implementations should aggregate the free threaded marshaler. [ local, object, uuid(761BC6BB-D7C0-45A5-8033-3106019426A6), pointer_default(unique) ] interface IAsyncDebugEnumProcessesCompletionHandler : IUnknown { HRESULT OnComplete( [in] HRESULT hr, [in] IEnumDebugProcesses2* pEnum ); }; [ local, uuid(59B9DCD4-CB85-47C6-B0F1-12E43E3EBF2E), version(1.0), pointer_default(unique) ] interface IDebugPort170 : IUnknown { // Called by the Attach to Process dialog to retrieve // the available process list. HRESULT EnumProcessesAsync( [in] BOOL fIncludeFromAllUsers, [in] IAsyncDebugEnumProcessesCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation ); HRESULT SupportsAutoRefresh( [out] BOOL* pSupportsAutoRefresh ); // A port supplier should set the out parameter to true if its // process objects implement IDebugProcessQueryProperties and return the // enum_PROCESS_PROPERTY_TYPE_170.PROCESS_PROPERTY_PARENT_PID property. HRESULT SupportsFetchingParentProcessIds( [out] BOOL* pSupportsParentProcessIds ); }; // Extension of enum_PROCESS_PROPERTY_TYPE enum enum_PROCESS_PROPERTY_TYPE_170 { /* // Return the command line as a VT_BSTR PROCESS_PROPERTY_COMMAND_LINE = 1, // Return the current directory as a VT_BSTR PROCESS_PROPERTY_CURRENT_DIRECTORY = 2, // Return the environment variavles as a VT_BSTR. // The format is: // NAME1=VALUE1'\0' // NAME2=VALUE2'\0' // ... // '\0' PROCESS_PROPERTY_ENVIRONMENT_VARIABLES = 3, */ PROCESS_PROPERTY_PARENT_PID = 4, PROCESS_PROPERTY_APP_POOL_NAME = 5, PROCESS_PROPERTY_APP_POOL_BINDINGS = 6 }; [ local, object, uuid(AA134780-7AE3-45BD-9F42-6C1BF0F348C7), pointer_default(unique) ] interface IDebugSymbolsDocument : IUnknown { // Provides the content of the document, if the document is embedded in the symbol file. HRESULT GetContent( [out, annotation("_Outptr_result_buffer_(*pcBytes)")] BYTE** ppBytes, [out] ULONG32* pcBytes); // Retrieves the checksum value and algorithm identifier associated with the document. HRESULT GetChecksumAndAlgorithmId( [out] GUID* pguidAlgorithmId, [out, annotation("_Outptr_result_buffer_(*pcBytes)")] BYTE** ppBytes, [out] ULONG32* pcBytes); // Retrieves a guid that identifies the type of the document. HRESULT GetDocumentType( [out] GUID* pguidDocumentType); // Indicates whether or not the document content is embedded in the symbol file. HRESULT GetHasEmbeddedSource( [out] BOOL* pfRetVal); // Retrieves the language and vendor identifiers associated with the document. HRESULT GetLanguageAndVendor( [out] GUID* pguidLanguage, [out] GUID* pguidVendor); // Retrieves the path to the document. HRESULT GetPath( [out] BSTR* pbstrPath); }; // Represents a list of symbol documents that can be indexed like an array. // // NOTE: the implementation of this interface _MUST_ be thread agile. This is the // default if implementing the interface in managed code. If implementing in native code, // implementations should aggregate the free threaded marshaler. [ local, object, uuid(A6C2E3D9-2F52-41FB-B94B-2BC0B3C56D74), pointer_default(unique) ] interface IListDebugSymbolsDocuments : IUnknown { // Returns the number of IDebugSymbolsDocument objects available in the collection. [propget] HRESULT Count([out, retval, annotation("_Out_")] XINT32* result); // Retrieves an IDebugSymbolsDocument object given its index in the collection. [propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item([in] XINT32 lIndex, [out, retval, annotation("_Out_")] IDebugSymbolsDocument** pDocument); // Retrieves the specified number of IDebugSymbolsDocument objects from the specified index in the collection. HRESULT GetItems( [in] XINT32 index, [in] XINT32 count, [out, size_is(count), length_is(*pCountReturned), annotation("_Out_writes_to_(count, *pCountReturned)")] IDebugSymbolsDocument** itemsArray, [in, out, annotation("_Out_")] XINT32* pCountReturned); }; // Handler invoked when a call to IDebugModule170.GetAllSymbolsDocuments has completed. [ object, uuid(CEF4A45F-5D9F-41A7-A8CE-80E16BCE6470), pointer_default(unique) ] interface IAsyncDebugGetSymbolsDocumentsCompletionHandler : IUnknown { HRESULT OnComplete( [in] HRESULT hr, [in] IListDebugSymbolsDocuments* pDocuments); }; // Handler invoked when a call to IDebugModule170.GetInfoAsync has completed. [ object, uuid(6B69C229-C582-4BEF-962C-250A2A6F3FFB), pointer_default(unique) ] interface IAsyncDebugGetModuleInfoCompletionHandler : IUnknown { HRESULT OnComplete( [in] HRESULT hr, [in] MODULE_INFO* pInfo); }; // NOTE: Implementations of this interface must ensure that completion handlers are invoked on the // UI thread. [ uuid(D0916E6E-B220-4FA7-BFC1-E2117DF6695C), version(1.0), pointer_default(unique) ] interface IDebugModule170 : IUnknown { // Retrieves the list of all documents associated with the loaded symbols for this module. For native / // managed PDBs, this generally includes the list of compilands, as well as any embedded documents. HRESULT GetAllSymbolsDocumentsAsync( [in] IAsyncDebugGetSymbolsDocumentsCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation); // Retrieves information about this module asynchronously. HRESULT GetInfoAsync( [in] MODULE_INFO_FIELDS dwFields, [in] IAsyncDebugGetModuleInfoCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation); }; // Handler invoked when a call to IDebugSourceLinkModule.GetSourceLinkDataAsync has completed. [ object, uuid(94AC04BA-75CF-4DD6-8A5C-0A7F8A33E1C0), pointer_default(unique) ] interface IAsyncDebugGetSourceLinkDataCompletionHandler : IUnknown { HRESULT OnComplete( [in] HRESULT hr, [in] LPCOLESTR pbstrData); }; // Provides access to Source Link configuration data embedded in a symbol file. // NOTE: Implementations of this interface must ensure that the completion handler is invoked on the // UI thread. [ object, uuid(47F45BEC-3040-4AB6-8B41-CBD33DA8D956), pointer_default(unique) ] interface IDebugSourceLinkModule : IUnknown { // Retrieves Source Link configuration data embedded in a symbol file, if present, or returns // an error if no Source Link data is available. NOTE: The data returned is not guaranteed to // exactly match the data from the PDB. Ordering may change, and multiple Source Link streams // may be combined into a single blob. HRESULT GetSourceLinkDataAsync( [in] IAsyncDebugGetSourceLinkDataCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation); } /// /// This is the entry point interface for custom channels. A Custom channel is an /// extension point for providing a transport for Visual Studio's managed and native /// remote debugger (msvsmon.exe). The channel is responsible for starting msvsmon /// on the target device, and providing a duplex pipe to flow either bytes or /// text so that Visual Studio and msvsmon can communicated. /// ///

To register a custom channel, register a new port supplier with a pkgdef file /// like the following: ///

/// /// [$RootKey$\AD7Metrics\PortSupplier\{E0904AA8-2C57-4A53-B4C3-B70CE0A004E4}] /// ; NOTE: To use a localized string for 'Name' or 'Description' you can use the /// ; following syntax: /// ; "resource=(path-to-root-directory)\*\(native-resource-dll-name)#(resource-id)" /// "Name"="My Example Transport" /// "Description"="This string shows up in the attach to process dialog" /// "CustomMsvsmonChannelFactory"="{38E3ABE8-8062-4C1C-95EE-BC9C361E0D46}" /// /// [$RootKey$\CLSID\{38E3ABE8-8062-4C1C-95EE-BC9C361E0D46}] /// ; NOTE: This is the keys needed to register a transport implemented in native code. /// ; Search for examples in other Visual Studio .pkgdef files for a managed example /// "InprocServer32"="$PackageFolder$\MyTransport.dll" /// "ThreadingModel"="Apartment" /// /// ; Any appropriate debug engine also needs to be registered as supporting this port /// ; supplier. Here is an example of registering the native debug engine /// ; ({3B476D35-A401-11D2-AAD4-00C04F990171}): /// [$RootKey$\AD7Metrics\Engine\{3B476D35-A401-11D2-AAD4-00C04F990171}\PortSupplier] /// "My Company.My Product"="{E0904AA8-2C57-4A53-B4C3-B70CE0A004E4}" /// ///
[ local, object, uuid(36B23826-0287-483A-9050-53CFDB249477), pointer_default(unique) ] interface IDebugCustomMsvsmonChannelFactory170 : IUnknown { /// /// Parses the port name text provided by a user/port selection dialog/project system and /// creates a new object which implements IDebugCustomMsvsmonChannelName170. /// /// Text to parse /// Returned new channel name object /// S_OK on success or a failure code if the text cannot be parsed. HRESULT ParsePortName( [in, annotation("_In_")] LPCWSTR userText, [out, annotation("_Outptr_")] IDebugCustomMsvsmonChannelName170 **channelName); /// /// Sets the registry root used to read VS configuration/settings. This will be called once /// after the channel factory is created. /// /// Registry root (example: L"Software\\Microsoft\\VisualStudio\\17.0") /// S_OK if initialization should proceed, a failure code otherwise HRESULT SetRegistryRoot( [in, annotation("_In_")] LPCOLESTR registryRoot); /// /// Sets the locale id of the channel factory. This will be called once after the channel /// factory is created and is used to allow the channel factory to load resources. /// /// The locale id (example: 1033 for en-US) /// S_OK if initialization should proceed, a failure code otherwise HRESULT SetLocale( [in] WORD wLangID); }; /// /// Interface implemented by a custom channel that represents a parsed connection name. /// /// NOTE: the implementation of this interface _MUST_ be thread agile. /// Implementations will be passed between threads without marshalling. /// [ local, object, uuid(5D56ADBA-5737-44F4-AEA8-79BED4B7F7A6), pointer_default(unique) ] interface IDebugCustomMsvsmonChannelName170 : IUnknown { /// /// Obtains the full name of the channel. This is used as a key to determine if there is already an active connection, /// and is displayed in the attach to process dialog and other places that show the connection name. /// /// The returned full name /// S_OK on success or a failure code if the name cannot be obtained. HRESULT GetFullName([out, annotation("_Outptr_")] BSTR * fullName); /// /// Instructs the custom channel to create an async operation object that can be /// started to asynchronously connect to the underlying transport and launch /// msvsmon. On the target device, this should cause msvsmon.exe to be launched with /// either `/CustomChannel:bin` or `/CustomChannel:text` and the stdin/stdout of /// msvsmon should be remoted with the returned IDebugCustomMsvsmonChannel170 /// interface. ///

/// Note that IAsyncDebugEngineOperation.BeginExecute will be called before the debugger /// puts up any wait UI, so if an implementation wants to put up its own custom wait UI, /// it should do so before BeginExecute returns. ///

///
/// The architecture of msvsmon to launch. This /// will be PROCESSOR_ARCHITECTURE_UNKNOWN (0xFFFF) if the caller doesn't know the /// architecture that is needed, and wants the architecture that matches the native /// machine architecture. Otherwise, this will be PROCESSOR_ARCHITECTURE_INTEL (0), /// PROCESSOR_ARCHITECTURE_AMD64 (9), PROCESSOR_ARCHITECTURE_ARM64 (12) or /// PROCESSOR_ARCHITECTURE_ARM (5). This will only be used if /// IDebugCustomMsvsmonChannel170.GetAvailableAlternativeArchitectures indicates that /// they are available. /// Event callback that can be used to send error events /// (IDebugErrorEvent2) or message events (IDebugMessageEvent2) to the debugger. /// For example, to write progress text to the debug pane of the output window. /// This call back is thread-agile. /// Call back interface which is notified when /// connect completes. This must always be called if IAsyncDebugEngineOperation.BeginExecute /// succeeds and should not be called if it fails. This object must be thread-agile /// so the implementation is free to pass it between threads and call it on any /// thread. /// Async operation object which is used to either /// start the connect (BeginExecute) and/or cancel. /// S_OK if the async operation object could be created, otherwise a /// failure code. HRESULT ConnectAsync( [in] UINT16 msvsmonArchitecture, [in, annotation("_In_")] IDebugEventCallback2 * eventCallback, [in, annotation("_In_")] IAsyncCustomMsvsmonChannelConnectCompletionHandler170 * completionHandler, [out, annotation("_Outptr_")] IAsyncDebugEngineOperation ** asyncOperation ); }; /// /// Interface implemented by the caller of IDebugCustomMsvsmonChannelName170.ConnectAsync /// used to return the result. /// /// NOTE: the implementation of this interface _MUST_ be thread agile. This is the /// default if implementing the interface in managed code. If implementing in native code, /// implementations should aggregate the free threaded marshaler. /// [ local, object, uuid(9022194D-CF84-43AE-9743-90CFCDD9B42F), pointer_default(unique) ] interface IAsyncCustomMsvsmonChannelConnectCompletionHandler170 : IUnknown { /// /// Method that should be called exactly once by a custom channel when /// IDebugCustomMsvsmonChannelName170.ConnectAsync is complete. /// /// S_OK if the connection is established or a failure code if it failed. /// If 'hr' is S_OK, the channel object. /// Ignored status code HRESULT OnComplete( [in] HRESULT hr, [in, annotation("_In_opt_")] IDebugCustomMsvsmonChannel170 * channel); }; /// /// Custom channel interface that can be used in the IDE process to communicate with /// msvsmon. /// /// NOTE: the implementation of this interface _MUST_ be thread agile. /// Implementations will be passed between threads without marshalling. /// [ local, object, uuid(FD55206A-CF46-4436-8B78-74F2A9AFD836), pointer_default(unique) ] interface IDebugCustomMsvsmonChannel170 : IUnknown { /// /// Method to indicate if the underlying channel allows only text content, or if /// binary content is allowed (example: embedded '\x0' characters). A channel is only /// asked once and this cannot change. If this method returns S_OK, all binary data /// will be base64 encoded. The return value from this method must agree with how /// msvsmon.exe was started on the target device -- if the channel started msvsmon /// with `/CustomChannel:bin` it should return S_FALSE, and if it started with /// `/CustomChannel:text` it should return S_OK. /// /// S_OK if the channel is a text channel, S_FALSE if binary content is /// allowed HRESULT QueryIsText(); /// /// Determines if the channel factory and target computer/device supports launching /// an msvsmon of more than one CPU architecture. /// /// S_OK if multiple CPU architectures are supported, S_FALSE if they are /// not. For example, x64 desktop Windows supports running both x64 and x86 msvsmon, /// so, assuming the channel factory is capable of launching both, S_OK should be /// returned. HRESULT QuerySupportsMultipleMsvsmonCPUArchitectures(); /// /// Read data from the channel. This should block until either some data is available or /// the channel disconnects. /// /// Buffer to read into /// The size of the buffer /// The count of bytes that were read /// S_OK on success, WS_S_END if the other side of the channel disconnected normally, /// WS_E_ENDPOINT_DISCONNECTED if the channel was already closed, or an additional failure code /// as appropriate. HRESULT Read( [annotation("_Out_writes_bytes_to_(bufferSize, *bytesRead)")] void* buffer, [in, annotation("_In_")] ULONG bufferSize, [annotation("_Out_")] ULONG* bytesRead); /// /// Write data to the channel. /// /// Buffer of bytes or characters to write. If QueryIsText returned /// S_OK, this will contain only ascii characters. /// The number of bytes to write /// S_OK on success, WS_S_END if the other side of the channel disconnected normally, /// WS_E_ENDPOINT_DISCONNECTED if the channel was already closed, or an additional failure code /// as appropriate. HRESULT Write( [annotation("_In_reads_bytes_(bufferSize)")] void const* buffer, [in, annotation("_In_")] ULONG bufferSize); /// /// Closes the channel /// /// S_OK on success or a failure code if the channel cannot be closed. HRESULT Close(); }; /// /// Optional interface that the IAsyncDebugEngineOperation object returned from ConnectAsync can /// implement in order to customize error reporting if connecting fails. /// [ local, object, uuid(0D8F6B5A-3FA9-44D6-BB7E-5086FB0A91FC), pointer_default(unique) ] interface IDebugCustomMsvsmonChannelConnectErrorFilter170 : IUnknown { /// /// Called when connecting to the channel fails. /// /// The failure code that will be formatted to show the /// user why connecting failed. This will initially contain the default error code. /// If an implementation wants to it can replace this code by updating the value /// and returning S_OK from OnConnectFailure. /// S_OK if OnConnectFailure succeeds and wants to replace the failure /// code with a new value. HRESULT OnConnectFailure([in, out, annotation("_Inout_")] HRESULT* failureCode); }; // Handler invoked when a call to IDebugSourceServerModule170.GetSourceServerDataAsync has completed. [ object, uuid(A7BC4E0C-8529-4079-B3EE-59F2B974CDEA), pointer_default(unique) ] interface IAsyncDebugGetSourceServerDataCompletionHandler : IUnknown { HRESULT OnComplete( [in] HRESULT hr, [in] ULONG pDataByteCount, [in, size_is (pDataByteCount)] BYTE* ppData); }; // Provides access to Source Server configuration data embedded in a symbol file. // NOTE: Implementations of this interface must ensure that the completion handler is invoked on the // UI thread. [ object, uuid(C5D5D170-F854-417C-BF14-DD07AFC4B8CA), pointer_default(unique) ] interface IDebugSourceServerModule170 : IUnknown { // Retrieves Source Server configuration data embedded in a symbol file, if present, or returns // an error if no Source Server data is available. HRESULT GetSourceServerDataAsync( [in] IAsyncDebugGetSourceServerDataCompletionHandler* pCompletionHandler, [out] IAsyncDebugEngineOperation** ppDebugOperation); }