예제 #1
0
        public void PostCompletion(NativeMethods.REQUEST_NOTIFICATION_STATUS requestNotificationStatus)
        {
            Debug.Assert(!_operation.HasContinuation, "Pending async operation!");

            NativeMethods.HttpSetCompletionStatus(_pInProcessHandler, requestNotificationStatus);
            NativeMethods.HttpPostCompletion(_pInProcessHandler, 0);
        }
예제 #2
0
        public void PostCompletion(NativeMethods.REQUEST_NOTIFICATION_STATUS requestNotificationStatus)
        {
            Debug.Assert(!_operation.HasContinuation, "Pending async operation!");

            var hr = NativeMethods.http_set_completion_status(_pInProcessHandler, requestNotificationStatus);

            if (hr != NativeMethods.S_OK)
            {
                throw Marshal.GetExceptionForHR(hr);
            }

            hr = NativeMethods.http_post_completion(_pInProcessHandler, 0);
            if (hr != NativeMethods.S_OK)
            {
                throw Marshal.GetExceptionForHR(hr);
            }
        }
예제 #3
0
 public void IndicateCompletion(NativeMethods.REQUEST_NOTIFICATION_STATUS notificationStatus)
 {
     NativeMethods.http_indicate_completion(_pInProcessHandler, notificationStatus);
 }