none
How to call one driver IOCTL via another driver IOCTL?? RRS feed

  • Question

  • Dear Developers,

    Greetings!!

    As, I am stucking some where to use abc driver ICOTL command in xyz driver. I am using AM335x BSP with WINCe7 and I have one driver xyz and in the driver i want to call abc driver IOCTL command. Both Drivers are in the location as -

    CSP\COMMON_TI\COMMON_TI_AMXX

    As, this is first time when I am going to implement and that's why I have no idea for this..

    I am trying to test with KernelIoControl

    I have no idea that it will work or not????

    If anyone already used this method than please share KT.


    Tuesday, June 16, 2015 6:22 AM

Answers

  • hmmm why you wan't to bypass the functionality which is meant for it? Of course anything is possible. You could create an method in the driver and "extern" it and reach it that way. In your driver you can use loadlibrary and getprocaddress or link the (dll) library in the TARGETLIBS.

    But again it's completely valid and common sense to use CreateFile/DeviceIoControl if you are using StreamInterface driver.

    KernelIOControl is meant for IOCTL codes which is implemented in the OAL layer.


    Good Luck,

    Erwin Zwart, eMVP
    Check out my blog: http://guruce.com/blog
    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, June 16, 2015 9:28 AM

All replies

  • Calling another's device driver IOCTL method is done via DeviceIoControl()



    Good Luck,

    Erwin Zwart, eMVP
    Check out my blog: http://guruce.com/blog
    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, June 16, 2015 8:54 AM
  • Hello Erwin Zwart,

    Is it possible to to use DeviceIoControl without using any handle. Answer is No. I dont want to open device first from another driver than use DeviceIoControl and pass handle as a first argument. Is there any other way apart from this or not????

    I used KernelIoControl and I got an error as-

    ERROR_NOT_SUPPORTED
    50 (0x32)

    The request is not supported.

    Tuesday, June 16, 2015 9:09 AM
  • hmmm why you wan't to bypass the functionality which is meant for it? Of course anything is possible. You could create an method in the driver and "extern" it and reach it that way. In your driver you can use loadlibrary and getprocaddress or link the (dll) library in the TARGETLIBS.

    But again it's completely valid and common sense to use CreateFile/DeviceIoControl if you are using StreamInterface driver.

    KernelIOControl is meant for IOCTL codes which is implemented in the OAL layer.


    Good Luck,

    Erwin Zwart, eMVP
    Check out my blog: http://guruce.com/blog
    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, June 16, 2015 9:28 AM