| 336 | } |
| 337 | |
| 338 | XnStatus 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 | |
| 367 | XnStatus XnModuleLoader::AddOpenNIGenerators() |
| 368 | { |
nothing calls this directly
no test coverage detected