Re: Bug check calling nt!RtlQueryEnvironmentVariable_U



{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Chris,
\par
\par As far as "is the functionality broken", yes and no. Drivers should not attempt to expand or use environment variables. I'll work on getting the DDK updated to state this. I can't say authoritatively if the code is broken, but I would guess the most likely fix would be to return an invalid parameter error if called by a driver that doesn't set the RTL_QUERY_REGISTRY_NOEXPAND flag. I'll file it and let the developers work that out.
\par
\par I'd avoid using environment variables in your driver key if you can, then you won't need the expansion. It's not safe for drivers to use envinronment variables, since they're not always available or consistent from the kernel mode point of view.
\par
\par [MS] Jeff McCashland
\par jeffm@xxxxxxxxxxxxxxxxxxxx
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }