locked
WinRT API IDeviceIoControl ->GetResults failing with invalid agrs

    Question

  • I have taken base code for accessing custom driver through guid from osrfx2 sample.

    http://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679

    And i tried to implement application in winrt, which access the ndislwf filter driver

    ICreateDeviceAccessAsync * access;

    IDeviceIoControl * deviceControl;

    hr = CreateDeviceAccessInstance((PCWSTR)L"\Device\{5cbf81bd-5055-47cd-9055-a76b2b4e3697}", GENERIC_READ | GENERIC_WRITE, &access);

    above call is success i am getting S_OK.

    hr = access->Wait(INFINITE);

    above call is success i am getting S_OK.

    hr = access->GetResult(IID_IDeviceIoControl,(void **)&deviceControl);

    above call failing with E_INVALIDARGS.

    and unable to get the devicecontrol to send ioctl.

    I mentioned guid in metadata file also.

    could anybody please help me


    A.David Preetham

    • Moved by Jesse Jiang Thursday, April 18, 2013 3:04 AM
    Wednesday, April 17, 2013 9:25 AM

All replies

  • Have you tried initializing deviceControl = nullprt?
    Wednesday, April 17, 2013 2:54 PM
  • should i need to allocate memory for access and deviceControl interface class objects?

    Instance path of CreateDeviceAccessInstance((PCWSTR)L"\Device\{5cbf81bd-5055-47cd-9055-a76b2b4e3697}) should be null terminated?


    A.David Preetham

    Thursday, April 18, 2013 4:45 AM
  • yes i have tried nullptr but no use.

    A.David Preetham

    Thursday, April 18, 2013 5:23 AM
  • Hi DavS22,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support.


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 18, 2013 5:33 AM
    Moderator
  • thank you Min

    A.David Preetham

    Thursday, April 18, 2013 5:34 AM
  • David,

    Have you tried enabling test signing and re-booting?

    Best Wishes - Eric


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

    Monday, April 29, 2013 7:32 PM
    Moderator