oblitum / Interception

The Interception API aims to build a portable programming interface that allows one to intercept and control a range of input devices.
http://oblita.com/interception
1.37k stars 267 forks source link

interception_receive always returns less than or equal to 0 #102

Closed y1cunhui closed 4 years ago

y1cunhui commented 4 years ago

I tried to run the sample codes, but it always exit after a flash of the command window. By adding some pause I find that the loop is always skipped, eg while(interception_receive(context, device = interception_wait(context), (InterceptionStroke *)&stroke, 1) > 0), while I don't press any key. I read most issues but still don't find how this problem occurs. Thanks!

y1cunhui commented 4 years ago

maybe there is something wrong when I run the installer? I run it as administrator and it just also behave as a flash of the command line window, and there is no log file so I don't know if I install it correctly...Sorry for bother you with so fundamental problem

y1cunhui commented 4 years ago

I found that the there is something wrong in create_context, but I don't know why...is there any other environment needed except for WDK?

oblitum commented 4 years ago

The only thing necessary to built examples is the WDK, but you actually don't need it if you're simply linking and using the library, you can use whatever build system for that. You have to install drivers as instructed, your issue seems duplicate of previous ones where the driver isn't installed. The installer is a command line program, clicking it won't install anything.

y1cunhui commented 4 years ago

Thanks! I got so stupid problem since I'm not familiar with windows command line...the problem is solved now