Xojo Conferences
XDCMay2019MiamiUSA

[MBS] WinHIDMBS Trouble (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] AES encryption with progress bar
Next thread: [MBS] NSViewMBS & Canvas


Re: [MBS] MBS Icon Routines redefined?   -   Garth Hjelte
  [MBS] WinHIDMBS Trouble   -   A. Christopher Rosado
   Re: [MBS] WinHIDMBS Trouble   -   Christian Schmitz

[MBS] WinHIDMBS Trouble
Date: 06.04.15 16:31 (Mon, 6 Apr 2015 11:31:58 -0400)
From: A. Christopher Rosado
Hi Christian,

I’ve used WinHIDMBS successfully in the past with the code sample below but since the update that added Pollsize to the Listener, it seems to go deaf and then hang in the first Do Loop.

Sub HIDListen()

#If TargetWin32 then
Dim S as String
Dim i as Integer
Dim m as MemoryBlock

if WinHIDConnect.Product="Griffin PowerMate" then // Find Device
if WinHIDConnect.Connect then

call WinHIDConnect.InstallListener 9
do
// Connect works, then seems to go deaf and loop here until hang
m=WinHIDConnect.PollMemory
app.YieldToNextThread
loop until m<>Nil
s=""
for i=0 to 5
s=s+str(m.Byte(i))+" "
next

end if
end if

Do
app.YieldToNextThread
Loop Until AllowNewData=True

ReceiveDevData=s
AllowNewData=False // Process received data before accepting new
NewCycle //Reset and start again

#endif

TIA,
—Christopher
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] WinHIDMBS Trouble
Date: 06.04.15 18:52 (Mon, 6 Apr 2015 19:52:49 +0200)
From: Christian Schmitz

> Am 06.04.2015 um 17:31 schrieb A. Christopher Rosado <<email address removed>>:
>
> Hi Christian,
>
> I’ve used WinHIDMBS successfully in the past with the code sample below but since the update that added Pollsize to the Listener, it seems to go deaf and then hang in the first Do Loop.
>

Difficult to say from here. But since we got ReadMessage with timeout, I don't use the install method any more myself.
Just use it and read what's arrived with short timeout.

Sincerely
Christian