-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add System.Diagnostics.PerformanceData namespace #31474
Changes from all commits
2e47d17
7bb7399
b86ad93
5db9f6c
8184ca9
d47e720
d4a6028
e82c451
9fb9e01
99fe8b0
fc0b021
b273e4b
5a4fef6
3fb07e5
6302d33
5276d97
ccb3975
287a923
ac09108
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using System; | ||
| using System.Runtime.InteropServices; | ||
| using Microsoft.Win32.SafeHandles; | ||
|
|
||
| internal static partial class Interop | ||
| { | ||
| internal partial class PerfCounter | ||
| { | ||
| [DllImport(Libraries.Advapi32, ExactSpelling = true)] | ||
| internal static extern unsafe uint PerfStopProvider( | ||
| IntPtr hProvider | ||
| ); | ||
|
|
||
| internal unsafe delegate uint PERFLIBREQUEST( | ||
| uint RequestCode, | ||
| void* Buffer, | ||
| uint BufferSize | ||
| ); | ||
|
|
||
| // Native PERFLIB V2 Provider APIs. | ||
| internal struct PerfCounterSetInfoStruct | ||
| { | ||
| // PERF_COUNTERSET_INFO structure defined in perflib.h | ||
| internal Guid CounterSetGuid; | ||
| internal Guid ProviderGuid; | ||
| internal uint NumCounters; | ||
| internal uint InstanceType; | ||
| } | ||
|
|
||
| internal struct PerfCounterInfoStruct | ||
| { | ||
| // PERF_COUNTER_INFO structure defined in perflib.h | ||
| internal uint CounterId; | ||
| internal uint CounterType; | ||
| internal long Attrib; | ||
| internal uint Size; | ||
| internal uint DetailLevel; | ||
| internal uint Scale; | ||
| internal uint Offset; | ||
| } | ||
|
|
||
| [StructLayout(LayoutKind.Sequential)] | ||
| internal struct PerfCounterSetInstanceStruct | ||
| { | ||
| // PERF_COUNTERSET_INSTANCE structure defined in perflib.h | ||
| internal Guid CounterSetGuid; | ||
| internal uint dwSize; | ||
| internal uint InstanceId; | ||
| internal uint InstanceNameOffset; | ||
| internal uint InstanceNameSize; | ||
| } | ||
|
|
||
| [DllImport(Libraries.Advapi32, ExactSpelling = true)] | ||
| internal static extern unsafe uint PerfStartProvider( | ||
| ref Guid ProviderGuid, | ||
| PERFLIBREQUEST ControlCallback, | ||
| out SafePerfProviderHandle phProvider | ||
| ); | ||
|
|
||
| [DllImport(Libraries.Advapi32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)] | ||
| internal static extern unsafe PerfCounterSetInstanceStruct* PerfCreateInstance( | ||
| SafePerfProviderHandle hProvider, | ||
| ref Guid CounterSetGuid, | ||
| string szInstanceName, | ||
| uint dwInstance | ||
| ); | ||
|
|
||
| [DllImport(Libraries.Advapi32, ExactSpelling = true)] | ||
| internal static extern unsafe uint PerfSetCounterSetInfo( | ||
| SafePerfProviderHandle hProvider, | ||
| PerfCounterSetInfoStruct* pTemplate, | ||
| uint dwTemplateSize | ||
| ); | ||
|
|
||
| [DllImport(Libraries.Advapi32, ExactSpelling = true)] | ||
| internal static extern unsafe uint PerfDeleteInstance( | ||
| SafePerfProviderHandle hProvider, | ||
| PerfCounterSetInstanceStruct* InstanceBlock | ||
| ); | ||
|
|
||
| [DllImport(Libraries.Advapi32, ExactSpelling = true)] | ||
| internal static extern unsafe uint PerfSetCounterRefValue( | ||
| SafePerfProviderHandle hProvider, | ||
| PerfCounterSetInstanceStruct* pInstance, | ||
| uint CounterId, | ||
| void* lpAddr | ||
| ); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using System; | ||
| using System.Diagnostics; | ||
| using System.Threading; | ||
|
|
||
| namespace Microsoft.Win32.SafeHandles | ||
| { | ||
| internal sealed class SafePerfProviderHandle : SafeHandleZeroOrMinusOneIsInvalid | ||
| { | ||
| private SafePerfProviderHandle() : base(true) { } | ||
|
|
||
| protected override bool ReleaseHandle() | ||
| { | ||
| uint Status = Interop.PerfCounter.PerfStopProvider(handle); | ||
| Debug.Assert(Status == (uint)Interop.Errors.ERROR_SUCCESS, "PerfStopProvider() fails"); | ||
| return true; | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -205,3 +205,88 @@ public enum PerformanceCounterType | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Timer100NsInverse = 558957824, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace System.Diagnostics.PerformanceData | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public sealed class CounterData | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| unsafe internal CounterData(long* pCounterData) { } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void Decrement() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void Increment() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void IncrementBy(long value) { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public long RawValue { get { throw null; } set { } } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public long Value { get { throw null; } set { } } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public class CounterSet : IDisposable | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~CounterSet() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void AddCounter(int counterId, CounterType counterType) { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void AddCounter(int counterId, CounterType counterType, string counterName) { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public CounterSet(Guid providerGuid, Guid counterSetGuid, CounterSetInstanceType instanceType) { } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public CounterSetInstance CreateCounterSetInstance(string instanceName) { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void Dispose() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| protected virtual void Dispose(bool disposing) { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public sealed class CounterSetInstance : IDisposable | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~CounterSetInstance() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| internal CounterSetInstance(CounterSet counterSetDefined, string instanceName) { } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void Dispose() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public CounterSetInstanceCounterDataSet Counters { get { throw null; } } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public sealed class CounterSetInstanceCounterDataSet : IDisposable | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~CounterSetInstanceCounterDataSet() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| internal CounterSetInstanceCounterDataSet(CounterSetInstance thisInst) { } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public void Dispose() { throw null; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public CounterData this[int counterId] { get { throw null; } } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public CounterData this[string counterName] { get { throw null; } } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public enum CounterType | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How different are these from the ones listed in PerformanceCounterType.cs? Can we merge them?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are in different namespaces and some counters are not present.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think mostly, if they have identical values (ie AverageBase in PerformanceCounterType and AverageBase in PerformanceData/CounterType are the same, etc), then we should share them between the two, rather than have two copies, and put them in Common. If they are different, then having the two different enums in different namespaces is fine.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
i did some check
They differ for name or missing counter.
Maybe a stupid question...how we can share enums values between two different enum name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
changing the definitions to use any of one enum should work.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thought was that we'd use what is already in Common, rather than have them explicitly defined in both classes.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you to avoid duplications...but i don't understand what you mean when you say "already in Common". Is there a file with enums definition already on "Common folder"?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok. So what I was thinking is that you'd use https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/Windows/kernel32/Interop.PerformanceCounterOptions.cs like we do in PerformanceCounterType. So AverageBase = Interop.Kernel32.PerformanceCounterOptions.PERF_AVERAGE_BASE, etc.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok so "simply" reuse Interop.Kernel32.PerformanceCounterOptions!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawDataHex32 = 0, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawDataHex64 = 256, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawData32 = 65536, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawData64 = 65792, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Delta32 = 4195328, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Delta64 = 4195584, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SampleCounter = 4260864, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QueueLength = 4523008, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LargeQueueLength = 4523264, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QueueLength100Ns = 5571840, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QueueLengthObjectTime = 6620416, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RateOfCountPerSecond32 = 272696320, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RateOfCountPerSecond64 = 272696576, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawFraction32 = 537003008, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawFraction64 = 537003264, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PercentageActive = 541132032, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PrecisionSystemTimer = 541525248, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PercentageActive100Ns = 542180608, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PrecisionTimer100Ns = 542573824, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ObjectSpecificTimer = 543229184, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PrecisionObjectSpecificTimer = 543622400, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SampleFraction = 549585920, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PercentageNotActive = 557909248, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PercentageNotActive100Ns = 558957824, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultiTimerPercentageActive = 574686464, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultiTimerPercentageActive100Ns = 575735040, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultiTimerPercentageNotActive = 591463680, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultiTimerPercentageNotActive100Ns = 592512256, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AverageTimer32 = 805438464, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ElapsedTime = 807666944, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AverageCount64 = 1073874176, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SampleBase = 1073939457, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AverageBase = 1073939458, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawBase32 = 1073939459, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawBase64 = 1073939712, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultiTimerBase = 1107494144 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public enum CounterSetInstanceType | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Single = 0, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Multiple = 2, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GlobalAggregate = 4, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MultipleAggregate = 6, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GlobalAggregateWithHistory = 11, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InstanceAggregate = 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i removed
[In][Out]guideline says to userefbut on callsite i cannot pass a pointer toref. Can you help me to understand how to resolve, i'm not so "fluent" with pinvoke./cc @jkotas @Anipik @JeremyKuhne
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB. It works, maybe i don't need to use
refhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sometimes we can get away with using the
ref