Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Profiler API to modify environment variables (#23383) #27157

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/inc/corprof.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,40 @@ interface ICorProfilerInfo10 : ICorProfilerInfo9
HRESULT ResumeRuntime();
}

[
object,
uuid(06398876-8987-4154-B621-40A00D6E4D04),
pointer_default(unique),
local
]
interface ICorProfilerInfo11 : ICorProfilerInfo10
{
/*
* Get environment variable for the running managed code.
*/
HRESULT GetEnvironmentVariable(
[in, string] const WCHAR *szName,
[in] ULONG cchValue,
[out] ULONG *pcchValue,
[out, annotation("_Out_writes_to_(cchValue, *pcchValue)")]
WCHAR szValue[]);

/*
* Set environment variable for the running managed code.
*
* The code profiler calls this function to modify environment variables of the
* current managed process. For example, it can be used in the profiler's Initialize()
* or InitializeForAttach() callbacks.
*
* szName is the name of the environment variable, should not be NULL.
*
* szValue is the contents of the environment variable, or NULL if the variable should be deleted.
*/
HRESULT SetEnvironmentVariable(
[in, string] const WCHAR *szName,
[in, string] const WCHAR *szValue);
}

/*
* This interface lets you iterate over methods in the runtime.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/pal/prebuilt/idl/corprof_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo9,0x008170DB,0xF8CC,0x4796,0x9A,0x51,0
MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo10,0x2F1B5152,0xC869,0x40C9,0xAA,0x5F,0x3A,0xBE,0x02,0x6B,0xD7,0x20);


MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo11,0x06398876,0x8987,0x4154,0xB6,0x21,0x40,0xA0,0x0D,0x6E,0x4D,0x04);


MIDL_DEFINE_GUID(IID, IID_ICorProfilerMethodEnum,0xFCCEE788,0x0088,0x454B,0xA8,0x11,0xC9,0x9F,0x29,0x8D,0x19,0x42);


Expand Down
Loading