| 109 | } |
| 110 | |
| 111 | XN_C_API XnStatus xnOSCloseEvent(XN_EVENT_HANDLE* pEventHandle) |
| 112 | { |
| 113 | // Local function variables |
| 114 | XnBool bRetVal = FALSE; |
| 115 | |
| 116 | // Validate the input/output pointers (to make sure none of them is NULL) |
| 117 | XN_VALIDATE_INPUT_PTR(pEventHandle); |
| 118 | |
| 119 | // Make sure the actual event handle isn't NULL |
| 120 | XN_RET_IF_NULL(*pEventHandle, XN_STATUS_OS_INVALID_EVENT); |
| 121 | |
| 122 | // Close the event via the OS |
| 123 | bRetVal = CloseHandle(*pEventHandle); |
| 124 | |
| 125 | // Make sure it succeeded (return value is true) |
| 126 | if (bRetVal != TRUE) |
| 127 | { |
| 128 | xnLogVerbose(XN_MASK_OS, "CloseHandle() failed with error %u", GetLastError()); |
| 129 | return (XN_STATUS_OS_EVENT_CLOSE_FAILED); |
| 130 | } |
| 131 | |
| 132 | // Null the output event |
| 133 | *pEventHandle = NULL; |
| 134 | |
| 135 | // All is good... |
| 136 | return (XN_STATUS_OK); |
| 137 | } |
| 138 | |
| 139 | XN_C_API XnStatus xnOSSetEvent(const XN_EVENT_HANDLE EventHandle) |
| 140 | { |
no outgoing calls
no test coverage detected