Hello,
in AutoCAD 2012 the key for PostCommand has changed I wanted to solve this not by subclass the function but to create a static property to assign the key.
private static string PostCommandEntryPoint
{
get
{
if (Product.AcadRel < 18.2)
return "?acedPostCommand@@YAHPB_W@Z";
else
return "?acedPostCommand@@YAHPEB_W@Z";
}
}
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = PostCommandEntryPoint)]
private static extern int acedPostCommand(string strExpr);
Unfortunately, MSVS notes that "EntryPoint =" needs a constant or typeof or array creation expression. Is there another chance to make it variable?
Thanks Fred