Calling IoRaiseInformationalHardError ddk API in Vista

I am having trouble using IoRaiseInformationalHardError in Vista. Looks like any attempt to display error message through this API while in system process context doesn’t make it to the desktop/window station associated with the logged on user. By munging the EPROCESS value (to a process that has access to current desktop) while executing the APC queued by this hard error call, I was able to confirm that the problem was related to the port associated with the system process and that listner port process’s access to desktop etc. I was going to pass a non-system thread to this API as a workaround but I was wondering why this API is implemented the way it is in Vista - The likelyhood of a ddk API like this one being called in system process context is very high. That being the case, why wouldn’t the internal implementation take care of this case. More important, why wouldn’t the documentation for this API callout this vista specific anomaly (assuming I am looking at the right doc)?

Is your error directly related to io or are you just using the API to
display a message box? We have been discouraging people from using
these APIs to try to display an error to the user, especially with the
advent of TS and fast user switching where there can be multiple users
logged in at the same time (so even if you specified the user’s thread,
which user’s thread pointer would you use?)

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@comcast.net
Sent: Thursday, July 05, 2007 8:31 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Calling IoRaiseInformationalHardError ddk API in Vista

I am having trouble using IoRaiseInformationalHardError in Vista. Looks
like any attempt to display error message through this API while in
system process context doesn’t make it to the desktop/window station
associated with the logged on user. By munging the EPROCESS value (to a
process that has access to current desktop) while executing the APC
queued by this hard error call, I was able to confirm that the problem
was related to the port associated with the system process and that
listner port process’s access to desktop etc. I was going to pass a
non-system thread to this API as a workaround but I was wondering why
this API is implemented the way it is in Vista - The likelyhood of a ddk
API like this one being called in system process context is very high.
That being the case, why wouldn’t the internal implementation take care
of this case. More important, why wouldn’t the documentation for this
API callout this vista specific anomaly (assuming I am looking at the
right doc)?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

What happens if you just pass NULL for the thread? I have no idea of
whether this is good idea or not, but, as the documentation says that is
OPTIONAL, and is otherwise lacking, you might give it a try to see what
happens. If it does work, it would seem to be better than using a
thread you don’t own.

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@comcast.net
Sent: Thursday, July 05, 2007 23:31
To: Windows System Software Devs Interest List
Subject: [ntdev] Calling IoRaiseInformationalHardError ddk API in Vista

I am having trouble using IoRaiseInformationalHardError in Vista. Looks
like any attempt to display error message through this API while in
system process context doesn’t make it to the desktop/window station
associated with the logged on user. By munging the EPROCESS value (to a
process that has access to current desktop) while executing the APC
queued by this hard error call, I was able to confirm that the problem
was related to the port associated with the system process and that
listner port process’s access to desktop etc. I was going to pass a
non-system thread to this API as a workaround but I was wondering why
this API is implemented the way it is in Vista - The likelyhood of a ddk
API like this one being called in system process context is very high.
That being the case, why wouldn’t the internal implementation take care
of this case. More important, why wouldn’t the documentation for this
API callout this vista specific anomaly (assuming I am looking at the
right doc)?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer