none
CreateFile() - WinCE 6.0 RRS feed

  • Question

  • Hi

    I am working on a WinCE 6 based device. I had to write some 'wrapper' drivers around some of the low level drivers in my BSP for a particular functionality.

    I have a general question and am wondering if somebody could pass on their comments.

    Is the call to CreateFile() from an application to get a handle to a driver quite time intensive (I am thinking of user space to kernel space switch here so may be time delay here)? I know my questions is vague, as I am not defining here what it that I call 'time intensive' but any general comments on this please.

    Also, for the context of above question, assume that the underlying Open() function in the driver is not doing any operation at - just returning the handle to some device context structure.

    Thanks,

    Samie

    Friday, November 26, 2010 2:04 PM

All replies

  • It is going to depend on what time intensive means and probably more so, how your wrapper functions are being used.  If your wrapper is called a lot and you call CreateFile() every time it is called, then the answer is yes CreateFile() is time intesive.  You are probably better off to have a wrapper functions for CreateFile() and CloseHandle().


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Proposed as answer by Srini_vasan Thursday, December 9, 2010 4:02 AM
    Friday, November 26, 2010 4:30 PM
    Moderator
  • Thanks.
    Tuesday, November 30, 2010 5:21 PM