locked
Screensaver + Touchscreen HID Input RRS feed

  • Question

  • I'm trying to create a touch screen enabled screensaver that's active as the default (no one logged in) screensaver.  (Windows 7 system).

    I have the screensaver written and

    - it works if I am logged in.  

    - It works If I am logged in and locked.

    But, if I am logged out, it runs fine, but will only receive Mouse Input and ignores the touch screen.

    The touch driver appears loaded as when you touch on the login screen it reacts and moves the pointer.  But when the screensaver activates... touch is disabled.

    I am hoping this is just a driver configuration I can control or at worst I need to tell my application to wake up the touch screen.

    I fear I am going to have to actually rawinput register my application and handle all the touches myself.

    Anyone have any suggestions of similar problems.

    Friday, July 21, 2017 6:34 PM

All replies

  • Hi,

    Thank you for posting here.

    As far as I know that you can make a screensaver application which can monitor mouse event and touch driver event.

    For monitor mouse event, you can use the Mouse Input that descripts the system provides mouse input to your application and how the application receives and processes that input.

    For monitor touch event, please see the touch Input and Getting Started with Windows Touch Messages .

    If you encounter some issue when developing software, please feel free to contact me.

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Hart Wang Tuesday, July 25, 2017 9:40 AM
    Monday, July 24, 2017 2:09 AM
  • From what I can tell, trying numerous methods.  

    Option 1: LOGGED IN + LOCKED + SCREENSAVER

    • All input appears to work.  No extra work necessary.
    • I can write code to access RawInput (RegisterRawInputDevices)
    • I can write code to try and get "Touch Input" but the screen appears to use HID compliant mouse type drivers and not "Touch" so "Touch Input" does not work.  (RegisterTouchWindow does nothing)
    • Yes, you can monitor mouse events in this scenario.  

    Option 2:  LOGGED OUT + SCREENSAVER

    • I CAN get mouse events. 
    • Screen saver ignores touch events from monitor as an HID compliant mouse.
    • Connecting to RawInput gets no messages from touch screen.  (RegisterRawInputDevices does not work)
    • Monitoring Touch events does nothing. (RegisterTouchWindow does nothing)

    I am willing to try and talk directly to the device, but not having much luck in that regard.

    I was hoping there was a driver option I could set that would indicate it should be awake in this combination.

    The confusing part is that the driver appears to be awake when the screen saver isn't active.  So, I am guessing the screensaver runs in a different context (when logged out).

    I thought, perhaps that the drivers were just inaccessible, so I used GetRawInputDeviceInfo to query devices from the screen saver and they are all listed... in both scenarios.  Driver is there, just not active.



    Tuesday, July 25, 2017 12:20 PM
  • Hi Patrick Meyer,


    Thank you for your feedback. 

    >>" I am willing to try and talk directly to the device, but not having much luck in that regard. "

    If you want to call directly to device driver, you can try to use the DeviceIoControl function, which sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.

    An application can use the DeviceIoControl function to perform direct input and output operations on, or retrieve information about, a floppy disk drive, hard disk drive, tape drive, or CD-ROM drive. 

    The  example demonstrates how to retrieve information about the first physical drive

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 26, 2017 7:45 AM
  • Is there not a simpler way than trying to directly talk to the device?

    That is, a registry setting to tell windows to have the touchdriver not be ignored during (default profile) screen saver?

    Wednesday, July 26, 2017 2:24 PM
  • Is there not a simpler way than trying to directly talk to the device?

    That is, a registry setting to tell windows to have the touchdriver not be ignored during (default profile) screen saver?

    What I think is happening, as I try to figure this thing out...

    The "Tablet Input Service" is choosing to block input from the driver when the screen saver is active.

    So, trying to connect to it would be a pointless task because there is no input being received.

    .... I THINK.

    I don't know this.... I just know that when the screen saver comes up... I stop getting data from the device even if MY screensaver is able to startup the TabletPlatform... I can call the driver... but the moment the screen saver enables... data stops.

    This doesn't happen on a locked-screen saver... just no-profile.  Something is different for that config and it sure seems like a setting could fix it.

    Wednesday, July 26, 2017 5:43 PM
  • Hi,

    As far as i know that the the DeviceIoControl function provides a device input and output control (IOCTL) interface through which an application can communicate directly with a device driver. The DeviceIoControl function is a general-purpose interface that can send control codes to a variety of devices. Each control code represents an operation for the driver to perform.

    I didn't find out the easier method to access the device.

    About how to access the device driver, you can post the issue on here.

    Best Regards,

    Hart 


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 1, 2017 7:53 AM
  • I will likely give this a go, if I can figure out how to do this from C#.

    I wrote the company that created the driver.  Their claim is that the driver appears to shut down in HID-only mode which is all you get while at the log-in screen.   

    I'm not sure DeviceIoControl will fix the problem, but if it does, I'll sure ping back.

    Wednesday, August 2, 2017 12:43 PM
  • Hi,

    If you want to call the DeviceIoControl  method from the C#, you need to use the PInvoke. 

    Here is solution for how to use the DeviceIoControl method from c#.

    https://stackoverflow.com/questions/17268889/pinvoke-deviceiocontrol-parameters

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 8, 2017 8:55 AM