Barcodedll.dll

vitramir

Member
Licensed User
Hi,
I bougth Pretec SD Barcode. And there were a programm for working with this device it uses barcodedll.dll. Can somebody tell me how can I use this .dll in Basic4PPC?
 

Attachments

  • BarcodeDll.zip
    3.2 KB · Views: 227

agraham

Expert
Licensed User
Longtime User
Bsaically you can''t. It is a native code dll, not a .NET assembly. See this post http://www.b4x.com/forum/showthread.php?p=8328#post8328

To use it you would need a "wrapper" dll written in a .NET language and to write that you would need a list of the entry point names in the dll and definitions of their parameter lists and return types.
 

agraham

Expert
Licensed User
Longtime User
As I said above
you would need a list of the entry point names in the dll and definitions of their parameter lists and return types.
Even if you have Visual Studio or SharpDevelop you would still need this information to make the dll - so it looks like you can't!
 

sunnyboyj

Member
As every barcode-scanner it's just a normal 'keyboard' when you scan a barcode. Therefore you can just use the scanner as a keyboard and make your PPC program as you would make it when would not have one. The only smart thing to do is make your scanner make a CR after scanning a barcode. You can use that to scan a barcode and confirm it via the CR. I have used the same way with my Symbol scanner and it works great!
 

vitramir

Member
Licensed User
Thank you dzt, but this programm is not handy for me. I need more options. I have made my own programm VShtrih (http://www.avvsoft.ru/actpage.php?$npage=download). It is more handy but it has only russian translation. In future I want to translate it in english.

Thank you sunnyboyj. Pretec barcode-scanner work only then their driver is work. But if you turn off the device, scanner won't work until you restart the driver. And I want use dll in my programm to stop this error. I can start and close driver in my programm but I can't check when scaner is connected to device and when it is not. It is important becourse if you start driver before you connect scanner, scanner won't work.
And what is CR?
 
Last edited:

prinsen

Member
Licensed User
CR is carriage return / just a return after scanning a barcode; when you do it like that you can program that it goes to the next field:
firest input: scan sscc code (CR)
second input: scan batchcode (CR)

some program which makes a lot of checks regarding the first input sscc-code:

Sub QTSSCCcode_KeyPress (key)

If QTSSCCcode.Text="" AND Key=Chr(13) Then
Msgbox("SSCC code scannen")
Return
End If

If IsNumber (QTSSCCcode.Text) = False AND Key=Chr(13) Then
Msgbox("Dit is geen SSCCcode")
qtsscccode.Text=""
Return
End If

If StrLength(QTSSCCcode.Text) <> 6 AND Key=Chr(13) Then
Msgbox("moet 6 karakters zijn")
qtsscccode.Text=""
Return
End If

If Key=Chr(13) Then
QTvanlok.Focus
QTvanlok.SelectionStart = 0 'goes to the next field named QTvanlok!
End If

End Sub
 
Last edited:
Top