Prev: Bugcheck 101
Next: ksdebug.h and _DbgPrintF
From: Tim Roberts on 28 Jan 2009 02:14 Uraeu <Uraeu(a)discussions.microsoft.com> wrote: > >Why not C:\Windows\Temp ... Because that assumes that Windows lives on the C: drive, that Windows is installed in a directory called "Windows" on that drive, and that the temporary directory is located within it in a directory called "Temp". I have systems where all three of those assumptions fail. >I know that the printer driver write a whole bunch of temp files into the >C:\system32\spooler dir No, it doesn't. The printer driver's temporary files go into a directory that passed to the installer by a user-mode component which knows where the Spooler special directory lives. > so why not use win\temp ? Because it's a terrible idea. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Tim Roberts on 28 Jan 2009 02:16
Eric <Eric(a)discussions.microsoft.com> wrote: > >with CreateFileMapping() it is possible to map a file that is not >represented in the filesystem (like c:\file.dat) by specifying >INVALID_HANDLE_VALUE for the file handle and then an arbitrary filename can >be chosen (like "Global\myfile"). > >Now I am not sure if this is possible in a display driver when calling >EngMapFile? No. EngMapFile only maps real files. You can't use it to open a named section. >What parameter would I have to pass to this function to mimic the behaviour >of CreateFileMapping or is there any other function that I would have to use? You can always ioctl into your miniport, and let the miniport call the normal kernel APIs to map the section. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc. |