Code: Select all
Private Sub StdOut(ByVal s As String)
Dim std = Console.OpenStandardOutput()
Dim arr = System.Text.Encoding.Unicode.GetBytes(s)
Dim len = arr.Length
For i = 0 To 24 Step 8
std.WriteByte(CByte((len >> i) And &HFF))
Next i
std.Write(arr, 0, len)
std.Flush()
End Sub
Is there anything wrong in the VB codes? Does anyone have experience in writing VB as native app for firefox extension? (I think there's no problem in the extension side and manifest.json of app.)JSON.parse: unexpected character at line 1 column 2 of the JSON data NativeMessaging.jsm:283
_startRead/this.readPromise< resource://gre/modules/NativeMessaging.jsm:283:11
JSON.parse: unexpected character at line 1 column 2 of the JSON data subprocess_common.jsm:479
readJSON/< resource://gre/modules/subprocess/subprocess_common.jsm:479:16
Environment:
Win 7 (32-bit), Firefox Developer (52.0a2), Microsoft Visual Basic 2008 Express