Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: Cirujano on February 07, 2011, 10:15:54 PM

Title: Can i read print errors with wclclient_onData???? Vb6
Post by: Cirujano on February 07, 2011, 10:15:54 PM
I use the microsoft generic driver and for print i use this lines:
Code: [Select]
Dim s As String
    s = Chr$(27) + "P$" + Chr$(27) + "PP" + vbCrLf + "BeginPage();" + vbCrLf
    Dim arr() As Byte
    arr = StrConv(s, vbFromUnicode)
    resp = wclClient.Write(arr)

I tried to read the prints errors with this:
But nothing...
Private Sub wclClient_OnData(ByVal Buffer As Variant)
    printerStatus.Caption = Buffer
End Sub

Title: Re: Can i read print errors with wclclient_onData???? Vb6
Post by: Mike Petrichenko on February 08, 2011, 03:22:35 AM
Hi,

I don't know what is "print error" but string data can be read as the following

Private Sub wclClient_OnData(ByVal Buffer As Variant)
  Dim s As String
  s = StrConv(Buffer, vbUnicode)
  meAns.Text = meAns.Text + s
End Sub

Of course, Buffer must contain UNICODE string.
Title: Re: Can i read print errors with wclclient_onData???? Vb6
Post by: Cirujano on February 08, 2011, 02:34:48 PM
Thanks mike.