Thanks so much for the help.
I ended up with what I needed and more.
public class PInvoke
{
const string ACDB_18 = "acdb18.dll";
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(ACDB_18, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "?acdbGetDbmod@@YAJPAVAcDbDatabase@@@Z")]
private static extern Int32 acdbGetDbmod18x32(IntPtr db);
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(ACDB_18, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "?acdbGetDbmod@@YAJPEAVAcDbDatabase@@@Z")]
private static extern Int64 acdbGetDbmod18x64(IntPtr db);
public static Int32 acdbGetDbmod(ref Database db)
{
switch (IntPtr.Size)
{
case 4:
return (Int32)(acdbGetDbmod18x32(db.UnmanagedObject) & 0x3d);
case 8:
return (Int32)(acdbGetDbmod18x64(db.UnmanagedObject) & 0x3d);
}
return 0;
}
public static object GetVar(Document doc, params object[] p)
{
return doc.AcadDocument.GetType().InvokeMember(
"GetVariable",
System.Reflection.BindingFlags.InvokeMethod,
null, doc.AcadDocument, p);
}
}