+//=======================================================================
+//function : ReadValue
+//purpose :
+//=======================================================================
+TCollection_AsciiString GEOMImpl_ImportDriver::ReadValue(const TCollection_AsciiString& theFileName,
+ const TCollection_AsciiString& theLibName,
+ const TCollection_AsciiString& theParameterName,
+ TCollection_AsciiString& theError)
+{
+ TCollection_AsciiString aValue;
+
+ if (theFileName.IsEmpty() || theLibName.IsEmpty() || theParameterName.IsEmpty())
+ return aValue;
+
+ // load plugin library
+ LibHandle anImportLib = LoadLib(theLibName.ToCString()); //This is workaround of BUG OCC13051
+ if (!anImportLib) {
+ theError = theLibName + " library was not installed";
+ return aValue;
+ }
+
+ // Get GetValue method
+ pGetValue pGV = (pGetValue)GetProc(anImportLib, "GetValue");
+
+ if (!pGV) {
+ theError = theLibName + " library doesn't support GetValue method";
+ return aValue;
+ }
+
+ Handle(TCollection_HAsciiString) aHValue = pGV(theFileName, theParameterName, theError);
+
+ if (aHValue.IsNull()) {
+ if (theError.IsEmpty())
+ theError = theFileName + " doesn't contain requested parameter";
+ return aValue;
+ }
+
+ aValue = aHValue->String();
+
+ // unload plugin library
+ // commented by enk:
+ // the bug was occured: using ACIS Import/Export plugin
+ //UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051
+
+ return aValue;
+}
+