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

◆ QueryContextAttributes() [3/3]

static unsafe int System.Net.Security.SafeFreeContextBuffer.QueryContextAttributes ( System::Net::Security::SafeDeleteContext phContext,
global::Interop::SspiCli::ContextAttribute contextAttribute,
byte * buffer,
SafeHandle refHandle )
inlinestatic

Definition at line 36 of file SafeFreeContextBuffer.cs.

37 {
38 int num = -2146893055;
39 try
40 {
41 bool success = false;
42 phContext.DangerousAddRef(ref success);
43 num = global::Interop.SspiCli.QueryContextAttributesW(ref phContext._handle, contextAttribute, buffer);
44 }
45 finally
46 {
47 phContext.DangerousRelease();
48 }
49 if (num == 0 && refHandle != null)
50 {
52 {
53 ((System.Net.Security.SafeFreeContextBuffer)refHandle).Set(*(IntPtr*)buffer);
54 }
55 else
56 {
57 ((System.Net.Security.SafeFreeCertContext)refHandle).Set(*(IntPtr*)buffer);
58 }
59 }
60 if (num != 0)
61 {
62 refHandle?.SetHandleAsInvalid();
63 }
64 return num;
65 }
global::Interop.SspiCli.CredHandle _handle
void DangerousAddRef(ref bool success)
Definition SafeHandle.cs:76

References System.buffer, and System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid().