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

Function xnOSStrCopy

Source/OpenNI/Win32/Win32Strings.cpp:156–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156XN_C_API XnStatus xnOSStrCopy(XnChar* cpDestString, const XnChar* cpSrcString, const XnUInt32 nDestLength)
157{
158 // Validate the input/output pointers (to make sure none of them is NULL)
159 XN_VALIDATE_INPUT_PTR(cpSrcString);
160 XN_VALIDATE_INPUT_PTR(cpDestString);
161
162 // Make sure the destination string can hold the required information
163 if (strlen(cpSrcString) >= nDestLength)
164 {
165 return (XN_STATUS_INTERNAL_BUFFER_TOO_SMALL);
166 }
167
168 // Copy the string
169 strncpy (cpDestString, cpSrcString, nDestLength);
170
171 // All is good...
172 return (XN_STATUS_OK);
173}
174
175XN_C_API XnUInt32 xnOSStrLen(const XnChar* cpString)
176{

Callers 3

xnOSGetFileListFunction · 0.70
xnOSDeleteDirectoryTreeFunction · 0.70
xnUSBSetCallbackHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected