XnStatus XnDeviceModule::LoadConfigFromFile(const XnChar* csINIFilePath, const XnChar* strSectionName /* = NULL */) { XnStatus nRetVal = XN_STATUS_OK; if (strSectionName == NULL) { strSectionName = GetName(); } xnLogVerbose(XN_MASK_DDK, "Configuring module '%s' from section '%s' in file '%s'...", GetName(), strSectionName, csINIFilePath); for (XnPropertiesHash::Iterator it = m_Properties.Begin(); it != m_Properties.End(); ++it) { XnProperty* pProp = it->Value(); // only read writable properties if (!pProp->IsReadOnly()) { nRetVal = pProp->ReadValueFromFile(csINIFilePath, strSectionName); XN_IS_STATUS_OK(nRetVal); } } xnLogInfo(XN_MASK_DDK, "Module '%s' configuration was loaded from file.", GetName()); return (XN_STATUS_OK); }