标题: Vb.net(Win) 错误RawPrinterHelper OpenPrinter has unbalanced the stack [打印本页] 作者: 资讯王 时间: 2012-4-18 22:35 标题: Vb.net(Win) 错误RawPrinterHelper OpenPrinter has unbalanced the stack 教学-如何How to send raw data to a printer by using Visual Basic .NET http://support.microsoft.com/kb/322090
打印错误RawPrinterHelper::OpenPrinter' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Don't use this:
别用
Public Shared Function OpenPrinter(ByVal src As String, ByRef hPrinter As IntPtr, ByVal pd As Long) As Boolean
Use:
请用
Public Shared Function OpenPrinter(ByVal src As String, ByRef hPrinter As IntPtr, ByVal pd As IntPtr) As Boolean