我在使用 Brother bpac SDK 时遇到了麻烦。我有一个应用程序,我正在尝试从中打印标签。以前可以,但我不知道现在出了什么问题。
这是我得到的错误: 由于以下错误,检索 CLSID 为 {B940C105-7F01-46FE-BF41-E040B9BDA83D} 的组件的 COM 类工厂失败:80040154 类未注册(HRESULT 异常:0x80040154 (REGDB_E_CLASSNOTREG))。
代码:
'Set up the path and template variables
Dim path As String = "LabelTemplates\SolutionIDtemplate.lbx"
'Create the bpac document
Dim doc As New bpac.Document
If doc.Open(path) <> False Then
doc.GetObject("objID").Text = id
doc.GetObject("objExpDate").Text = expDate
doc.GetObject("objName").Text = name
'Print the label
doc.StartPrint("", bpac.PrintOptionConstants.bpoDefault)
doc.PrintOut(copies, bpac.PrintOptionConstants.bpoDefault)
doc.EndPrint()
doc.Close()
Else
MessageBox.Show("Error: " + CStr(doc.ErrorCode))
End If
注意:该类在注册表中,我的项目设置为构建 32 位应用程序。我看过的所有地方都说去项目 > 属性 > 构建选项卡 > objective-c PU = x86。我已经这样做了,但问题仍然存在。任何帮助将不胜感激,因为我已经尝试了我能想到的一切。
提前致谢, 以利
最佳答案
为了将来引用,不要忘记为您的用户提供 b-pac 客户端设置(可以在“\Brother bPAC3 SDK\Redist\”文件夹中找到)。它必须安装在客户端机器上才能使用 dll。否则将抛出此错误。
关于vb.net - 兄弟标签打印COM引用错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26555126/