Why IOCTL dose not return corrent error message

device driver

    Sponsored Links

    Next

  • 1. driver resource confilct with new driver
    Hi, I am working on WDF PCI driver, when i installed new WDF driver, which actually detects, if any old driver is installed, if so, detects and removes the same using install sheild uninstallString setup, once the remove is complete, my new driver will be installed. After the new driver installed, In device manager, it shows that, there is a resource conflict, system to be restarted to resolve the resource conflict. Though there is conflict, after i installed the new driver XP-32, system doesnt shows the message that, system is required to restart, but it shows in device manager. After i restarted the system, device works fine. Old driver installed through: Install sheild setup, which is NT model driver New driver: Using WDF model & using DIFX toools to install the driver and Visual studio setup & deployment wizard supported through DPINST tool. Questions: 1> When my new driver installed, why the system doesnt show that, it is requied to restart 2) Is there any way to detect the system restart required through VS 2005 Setup & deployment wizard and show a message to the user, so that user can restart the pc 3) After my old driver got installed, using any tool like devcon or any other.., can i free the PCI driver resources?, so that, before new driver will be installed, it wont get a message about resource conflict? Thanks, Kota
  • 2. Disabling copy/paste operation on files
    Hi, I want to disable the copy paste operation on files in my system. Is there a way to disable the clipboard? Or can I write some sort of fsfilter for this? Thanks in advance Fuaad
  • 3. Driver installation with a dll only
    I have managed to build another sample driver in visual studio, but I have only managed to build a dll out of it only. I'm wondering if there is a way to install that driver, although I'm having trouble finding documentatons about that.
  • 4. installing a protocol driver
    Hello, I am trying to use the DPInst tool for installing a protocol driver. I have made the necessary changes to the dpinst.xml file. When I run the dpinst.exe tool, the wizard goes through all the steps successfully. But then when I check in the "Network Connections" applet, the protocol driver is not bound to the network driver. I also do not see my .sys file copied in the "\Windows\system32\drivers" folder. What could I be doing wrong? What are the common mistakes made with the dpinst tool? Any suggestions would be greatly appreciated. -- Ketan Mehta

Why IOCTL dose not return corrent error message

Postby TWF5 » Sun, 21 Sep 2008 01:29:01 GMT

Hi, 
I want to return different error to the IOCTL caller from my driver. I set 
the status to different error code from Ntstatus.h, than, call GetLastError() 
after IOCTL return at application caller function. But the GetLastError 
always return 1, IOCTL status return 0. Why is that? How can I make this work?

Thanks,

May

Re: Why IOCTL dose not return corrent error message

Postby Pavel A. » Sun, 21 Sep 2008 05:11:21 GMT

Use only these NTSTATUS values that have defined mapping
to win32 errors. See description of RtlNtStatusToDosError .

--pa





Re: Why IOCTL dose not return corrent error message

Postby Tim Roberts » Mon, 22 Sep 2008 12:51:07 GMT



Are you sure you are changing the right ioctl handler?  Error 1 in
ERROR_INVALID_FUNCTION, which should comde from STATUS_NOT_IMPLEMENTED.

If you return a status codde in the range 0xE0000000 to 0xEFFFFFFF, the
error code should be passed through to user mode unchanged.
-- 
Tim Roberts,  XXXX@XXXXX.COM 
Providenza & Boekelheide, Inc.

Similar Threads:

1.[PATCH 2/2] rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver

2.USB driver dose not recognize my modem

3.WLK not-error message!!

I am getting ready for driver signing. I compiled and tested my drivers in 
WDK 6000. I was trying to install WLK 1.2.6475.0 to do necessary tests. It 
first complained I have to uninstall WDK 6000 because it is "legacy 
component". I dont understand this but uninstalled WDK 6000 anyway. Then I 
ran WLK hoping it may install newer version of WDK. It didnot. Then I thought 
may be I have to install newer version of WDK 6001 myself later. Let me 
atleast install the "driver test manager" for now. But then it says "No 
configuration scenario meets install criteria". I have no clue what this 
message mean. 

Should I now install newer WDK 6001 or something and then run this WLK later?

Thanks,
Raj

4.CreateFile problem returning error (The network request is not supported)

Hi,
 I written a win2k plug n play driver for pcmcia 16 bit PC card.From my
application I want to open a hendle for our device. In my Application I
used SetupDi* functions to get the Device name. Later I called the
CreateFIle() function.

        After calling SetupDi* functions finally I got Device interface
name in string variable
 deviceInterfaceDetailData->DevicePath.
I called the above string variable as first parameter in CreateFile()
function.
 My Device Interface name string is

"\\?\pcmcia#apoorva_1553_pcmcia_card..-apollo_c.labs-77f7#1#{643e59f2-a018-432c-87c3-9bfc-93b5bedc}"

HANDLE hndfpga;
CreateFile(deviceInterfaceDetailData->DevicePath,
GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);

If I call the above function Iam getting the return value as
INVALID_HANDLE_VALUE, With GetLastError() function Iam getting the
error code 50.which is nothing but,
"The Network Request is not supported".

What could be the reason? Any mistake is there in the above procedure
please correct it.
Or if any other methods are there to get a handle of a device please
guide me.

Thanks in Advance.

Mahi.

5."Margins Do Not Fit Page Size" Error Message After You Switch the Printer Driver

6. "Margins Do Not Fit Page Size" Error Message After You Switch the Printer Driver

7. Get Error message USB driver would not load

8. critical update will not allow power DVD to function (error message)



Return to device driver

 

Who is online

Users browsing this forum: No registered users and 36 guest