Prev: Storage spti example problems
Next: MSVAD Simple Sample
From: Skywing on 13 Oct 2005 22:38 You can use %*ws to replicate that behavior (with an additional argument). As an additional piece of useful information, the Microsoft user mode CRTs also support those format types in the user mode printf family of functions (%wZ for PUNICODE_STRING and %Z for PANSI_STRING). You can see how it works by checking out the VC CRT source code distributed with Visual Studio. "Pavel A." <pavel_a(a)NOwritemeNO.com> wrote in message news:u6galTG0FHA.720(a)TK2MSFTNGP15.phx.gbl... > For %ws the argument is WCHAR*; for %wZ - PUNICODE_STRING > so instead of %wZ you can print the buffer of UNICODE_STRING with %ws > if it were always zero terminated. > > --PA > > "Thomas F. Divine [DDK MVP]" <tdivine(a)NOpcausaSPAM.com> wrote in message > news:%23VuWlKG0FHA.2932(a)TK2MSFTNGP10.phx.gbl... >> >> <Essie> wrote in message news:%23blKd$F0FHA.2884(a)TK2MSFTNGP09.phx.gbl... >>> >>> >>>> At least I learn something new every day. >>> >>> So you are assuming Don did not make a typo ? >>> >>> >> I'll look into it a little more. >> >> However, since I don't know what the advantage of %wZ is over %ws, I will >> probably stick with %ws myself. >> >> Thos >> > >
From: Mark Roddy on 13 Oct 2005 22:43 Essie wrote: >>At least I learn something new every day. > > > So you are assuming Don did not make a typo ? > > Don did not make a typo. %wZ is one of the ddk arcania. It is superior to %ws in that it does not require null termination of the wide char string. Do be careful about the STUPIDLY paged unicode character set translation buffers that sit behind the wchar debug print processing. They will kill you dead at the worst time if you aren't careful about your irql. -- ===================== Mark Roddy DDK MVP Windows 2003/XP/2000 Consulting Hollis Technology Solutions 603-321-1032 www.hollistech.com
From: Thomas F. Divine [DDK MVP] on 13 Oct 2005 23:50 "Mark Roddy" <markr(a)hollistech.com> wrote in message news:emeoQkG0FHA.916(a)TK2MSFTNGP10.phx.gbl... > Essie wrote: >>>At least I learn something new every day. >> >> >> So you are assuming Don did not make a typo ? >> >> > Don did not make a typo. %wZ is one of the ddk arcania. It is superior to > %ws in that it does not require null termination of the wide char string. > Do be careful about the STUPIDLY paged unicode character set translation > buffers that sit behind the wchar debug print processing. They will kill > you dead at the worst time if you aren't careful about your irql. > I have already been bitten by the paged unicode bug. Sigh... If any newbies aren't paying attention, if you have a debug print that includes a unicode print format, they really should be used ONLY if you KNOW you will ALWAYS be at IRQL == PASSIVE_LEVEL. Thos
From: David J. Craig on 14 Oct 2005 00:08 There are two possible responses to this problem, IMHO (or not so humble): 1. Just do it and hope you don't get a blue screen. Lots of memory on a test system will help, but don't try memory stressing your driver with this in it. 2. Write a routine that takes a UNICODE_STRING and passes it to a worker thread if the current IRQL is not PASSIVE_LEVEL. WDF could provide such a routine easily and solve one of the stickier problems that beginners seem to encounter. "Thomas F. Divine [DDK MVP]" <tdivine(a)NOpcausaSPAM.com> wrote in message news:%23qAH5JH0FHA.664(a)tk2msftngp13.phx.gbl... > > "Mark Roddy" <markr(a)hollistech.com> wrote in message > news:emeoQkG0FHA.916(a)TK2MSFTNGP10.phx.gbl... >> Essie wrote: >>>>At least I learn something new every day. >>> >>> >>> So you are assuming Don did not make a typo ? >>> >>> >> Don did not make a typo. %wZ is one of the ddk arcania. It is superior to >> %ws in that it does not require null termination of the wide char string. >> Do be careful about the STUPIDLY paged unicode character set translation >> buffers that sit behind the wchar debug print processing. They will kill >> you dead at the worst time if you aren't careful about your irql. >> > I have already been bitten by the paged unicode bug. > > Sigh... > > If any newbies aren't paying attention, if you have a debug print that > includes a unicode print format, they really should be used ONLY if you > KNOW you will ALWAYS be at IRQL == PASSIVE_LEVEL. > > Thos >
From: Don Burn on 14 Oct 2005 08:46 It was not a typo, it is documented in my paper "Get Started with the Windows Driver Development Environment" http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx. I've suggested to the DDK documentation folks that they fix this in their docs. -- Don Burn (MVP, Windows DDK) Windows 2k/XP/2k3 Filesystem and Driver Consulting Remove StopSpam from the email to reply <Essie> wrote in message news:%23blKd$F0FHA.2884(a)TK2MSFTNGP09.phx.gbl... > > >> At least I learn something new every day. > > So you are assuming Don did not make a typo ? > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Storage spti example problems Next: MSVAD Simple Sample |