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."); }
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); }