[DllImport("dmcl40.dll", EntryPoint="dmAPIGet", CharSet=CharSet.Ansi, ExactSpelling=true,CallingConvention=CallingConvention.Cdecl)]
private extern static IntPtr dmAPIGet(string cmd);
public string Get(string command, params object[] args)
{
string cmd = String.Format(null,command, args);
IntPtr res = dmAPIGet(cmd);
return System.Runtime.Interop.Marshal.PtrToStringAnsi( res );
}
Partially complete... http://workspaces.gotdotnet.com/dm