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

◆ QueryContextChannelBinding()

static unsafe int System.Net.Security.SafeFreeContextBufferChannelBinding.QueryContextChannelBinding ( SafeDeleteContext phContext,
global::Interop::SspiCli::ContextAttribute contextAttribute,
SecPkgContext_Bindings * buffer,
SafeFreeContextBufferChannelBinding refHandle )
inlinestaticinherited

Definition at line 34 of file SafeFreeContextBufferChannelBinding.cs.

35 {
36 int num = -2146893055;
37 if (contextAttribute != global::Interop.SspiCli.ContextAttribute.SECPKG_ATTR_ENDPOINT_BINDINGS && contextAttribute != global::Interop.SspiCli.ContextAttribute.SECPKG_ATTR_UNIQUE_BINDINGS)
38 {
39 return num;
40 }
41 try
42 {
43 bool success = false;
44 phContext.DangerousAddRef(ref success);
45 num = global::Interop.SspiCli.QueryContextAttributesW(ref phContext._handle, contextAttribute, buffer);
46 }
47 finally
48 {
49 phContext.DangerousRelease();
50 }
51 if (num == 0 && refHandle != null)
52 {
53 refHandle.Set(buffer->Bindings);
54 refHandle._size = buffer->BindingsLength;
55 }
56 if (num != 0)
57 {
58 refHandle?.SetHandleAsInvalid();
59 }
60 return num;
61 }

References System.Net.Security.SafeDeleteContext._handle, System.buffer, System.Runtime.InteropServices.SafeHandle.DangerousAddRef(), System.Runtime.InteropServices.SafeHandle.DangerousRelease(), System.Net.Security.SafeFreeContextBufferChannelBinding.Set(), and System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid().

Referenced by System.Net.SSPISecureChannelType.QueryContextChannelBinding().