INVOKE錯誤
下面的代碼報錯,InterfaceOperator.HY_Print這句報錯。提示出下。

textBox1.Text = Application.StartupPath & "\" & txtLaxFileFullName.Text.Trim()
If Not IsNumeric(txtPrintSetup.Text) Then
Throw New Exception("打印份數出錯")
End If
printSetup = txtPrintSetup.Text
If Not FileIO.FileSystem.FileExists(textBox1.Text) Then
Throw New Exception("打印模板不存在")
End If
If InterfaceOperator.HY_OpenLax(textBox1.Text) Then
InterfaceOperator.HY_SetVariable("barcode", txtVarWord.Text.Trim(), "A", "B") '
InterfaceOperator.HY_SetVariable("T文字2", txtVarBarcode.Text.Trim(), "a", "c") '
InterfaceOperator.HY_Print(printSetup, txtPrinterName.Text.Trim(), cbPageWindowsShow.Checked) '《--------------這句報錯
Else
Throw New Exception("模板打開失敗")
End If

...全文
相关推荐
invoke和beginInvoke
很详细、明确的讲解了invoke和beginInvoke的区别,以及二者所用的场合和情况,如果需要确实值得一看
pinvoke-stack-bug:由输出参数中的结构打包导致的PInvoke错误的演示代码,将覆盖不相关的堆栈变量
我的演示代码,建议您在尝试该代码时阅读。
sentry-invoke
主要的 src / sentry-javascript-bundle.js 入口 index.html 玉雀
C#串口操作小例子,P/Invoke
C#串口操作小例子,P/Invoke 调用...........
P/Invoke Interop Assistant交互助手
可以把C/C++中的数据类型、结构体数据格式转换为C#或者VB版本中的对应格式类型。很方便


