diff --git a/damo.cs b/damo.cs index eb17a4f..0b47f45 100644 --- a/damo.cs +++ b/damo.cs @@ -10,10 +10,16 @@ public class Damo public Damo() { obj = Type.GetTypeFromProgID("dm.dmsoft"); + + if (obj == null) + throw new InvalidOperationException( + "COM dm.dmsoft not found. Please verify that it is registered and that the project is set to x86.\"\r\n" + ); + obj_object = Activator.CreateInstance(obj); } - // 调用此接口进行com对象释放 + // 璋冪敤姝ゆ帴鍙h繘琛宑om瀵硅薄閲婃斁 public void ReleaseObj() { if (obj_object != null)