在c#

时间:2018-09-29 18:47:07

标签: vb.net

我需要使用以下代码使用原始打印来打印阿拉伯文本。但其印刷?????文字还原

    Public Function SendStringToPrinter(szPrinterName As String, szString As String) As Boolean
    If PrinterOpen Then
        Dim pBytes As IntPtr
        Dim dwCount As Int32
        Dim dwWritten As Int32 = 0

        dwCount = szString.Length

        pBytes = Marshal.StringToCoTaskMemAnsi(szString)

        SendStringToPrinter = WritePrinter(hPrinter, pBytes, dwCount, dwWritten)

        Marshal.FreeCoTaskMem(pBytes)
    Else
        SendStringToPrinter = False
    End If
End Function

0 个答案:

没有答案