none
IoIs32bitProcess(NULL) failed in Windows 10 RRS feed

  • Question

  • We have a working driver with the Kernel function IoIs32bitProcess(NULL) calls in IOCTL processing in Windows 7 and older. But the call failed in Windows 10. Resulting the 32-bit application failed in the 64-bit Windows 10 (64-bit driver). Anyone has information why IoIs32bitProcess(NULL) failed in Windows? Any information about what function to call in Windows 10?
    Thursday, December 8, 2016 7:33 PM

Answers

  • 1) there is no guarantee WDF will present the request in the app's context. you were getting lucky before. even on win7 it can fail

    2) there is a WDF API that does this for you, WdfRequestIsFrom32BitProcess

    3) you DO have a PIRP when you have a WDFREQUEST, WdfRequesetWdmGetIrp


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, December 9, 2016 5:00 PM

All replies

  • you are probably not in the context of the UM process when making the call. In what function // context are you calling this API? any reason you are not passing a PIRP?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, December 8, 2016 8:02 PM
  • Do you call it from a fast I/O dispatch routine?

    -- pa

    Thursday, December 8, 2016 8:18 PM
  • Because our IOCTL interface function does not have IRP. Attached is the ioctl function prototype:

    VOID myEvtDeviceIoDeviceControl
    (
        IN WDFQUEUE Queue,
        IN WDFREQUEST Request,
        IN size_t OutputBufferLength,
        IN size_t InputBufferLength,
        IN ULONG IoControlCode
    )

    The ioctl interface is created by the following setup:

        WDF_IO_QUEUE_CONFIG_INIT(&ioQConfig, WdfIoQueueDispatchParallel);

        ioQConfig.EvtIoRead =myEvtIoRead;
        ioQConfig.EvtIoStop = myEvtIoStop;
        ioQConfig.EvtIoWrite = myEvtIoWrite;
        ioQConfig.EvtIoDeviceControl = myEvtDeviceIoDeviceControl;

        status = WdfIoQueueCreate( device, &ioQConfig, WDF_NO_OBJECT_ATTRIBUTES, &queue /* queue handle */);

    Did we do something wrong?

    Friday, December 9, 2016 3:00 PM
  • 1) there is no guarantee WDF will present the request in the app's context. you were getting lucky before. even on win7 it can fail

    2) there is a WDF API that does this for you, WdfRequestIsFrom32BitProcess

    3) you DO have a PIRP when you have a WDFREQUEST, WdfRequesetWdmGetIrp


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, December 9, 2016 5:00 PM
  • I tried your suggestion at 2), it worked. Thank you for the information!

    jz

    Friday, December 9, 2016 7:13 PM