Ask a questionAsk a question
 

AnswerWhat APIs are accessible from sensor driver?

Answers

  • Thursday, October 22, 2009 9:54 PMPrasanna PadmanabhanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi neil,

    Architecturally, there are no constraints on using any user mode APIs from an UMDF driver (which is what sensor drivers are). Having said that, I am not really familiar with the APIs you mention so I cannot conclusively say if they would work or not. If you have any specific problems, let us know and we will follow up on them.

    Thanks,
    Prasanna
    • Marked As Answer byneil.young Friday, October 23, 2009 11:22 AM
    •  
  • Friday, October 23, 2009 11:13 AMDan PolivyMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Neil,

    I believe the Native WLAN API should be OK, however WinINet is not officially supported for use in services, which is how the user mode driver runs.  See this article for more details:
    http://support.microsoft.com/kb/238425

    Instead, it is recommended that you use WinHTTP for network connectivity from within a service.  MSDN has some good documentation on this, and it is similar to WinINet in structure.  One thing to pay attention to is the use of proxy servers on certain networks--you should attempt to use the Auto Proxy configuration wherever possible to ensure the broadest compatibility.

    Dan
    • Marked As Answer byneil.young Friday, October 23, 2009 11:22 AM
    •  

All Replies

  • Thursday, October 22, 2009 9:54 PMPrasanna PadmanabhanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi neil,

    Architecturally, there are no constraints on using any user mode APIs from an UMDF driver (which is what sensor drivers are). Having said that, I am not really familiar with the APIs you mention so I cannot conclusively say if they would work or not. If you have any specific problems, let us know and we will follow up on them.

    Thanks,
    Prasanna
    • Marked As Answer byneil.young Friday, October 23, 2009 11:22 AM
    •  
  • Friday, October 23, 2009 6:48 AMneil.young Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Prasanna,

    thanks for confirming my expectations.

    Regards


    neil
  • Friday, October 23, 2009 11:13 AMDan PolivyMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Neil,

    I believe the Native WLAN API should be OK, however WinINet is not officially supported for use in services, which is how the user mode driver runs.  See this article for more details:
    http://support.microsoft.com/kb/238425

    Instead, it is recommended that you use WinHTTP for network connectivity from within a service.  MSDN has some good documentation on this, and it is similar to WinINet in structure.  One thing to pay attention to is the use of proxy servers on certain networks--you should attempt to use the Auto Proxy configuration wherever possible to ensure the broadest compatibility.

    Dan
    • Marked As Answer byneil.young Friday, October 23, 2009 11:22 AM
    •  
  • Friday, October 23, 2009 11:24 AMneil.young Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Dan,
    thanks for pointing that out. I'm not bound to WinInet, it just sprang into my mind first :) I just have to HTTP GET a couple of things.

    Kind regards and thanks to you both.
    Have a great weekend

    neil
  • Friday, October 23, 2009 4:24 PMWindowsNT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    There is a number of APIs you can't call from UMDF driver even if it runs in user mode. For example the HID apis do not work as I recently discovered and we discussed it in another thread 

    Also remember that the UMDF drivers run in the context of local service api and you can't do some things - for example you cannot show a Window.



    Michael