none
Facing problem while sending one structure from Driver to App via IOCTL. RRS feed

  • Question

  • I have

    typedef struct _ETH_HEADER_STRUC {
    UCHAR Destination[ETHERNET_ADDRESS_LENGTH];
    UCHAR Source[ETHERNET_ADDRESS_LENGTH];
    USHORT TypeLength;
    } ETH_HEADER_STRUC, *PETH_HEADER_STRUC;


    typedef struct _ETH_RX_BUFFER_STRUC {
    ETH_HEADER_STRUC RxMacHeader;
    UCHAR RxBufferData[(RCB_BUFFER_SIZE - sizeof(ETH_HEADER_STRUC))];
    } ETH_RX_BUFFER_STRUC, *PETH_RX_BUFFER_STRUC;

    So i want to send "PETH_RX_BUFFER_STRUC" to App when app will issue a IOCTL call for reading.
    When I try to do it i am getting CRASH.
    So please tell me how should i do it in a proper programmatic manner.
    Thursday, October 10, 2013 5:42 PM

All replies

  • Well the first thing I notice is you say sent PETH_RX_BUFFER_STRUC, instead you need to copy the whole structure i.e. ETH_RX_BUFFER_STRUC into the buffer the IOCTL supplies.   You don't give us enough information to be sure what the problem is.  If this is a crash in kernel space take the crashdump and then apply !analyze -v in Windbg to give us the data (be sure your symbol files are correct so we get something useful).  Also show us the code for the IOCTL handler.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Thursday, October 10, 2013 5:47 PM