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

Method AddModuleGenerators

Source/OpenNI/XnModuleLoader.cpp:338–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338XnStatus XnModuleLoader::AddModuleGenerators(const XnChar* strModuleFile, XN_LIB_HANDLE hLib, const XnChar* strConfigDir)
339{
340 XnStatus nRetVal = XN_STATUS_OK;
341
342 XnOpenNIModuleInterface openNIModule;
343
344 // get the function pointers
345 nRetVal = FindFuncAddress(strModuleFile, hLib, XN_STRINGIFY(XN_MODULE_LOAD), (XnFarProc*)&openNIModule.pLoadFunc);
346 XN_IS_STATUS_OK(nRetVal);
347
348 nRetVal = FindFuncAddress(strModuleFile, hLib, XN_STRINGIFY(XN_MODULE_UNLOAD), (XnFarProc*)&openNIModule.pUnloadFunc);
349 XN_IS_STATUS_OK(nRetVal);
350
351 nRetVal = FindFuncAddress(strModuleFile, hLib, XN_STRINGIFY(XN_MODULE_GET_EXPORTED_NODES_COUNT), (XnFarProc*)&openNIModule.pGetCountFunc);
352 XN_IS_STATUS_OK(nRetVal);
353
354 nRetVal = FindFuncAddress(strModuleFile, hLib, XN_STRINGIFY(XN_MODULE_GET_EXPORTED_NODES_ENTRY_POINTS), (XnFarProc*)&openNIModule.pGetEntryPointsFunc);
355 XN_IS_STATUS_OK(nRetVal);
356
357 nRetVal = FindFuncAddress(strModuleFile, hLib, XN_STRINGIFY(XN_MODULE_GET_OPEN_NI_VERSION), (XnFarProc*)&openNIModule.pGetVersionFunc);
358 XN_IS_STATUS_OK(nRetVal);
359
360 // add it
361 nRetVal = AddModule(&openNIModule, strConfigDir, strModuleFile);
362 XN_IS_STATUS_OK(nRetVal);
363
364 return XN_STATUS_OK;
365}
366
367XnStatus XnModuleLoader::AddOpenNIGenerators()
368{

Callers

nothing calls this directly

Calls 1

FindFuncAddressFunction · 0.85

Tested by

no test coverage detected