using System.Runtime.InteropServices;
using Deltares.Geotechnics.IO.Importers;
namespace Deltares.Dam.Data
{
class DGSDAMSlopeWInterface : DgsStandardDllInterface
{
private const string DllFileName = @"DGSDAMSlopeW.dll";
[DllImport(DllFileName)]
static extern int DllGetVersion(out DllVersionInfoStructure dllVersionInfoStructure);
[DllImport(DllFileName)]
static extern string GetDescription();
[DllImport(DllFileName)]
static extern string GetErrorMessage();
[DllImport(DllFileName)]
static extern int CreateSlopeWProject(string inputXmlString);
///
/// GetDllVersion
///
/// version as string
new public string GetDllVersion()
{
DllVersionInfoStructure dllInfo;
var returnValue = DllGetVersion(out dllInfo);
return dllInfo.DwBuildNumber.ToString();
}
///
/// CreateProjectFile
///
/// Error number
public int CreateProjectFile(string inputXmlString)
{
return (CreateSlopeWProject(inputXmlString));
}
///
/// ErrorMessage
///
/// Error as string
new public string ErrorMessage()
{
return (GetErrorMessage());
}
}
}