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

Function XnWin32CreateKernelObjectName

Source/OpenNI/Win32/XnOSWin32.cpp:239–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239XnStatus XnWin32CreateKernelObjectName(XnChar* strDest, const XnUInt32 nDestLength, const XnChar* strSource, XnBool bAllowOtherUsers)
240{
241 XnChar* pDest = strDest;
242 XnChar* pDestEnd = strDest + nDestLength;
243
244 if (bAllowOtherUsers)
245 {
246 static const XnChar strGlobal[] = "Global\\";
247 strcpy(strDest, strGlobal);
248 pDest = strDest + sizeof(strGlobal) - 1;
249 }
250
251 const XnChar* pSource = strSource;
252
253 while (pDest < pDestEnd && *pSource != '\0')
254 {
255 *pDest = *pSource == '\\' ? '_' : *pSource;
256 ++pDest;
257 ++pSource;
258 }
259
260 if (pDest == pDestEnd)
261 {
262 xnLogWarning(XN_MASK_OS, "Event name is too long!");
263 return XN_STATUS_ERROR;
264 }
265
266 *pDest = '\0';
267
268 return (XN_STATUS_OK);
269}
270
271XnStatus XnWin32GetSecurityAttributes(XnBool bAllowOtherUsers, SECURITY_ATTRIBUTES** ppSecurityAttributes)
272{

Callers 5

xnOSCreateNamedEventExFunction · 0.85
xnOSOpenNamedEventExFunction · 0.85
xnOSCreateSharedMemoryExFunction · 0.85
xnOSOpenSharedMemoryExFunction · 0.85
xnOSCreateNamedMutexExFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected