none
Unable to get CreateFile success function RRS feed

  • Question

  • Hi all,

         I am trying to communicate windows application to my driver for that implemented the DeviceIoControl. The Iocl that I am using is IOCTL_NDIS_QUERY_GLOBAL_STATS and I am sending vendor specific OID code. For that first we need createfile, in that one of the parameter is symboliclink. My driver architecture is described below path.

    https://github.com/Microsoft/Windows-driver-samples/tree/master/network/ndis/mux

    My driver is running successfully and I am able to scan available devices. In registery Service is showing RSI. The name that I used in driver is LINKNAME "\\DosDevices\\RSI". While trying to give the same link name at createfile function it is failing.

    Can any one tell the reason and how to solve it?

    Thanks.

    Wednesday, January 4, 2017 5:52 AM

Answers

  • The link name you used "\\DosDevices\\RSI", need the string "\\\\.\\RSI" in the CreateFile call.   If you look at any of the samples with an exe and a sys section (for instance the IOCTL sample) you would see examples of this.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 4, 2017 12:37 PM

All replies

  • Why not use device interface GUID?

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Wednesday, January 4, 2017 10:36 AM
  • The link name you used "\\DosDevices\\RSI", need the string "\\\\.\\RSI" in the CreateFile call.   If you look at any of the samples with an exe and a sys section (for instance the IOCTL sample) you would see examples of this.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 4, 2017 12:37 PM
  • Thanks Don Burn,

        You are correct, From the sample IOCTL Code form GitHub I am able to see your logic. I implemented that logic but it getting crashed my PC.

    Thanks 

    Wednesday, January 4, 2017 1:02 PM
  • For the crash enable crash dumps (more than the minidump), and then try the driver again.   Run Windbg and open the crash dump file, then issure "!analyze -v" and look at the output.   If the cause of the dump is not obvious, post it as a question on this forum.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 4, 2017 1:27 PM