MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnOSCloseEvent

Function xnOSCloseEvent

Source/OpenNI/Win32/Win32Events.cpp:111–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111XN_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
139XN_C_API XnStatus xnOSSetEvent(const XN_EVENT_HANDLE EventHandle)
140{

Callers 3

xnUSBInitOvlpFunction · 0.70
xnUSBCloseEndPointFunction · 0.70
xnUSBShutdownReadThreadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected