示例#1
0
 internal static unsafe void SetULongParam(MsQuicApi api, SafeHandle nativeObject, QUIC_PARAM_LEVEL level, uint param, ulong value)
 {
     QuicExceptionHelpers.ThrowIfFailed(
         api.SetParamDelegate(nativeObject, level, param, sizeof(ulong), (byte *)&value),
         "Could not set ulong.");
 }
示例#2
0
        internal static unsafe ulong GetULongParam(MsQuicApi api, SafeHandle nativeObject, QUIC_PARAM_LEVEL level, uint param)
        {
            ulong value;
            uint  valueLen = (uint)sizeof(ulong);

            uint status = api.GetParamDelegate(nativeObject, level, param, ref valueLen, (byte *)&value);

            QuicExceptionHelpers.ThrowIfFailed(status, "GetULongParam failed.");
            Debug.Assert(valueLen == sizeof(ulong));

            return(value);
        }