| |
|
|
- Page 1 - |
|
![Erasmus.Herold: 05/04/19](.././../../i/a/5842.gif) Erasmus.Herold | Hello dear Community.
want it of these Topic once more quite different try, To Help come. The COM interface on the PC auszulesen is with XProfan simply.
How see it from with the USB interface? has someone itself on it attempts and has Codeschnipsel for me?
Please no Discussion circa driver, Windowshoheiten or USB2COM Adapter, separate To this Thread Please only whom replacement, whether someone with XProfan USB directly read can.
thanks you. |
|
|
| |
|
|
![](.././../../i/hr.gif) |
« this Posting watts as Solution marked. » |
|
![Paul Glatz: 05/06/19](.././../../i/a/916.gif) Paul Glatz | The "1995378067" in hScanner& is a lever the unit and will between Program- or Computerneustarts Change. The Gerätename (\\?\HID#VID_????&PID_????...) ought to konstant stay.
i'm no Possibility famous the value view. but The VID/PID sees one in tools-manager under "Hardware-IDs". |
|
|
| |
|
![](.././../../i/hr.gif) |
|
|
![Paul Glatz: 05/04/19](.././../../i/a/916.gif) Paul Glatz | Hi,
for HID tools have I yet (outside of XProfan) HIDAPI [...] uses.
The Windows provided HID APIs prohibit however whom Access to HID-Tastaturen and Mäuse.
for the usage of HIDAPI in XProfan have I time one small Beispielprogramm angehangen.
Download
for the Access to HID-Tastaturen and Mäuse or others (not HID) USB tools is a separater driver necessary. libusb [...] contains a driver the one with a own Program kompletten Access to one USB-unit sustain. |
|
|
| |
|
|
|
![Erasmus.Herold: 05/04/19](.././../../i/a/5842.gif) Erasmus.Herold | the hears itself already once lovely on. will be I short-term testing.
means means. 1. I must whom lastly named additional driver install? 2. The HIDAPI download and provide? 3. the small Demoprogramm testing?
Greeting and THANK YOU Erasmus |
|
|
| |
|
|
|
![Paul Glatz: 05/04/19](.././../../i/a/916.gif) Paul Glatz | for HIDAPI need one none driver and the hidapi.dll have I in the zipper with provided.
whom driver need one for libusb. with libusb must one itself around the complete USB communication self concern. moreover have I no Demoprogramm. Perhaps try I tommorrow time one to create. |
|
|
| |
|
|
|
![Erasmus.Herold: 05/05/19](.././../../i/a/5842.gif) Erasmus.Herold | Hello Paul.
One first Test sees already time none so badly from. enclosed one Screenshot. I erkenne my 6 USB Anschlüsse. moreover one Info on associated keyboard and mouse of Logitech. ![](.././../../i/s/__upl_ext_1100084240.gif)
from the remoteness missing me today on the sunday The power, a Barcode-Scanner and / or a RFID-Reader on USB anzuschließen. ![](.././../../i/s/qq5.gif)
be tensely, whether I then a direct grabbed hereon get and z.B. a gescannte EAN directly into a Variable abgreifen can. |
|
|
| |
|
|
|
![H.Brill: 05/05/19](.././../../i/a/86.gif) H.Brill | The Barcode Reader becomes by me too recognized.
where I already Internet Examples in C / Delphi etc. seen have, The without libusb whom Scanner discern or. read can.
the goes too through API and wm_input and suitable Structures. first must then one unit with RegisterRawInputDevices announced go. there come only Standardkonstanten to, The in the MSDN described are.
it'll hold difficult, there XProfan only The most important standard-Messages durchläßt. accordingly must one probably The Messageverwaltung turn off and GetMessage works, what but with of/ one grafischen user- surface (GUI) very hinderlich is.
with Rolands example with GetMessage (Messageverwaltung self take) I get z.B. at reading one Barcodes in that Edit The Message 257.
means becomes there already a Message skillful.
one could too a advanced keyboard - Hook write, the defined Tastenkürzel abfängt. moreover must one then against whom Scanner so konfigurieren, that Beginning and end the Barcodes with a from the keyboard unerreichbaren virt. Tastencode marked becomes. but rather would it, everything without Editfeld and in the background To make. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 05/05/19 ▲ |
|
|
|
|
![Paul Glatz: 05/05/19](.././../../i/a/916.gif) Paul Glatz | i'm with the Search after a Possibility a Barcode Scanner auszulesen already on RegisterRawInputDevices punched.
however have I over RawInput no Possibility found in order to verhinden, that The Inputs the Scanners additional to the RawInput Messages as normal Tastatureingaben gesendet go.
accordingly becomes z. B. if strain one Editfeld whom Focus has the Barcode additional there association or if one Button select is becomes this by the Barcodescanner triggered (if the Scanner end the Barcodes Enter "drückt"). |
|
|
| |
|
|
|
![H.Brill: 05/05/19](.././../../i/a/86.gif) H.Brill | well the would already what. The Editfields could one indeed with $00CF on Read only settle, if the Barcode eintrifft and to the reading again zurücksetzen. or do you need absolutely the ENTER in the Barcode ? |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 05/05/19 ▲ |
|
|
|
|
![Erasmus.Herold: 05/05/19](.././../../i/a/5842.gif) Erasmus.Herold | thanks for ideas and Approaches. Gleichwohl of einfachen (luxurious) Erfassen á la COM is it still distant. Greeting Erasmus |
|
|
| |
|
|
|
![H.Brill: 05/05/19](.././../../i/a/86.gif) H.Brill | take off a Scanner have you got because ? Can whom not adjust on COM Emulation ? |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 05/05/19 ▲ |
|
|
|
|
![Erasmus.Herold: 05/05/19](.././../../i/a/5842.gif) Erasmus.Herold | very this is my Ansatz. an Solution in XProfan for pure USB tools to find. Via COM is never a problem. |
|
|
| |
|
|
|
![Paul Glatz: 05/05/19](.././../../i/a/916.gif) Paul Glatz | have again with RawInput rumprobiert and a Possibility found around the Inputs the Scanners abzufangen.
the Program setting if a input of Scanner recognized becomes whom Focus into verstecktes Edit and if one Enter of Scanner comes becomes the Focus the ursprüngliche Control reset and the Barcode can from the hide Edit red go.
have straight no Barcodescanner to that testing there and could it therefore only with of/ one second keyboard testing.
Struct RAWINPUTDEVICE = usUsagePage%, usUsage%, dwFlags&, hwndTarget&
Struct RAWINPUTKEYBOARD = dwType&, dwSize&, hDevice&, wParam&, MakeCode%, ? Happen?%, Reserved%, VKey%, Message&, ExtraInformation&
Def RegisterRawInputDevices(3) !"User32", "RegisterRawInputDevices"
Def GetRawInputData(5) !"User32", "GetRawInputData"
Def GetRawInputDeviceList(3) !"User32", "GetRawInputDeviceList"
Def GetRawInputDeviceInfoA(4) !"User32", "GetRawInputDeviceInfoA"
Window Title "RawInput"
Window 1000, 600
SubClass %HWnd, 1
Declare hScanner&, CodeStatus%, CodeFocus&
DrawText 5, 5, "Scanner:"
Var hDev& = Create("ChoiceBox", %hwnd, 1, 5, 25, Width(%hwnd) - 10, 300)
AddDevices hDev&
Create("Button", %hwnd, "Testbutton", 5, 60, 200, 25)
Create("Edit", %hwnd, "Testedit", 5, 90, 200, 25)
Var hCode& = Create("Edit", %hwnd, "", 2000, 2000, 0, 0)// Verstecktes Text box for Barcodeeingabe
Var hLog& = Create("MultiEdit", %hwnd, "", 5, 120, Width(%hwnd) - 10, Height(%hwnd) - 125)
// RawInput Register
Declare rid#
Dim rid#, RAWINPUTDEVICE
rid#.usUsagePage% = 1// RegisterRawInputDevices
rid#.usUsage% = 6// Keyboard
rid#.dwFlags& = 0// $30 /* RIDEV_NOLEGACY */
rid#.hwndTarget& = %hwnd
Ifnot RegisterRawInputDevices(rid#, 1, SizeOf(rid#))
MessageBox("RawInput couldn't registered go " + Hex$(%WinError), "", 0)
EndIf
// Hauptschleife
While 1
WaitInput
If Clicked(hDev&)
hScanner& = Val(SubStr$(GetText$(hDev&), 2, "|"))
ElseIf %MenuItem = 1234
SetText hLog&, GetText$(hLog&) + "Barcode red: " + GetText$(hCode&) + "\n"
EndIf
EndWhile
Proc AddDevices
Parameters hList&
Declare numDevices&, devices#, hDevice&
GetRawInputDeviceList(0, Addr(numDevices&), 8)
If numDevices& = 0
Return
EndIf
Dim devices#, numDevices& * 8
GetRawInputDeviceList(devices#, Addr(numDevices&), 8)
WhileLoop numDevices&
If Long(devices#, (&Loop * 8) + 4) = 1/* RIM_TYPEKEYBOARD */
hDevice& = Long(devices#, &Loop * 8)
AddStrings(hList&, GetDeviceName(hDevice&) + "|" + Str $(hDevice&))
EndIf
EndWhile
ENDPROC
Proc GetDeviceName
Parameters hdev&
Declare buf#, len&
GetRawInputDeviceInfoA(hdev&, $20000007 0, Addr(len&))/* RIDI_DEVICENAME */
If len& = 0
Return ""
EndIf
Dim buf#, len&
GetRawInputDeviceInfoA(hdev&, $20000007 buf#, Addr(len&))/* RIDI_DEVICENAME */
Return String $(buf#, 0)
ENDPROC
SubClassProc
If SubClassMessage(%hWnd, $00ff)/* WM_INPUT */
Declare raw#
Dim raw#, RAWINPUTKEYBOARD
Var size& = SizeOf(raw#)
Ifnot GetRawInputData(&sLParam, $10000003 raw#, addr(size&), 16) == -1/* RID_INPUT */
If (raw#.hDevice& = hScanner&) AND ((raw#.flags% & 1 = 0)/* RI_KEY_BREAK */
Ifnot GetFocus(hCode&)
CodeFocus& = %GetFocus
SetFocus(hCode&)
SetText hCode&, ""
EndIf
If raw#.VKey% = 13// scancode 13 = Enter
SetFocus(CodeFocus&)
CodeFocus& = 0
SetMenuItem 1234
EndIf
EndIf
EndIf
EndIf
ENDPROC
|
|
|
| |
|
|