Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion damo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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�����ͷ�
// 调用此接口进行com对象释放
public void ReleaseObj()
{
if (obj_object != null)
Expand Down