EngMapFile(..) with SystemRoot?

I am changing the way I call EngMapFile(…), I need to pass %SystemRoot% to it because some machines don’t install Windows on C:.

How do I getenv( “SystemRoot” ) with a Display Driver limit set of functions available. Is it possible?

I was calling:

mirrsurf->pMapMemory = EngMapFile( L"\??\C:\xVideo.dat", mapmemorysize, &mirrsurf->pMappedFile );

and I need something like:

mirrsurf->pMapMemory = EngMapFile( L"\??\%SystemRoot%\System32\CxVideo.dat", mapmemorysize, &mirrsurf->pMappedFile );

I think it’s a newbie questions, however I didn’t find any function or way to do this.

Thank’s for any help.

G

xxxxx@ieee.org wrote:

I am changing the way I call EngMapFile(…), I need to pass %SystemRoot% to it because some machines don’t install Windows on C:.

How do I getenv( “SystemRoot” ) with a Display Driver limit set of functions available. Is it possible?

I was calling:

mirrsurf->pMapMemory = EngMapFile( L"\??\C:\xVideo.dat", mapmemorysize, &mirrsurf->pMappedFile );

and I need something like:

mirrsurf->pMapMemory = EngMapFile( L"\??\%SystemRoot%\System32\CxVideo.dat", mapmemorysize, &mirrsurf->pMappedFile );

I think it’s a newbie questions, however I didn’t find any function or way to do this.

You should be able to use:
L"\SystemRoot\System32\CxVideo.dat"

“SystemRoot” is a special link within the kernel that maps to the
Windows directory, wherever it happens to be.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.