- std::string aLibName = library(theFormatName + ID());
- LibHandle anImportLib = LoadLib(aLibName.c_str());
- std::string anImportError = "Failed to load " + aLibName + ": ";
- if(!anImportLib) {
-#ifdef WIN32
- LPVOID lpMsgBuf;
- ::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- 0, ::GetLastError(), 0, (LPTSTR) &lpMsgBuf, 0, 0);
- anImportError = anImportError + std::string((char*) lpMsgBuf);
- ::LocalFree(lpMsgBuf);
-#else
- anImportError = anImportError + std::string(dlerror());
-#endif
- Events_Error::send(anImportError, this);
-#ifdef _DEBUG
- std::cerr << anImportError << std::endl;
-#endif
- return false;
- }
- // Test loaded plugin for existence of valid "Import" function:
- importFunctionPointer fp = (importFunctionPointer) GetProc(anImportLib, "Import");
- if (!fp) {
- std::string aFunctionError = "No valid \"Import\" function was found in the " + aLibName;
- Events_Error::send(aFunctionError, this);
-#ifdef _DEBUG
- std::cerr << aFunctionError << std::endl;
-#endif
- UnLoadLib(anImportLib)
- return NULL;
- }
- return anImportLib;
+ //load result
+ theResultBody->store(theGeomShape);
+
+ int aTag(1);
+ std::string aNameMS = "Shape";
+ theResultBody->loadFirstLevel(theGeomShape, aNameMS, aTag);