Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ QueryStringContextAttributes() [1/2]

static string System.Net.SSPIWrapper.QueryStringContextAttributes ( ISSPIInterface secModule,
SafeDeleteContext securityContext,
global::Interop::SspiCli::ContextAttribute contextAttribute )
inlinestatic

Definition at line 365 of file SSPIWrapper.cs.

366 {
367 Span<IntPtr> span = stackalloc IntPtr[1];
368 SafeHandle refHandle;
369 int num = secModule.QueryContextAttributes(securityContext, contextAttribute, MemoryMarshal.AsBytes(span), typeof(SafeFreeContextBuffer), out refHandle);
370 using (refHandle)
371 {
372 if (num != 0)
373 {
374 if (System.Net.NetEventSource.Log.IsEnabled())
375 {
376 System.Net.NetEventSource.Error(null, $"ERROR = {ErrorDescription(num)}", "QueryStringContextAttributes");
377 }
378 return null;
379 }
380 string text = Marshal.PtrToStringUni(refHandle.DangerousGetHandle());
381 if (System.Net.NetEventSource.Log.IsEnabled())
382 {
383 System.Net.NetEventSource.Info(null, text, "QueryStringContextAttributes");
384 }
385 return text;
386 }
387 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:652

References System.Runtime.InteropServices.SafeHandle.DangerousGetHandle(), System.Net.NetEventSource.Error(), System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Runtime.InteropServices.Marshal.PtrToStringUni(), System.Net.ISSPIInterface.QueryContextAttributes(), and System.text.