none
How to use DDraw functions inside driver. RRS feed

  • Question

  • Hi All,

     

    I am trying to use DDraw API's in side the driver to directly render image data on to the display surface.

     

    For example if i am using the API DirectDrawCreate() i am getting error no - 193.

     

    I want these API's to be used in driver What could be the best way to use it.

     

    Shall i write a user mode driver and use exported functions.

     

    Thanks

    Misbah

    Tuesday, October 5, 2010 5:46 PM

All replies

  • Misbah:

    First, do the DDraw functions work outside of your driver - like in a user mode application?  If they do, the problem is that you cannot do user interface functions from within a kernel mode driver (starting in Windows CE 6.0).

    You could first try setting your driver to be loaded by the user mode device manager.  That may work.

    You could also try creating a UIProxy, see http://geekswithblogs.net/BruceEitman/archive/2009/01/10/windows-ce-6.0-using-uiproxy.aspx

    Note that error 193 means one or more of the following:

    • The binary is not a Windows CE binary
    • The binary is for a later version of Windows CE
    • The binary is not for the CPU that you are using
    • A dll that the binary needs can't be found
    • A function that the binary needs from a dll can't be found

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

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, October 5, 2010 6:51 PM
    Moderator
  • Hi Bruce,

     

    Thanks for the reply.

    [Bruce]First, do the DDraw functions work outside of your driver - like in a user mode application?

    [Misbah] yes, the mosquito.exe (sample exe) runs perfectly in my target.

    [bruce] You could first try setting your driver to be loaded by the user mode device manager.  That may work.

    [Misbah] My driver is using kernel resources hence i cannot make it as user mode. I may have to write another user mode driver to render buffer over video layer and export api's to my driver.

    Your defination for the error no helped me alot.

    My requirement :- from the kernel space i need to draw over video layer.

    I pretend to go in this way :-

    I should write a user mode driver which should use DDraw functions to draw over the video layer.

    i should export these functions in my driver to to render video data.

     

    Issue :-

    I tried to use mosquito source copied it to my BSP and compiled and it compiles and creates static library.  if i want this as an exe it doesent compile. how the mosquito.exe is created with the source at "C:\WINCE600\PUBLIC\DIRECTX\SDK\SAMPLES\DDRAW\SRC\MOSQUITO"

     

    Need your help :-

     

    Is my approach correct ?

    Is there a better way of doing the same task ?

     

    Please share your thought .

    Thanks

    Misbah

     

     

    Wednesday, October 6, 2010 12:39 PM