As documented in http://support.microsoft.com/kb/152201,
IoRaiseInformationalHardError() doesn’t allow me to display a custom
string to the user. Apparently the behavior by design for my particular
case is the following:
* When the Thread parameter is NULL or in arbitrary system context,
the popup’s title reads: “System Process - System Error,” and the
MessageText is written to the Event Log if ErrorStatus is defined in
ntstatus.h.
I would like the MessageText for IoRaiseInformationalHardError to be
shown in a dialog or whatever. Apparently I’m supposed to use the Event
Log APIs to communicate driver defined event strings to the user but I
haven’t found any suitable sample code to see how this is done. The link
above points me to src\general\errorlog to view a sample showing the
technique, but that sample is not available in any of my available DDK/WDKs.
Could anyone please suggest some source of information where I could see
how to achieve this? Some code would be great, but a simple set of
guidelines could prove more than enough. Obviously if any other
possibilities exist to show these error/information strings I would also
be very interested in hearing them!!
Thanks you very much beforehand,
Jaime Fullaondo
Jaime Fullaondo wrote:
As documented in http://support.microsoft.com/kb/152201,
IoRaiseInformationalHardError() doesn’t allow me to display a custom
string to the user. Apparently the behavior by design for my particular
case is the following:
* When the Thread parameter is NULL or in arbitrary system context,
the popup’s title reads: “System Process - System Error,” and the
MessageText is written to the Event Log if ErrorStatus is defined in
ntstatus.h.
I would like the MessageText for IoRaiseInformationalHardError to be
shown in a dialog or whatever. Apparently I’m supposed to use the Event
Log APIs to communicate driver defined event strings to the user but I
haven’t found any suitable sample code to see how this is done. The link
above points me to src\general\errorlog to view a sample showing the
technique, but that sample is not available in any of my available
DDK/WDKs.
Could anyone please suggest some source of information where I could see
how to achieve this? Some code would be great, but a simple set of
guidelines could prove more than enough. Obviously if any other
possibilities exist to show these error/information strings I would also
be very interested in hearing them!!
Thanks you very much beforehand,
Jaime Fullaondo
In Vista you can define a custom action triggered by event log messages,
which can display a popup.
On XP, some of status codes produce a balloon popup from the taskbar,
otherwise IoRaiseInformationalHardError behaves as described in that KB
article.
Regards,
–pa
The hard error mechanism is really not designed to allow drivers to interact with users. If you need UI like that, you would be best served by writing a custom user mode app that connects to your driver and receives notifications via a pended (inverted call) IOCTl, and displays UI in response.
Be sure to make your driver (and app) aware of multi-session scenarios like Terminal Server or Fast User Switching.
-----Original Message-----
From: Jaime Fullaondo
Sent: Tuesday, July 14, 2009 03:35
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IoRaiseInformationalHardError() doesn’t work as expected
As documented in http://support.microsoft.com/kb/152201,
IoRaiseInformationalHardError() doesn’t allow me to display a custom
string to the user. Apparently the behavior by design for my particular
case is the following:
* When the Thread parameter is NULL or in arbitrary system context,
the popup’s title reads: “System Process - System Error,” and the
MessageText is written to the Event Log if ErrorStatus is defined in
ntstatus.h.
I would like the MessageText for IoRaiseInformationalHardError to be
shown in a dialog or whatever. Apparently I’m supposed to use the Event
Log APIs to communicate driver defined event strings to the user but I
haven’t found any suitable sample code to see how this is done. The link
above points me to src\general\errorlog to view a sample showing the
technique, but that sample is not available in any of my available DDK/WDKs.
Could anyone please suggest some source of information where I could see
how to achieve this? Some code would be great, but a simple set of
guidelines could prove more than enough. Obviously if any other
possibilities exist to show these error/information strings I would also
be very interested in hearing them!!
Thanks you very much beforehand,
Jaime Fullaondo
—
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Some NTSTATUS codes have the resource strings with them which allow for the insertion string.
Use this NTSTATUS value, and specify the string as parameter to IoRaiseInformationalHardError.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
“Jaime Fullaondo” wrote in message news:xxxxx@ntfsd…
> As documented in http://support.microsoft.com/kb/152201,
> IoRaiseInformationalHardError() doesn’t allow me to display a custom
Thanks for your replies. I managed to get my custom message popup by
using STATUS_FATAL_APP_EXIT. Unfortunately STATUS_SERVICE_NOTIFICATION
was being ignored
But hey, I can use former error code for the time
being. Eventually I should fix this somehow, though.
Another issue is that Vista completely ignores this. No popup is shown
at all. Does anyone know why? Anything in particular I need to do?
Thank you very much.
Maxim S. Shatskih escribió:
Some NTSTATUS codes have the resource strings with them which allow for the insertion string.
Use this NTSTATUS value, and specify the string as parameter to IoRaiseInformationalHardError.