如何在运行时检查 dll 是否已正确注册?目前正在尝试以下操作,但即使它已使用regsvr32
. Assembly 类是否仅适用于系统程序集,如果可以,我自己的程序集使用什么?
'check com dll connection for diagnostics
Try
Dim asm As Assembly = Assembly.LoadWithPartialName("mycomdll.mycomclass")
DebugText.AppendText("DLL registered" + vbNewLine)
Catch ex As Exception
DebugText.AppendText("DLL test failed" + vbNewLine)
DebugText.AppendText(ex.ToString() + vbNewLine)
End Try