Include paths

While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
A challenge I have that I am hoping someone here can help on is I have
some old tools that need to know the complete set and order of the
include paths. Now with the pre-Visual Studio world this was easy, you
just looked at the command line in the build log. I haven’t found a way
to get the same data with the new environment. I can get the includes
except for the standard ones, and I can get a complete list of all the
files included, but not a list of the include paths.

Can anyone give me a suggestion on how to get the complete include path
list?

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

You can build on the vs command line and capture the include paths on the CL task

d

debt from my phone


From: Don Burn
Sent: 10/24/2012 8:23 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Include paths

While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
A challenge I have that I am hoping someone here can help on is I have
some old tools that need to know the complete set and order of the
include paths. Now with the pre-Visual Studio world this was easy, you
just looked at the command line in the build log. I haven’t found a way
to get the same data with the new environment. I can get the includes
except for the standard ones, and I can get a complete list of all the
files included, but not a list of the include paths.

Can anyone give me a suggestion on how to get the complete include path
list?

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Is there a simple if given a stock visual studio driver project (such as
something handed to me by a client) to invoke the build on the vs
command line and get the needed data? Sorry, I’ve found the environment
nice when you just want to say build, but to step out of the visual
studio environment I feel like I am in a maze of twisty turning passages
all different.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> You can build on the vs command line and capture the include paths on the CL task
>
> d
>
> debt from my phone
> ________________________________
> From: Don Burn
> Sent: 10/24/2012 8:23 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Include paths
>
> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
> A challenge I have that I am hoping someone here can help on is I have
> some old tools that need to know the complete set and order of the
> include paths. Now with the pre-Visual Studio world this was easy, you
> just looked at the command line in the build log. I haven’t found a way
> to get the same data with the new environment. I can get the includes
> except for the standard ones, and I can get a complete list of all the
> files included, but not a list of the include paths.
>
> Can anyone give me a suggestion on how to get the complete include path
> list?
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Start Menu -> All Programs -> Visual Studio 2012 -> Visual Studio Tools ->
C:\Program Files (x86)\Microsoft Visual Studio 11.0>devenv /?

Phil
(Not speaking for LogRhythm)

Phil Barila | Senior Software Engineer
720.881.5364 (w)
A LEADER 2012 SIEM Magic Quadrant
WINNER of SC Magazine’s 2012 SIEM Best Buy

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 10:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Include paths

Is there a simple if given a stock visual studio driver project (such as
something handed to me by a client) to invoke the build on the vs
command line and get the needed data? Sorry, I’ve found the environment
nice when you just want to say build, but to step out of the visual
studio environment I feel like I am in a maze of twisty turning passages
all different.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> You can build on the vs command line and capture the include paths on the CL task
>
> d
>
> debt from my phone
> ________________________________
> From: Don Burn
> Sent: 10/24/2012 8:23 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Include paths
>
> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
> A challenge I have that I am hoping someone here can help on is I have
> some old tools that need to know the complete set and order of the
> include paths. Now with the pre-Visual Studio world this was easy, you
> just looked at the command line in the build log. I haven’t found a way
> to get the same data with the new environment. I can get the includes
> except for the standard ones, and I can get a complete list of all the
> files included, but not a list of the include paths.
>
> Can anyone give me a suggestion on how to get the complete include path
> list?
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

1 Open the Developer Command Prompt for VS2012.lnk (in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools).
2 cd into the project directory
3 run msbuild

On my machine with a nearly empty project

C:\Users\doronh\Documents\Visual Studio 2012\Projects\TestWdm>msbuild TestWdm.vxproj
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18010]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/24/2012 9:37:58 AM.
Project “C:\Users\doronh\Documents\Visual Studio 2012\Projects\TestWdm\TestWdm.vcxproj” on node 1 (default targets).
InitializeBuildStatus:
Touching “Win8Debug\TestWdm.unsuccessfulbuild”.
StampInf:
Copying file from “TestWdm.inf” to “Win8Debug\TestWdm.inf”.
C:\Program Files (x86)\Windows Kits\8.0\bin\x86\stampinf.exe -d “" -a “x86” -v "” -k “1.11” -u “1.11.0” -f Win8Debug\TestWdm.inf
Stamping Win8Debug\TestWdm.inf [Version] section with DriverVer=10/24/2012,9.37.58.373

ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /IWin8Dbug\ /Zi /nologo /W4 /WX /Od /Oi /Oy- /D X86=1 /D i386=1 /D STD_CALL /D DEP RECATE_DDK_FUNCTIONS=1 /D MSC_NOOPT /D WIN32_LEAN_AND_MEAN=1 /D _WIN32_WINNT=0x0602 /D WINVER=0x0602 /D WINNT=1 /D NTDDI_VERSION=0x06020000 /D DBG=1 /GF /Gm- /Zp8 /GS /Gy /fp:precise /hotpatch /Zc:wchar_t- /Zc:forScope- /GR- /Fo"Win8Debug\" /Fd"Win8Debug\vc110.pdb" /Gz /wd4748 /wd4603 /wd4627 /wd4986 /wd4987 /wd4996 /FI"C:\Program Files (x86)\Windows Kits\8.0\Include\Shared\warning.h" /analyze- /errorReport:queue /kernel -cbstring /d1import_no_registry /d2AllowCompatibleILVersions /d2Zi+ driver.c

Link:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREP
ORT:QUEUE /OUT:“C:\Users\doronh\Documents\Visual Studio 2012\Projects\TestWdm
\Win8Debug\TestWdm.sys” /VERSION:“6.2” /INCREMENTAL:NO /NOLOGO /WX /FUNCTIONP
ADMIN:5 /SECTION:“INIT,d” “C:\Program Files (x86)\Windows Kits\8.0\lib\win8\K
M\x86\BufferOverflowFastFailK.lib” “C:\Program Files (x86)\Windows Kits\8.0\l
ib\win8\KM\x86\ntoskrnl.lib” “C:\Program Files (x86)\Windows Kits\8.0\lib\win
8\KM\x86\hal.lib” “C:\Program Files (x86)\Windows Kits\8.0\lib\win8\KM\x86\wm
ilib.lib” /NODEFAULTLIB /MANIFEST:NO /DEBUG /PDB:“C:\Users\doronh\Documents\V
isual Studio 2012\Projects\TestWdm\Win8Debug\TestWdm.pdb” /SUBSYSTEM:NATIVE,“
6.02” /Driver /OPT:REF /OPT:ICF /ENTRY:“GsDriverEntry@8” /RELEASE /IMPLIB:“C:
\Users\doronh\Documents\Visual Studio 2012\Projects\TestWdm\Win8Debug\TestWdm
.lib” /MERGE:“_TEXT=.text;_PAGE=PAGE” /MACHINE:X86 /SAFESEH /kernel /IGNORE:4
198,4010,4037,4039,4065,4070,4078,4087,4089,4221 /osversion:6.2 /pdbcompress
/debugtype:pdata Win8Debug\driver.obj
TestWdm.vcxproj -> C:\Users\doronh\Documents\Visual Studio 2012\Projects\Test
Wdm\Win8Debug\TestWdm.sys
DriverTestSign:
Sign Inputs: C:\Users\doronh\Documents\Visual Studio 2012\Projects\TestWdm\Wi
n8Debug\TestWdm.sys
C:\Program Files (x86)\Windows Kits\8.0\bin\x86\signtool.exe sign /ph /sha1 “
13F903F21475EF42D4CB3E7F855DC758047422E4”
Done Adding Additional Store
Successfully signed: C:\Users\doronh\Documents\Visual Studio 2012\Projects\Te
stWdm\Win8Debug\TestWdm.sys

Certificate used for signing: issued to = WDKTestCert doronh,1298850037487980
49 and thumbprint = 13F903F21475EF42D4CB3E7F855DC758047422E4
Exported Certificate: C:\Users\doronh\Documents\Visual Studio 2012\Projects\T
estWdm\Win8Debug\TestWdm.cer
FinalizeBuildStatus:
Deleting file “Win8Debug\TestWdm.unsuccessfulbuild”.
Touching “Win8Debug\TestWdm.lastbuildstate”.
Done Building Project “C:\Users\doronh\Documents\Visual Studio 2012\Projects\Te
stWdm\TestWdm.vcxproj” (default targets).

Which didn’t show all of the includes I thought it would…if you open the project in the IDE, open the properties of the project and go to c/c++ -> command line, you will see the same thing without building, but still not all of the includes. What you want is to dump the property %(ClCompile.AdditionalIncludeDirectories). I will see if there is any easy way to get that to be dumped

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 9:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Include paths

Is there a simple if given a stock visual studio driver project (such as something handed to me by a client) to invoke the build on the vs command line and get the needed data? Sorry, I’ve found the environment nice when you just want to say build, but to step out of the visual studio environment I feel like I am in a maze of twisty turning passages all different.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> You can build on the vs command line and capture the include paths on
> the CL task
>
> d
>
> debt from my phone
> ________________________________
> From: Don Burn
> Sent: 10/24/2012 8:23 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Include paths
>
> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
> A challenge I have that I am hoping someone here can help on is I have
> some old tools that need to know the complete set and order of the
> include paths. Now with the pre-Visual Studio world this was easy,
> you just looked at the command line in the build log. I haven’t found
> a way to get the same data with the new environment. I can get the
> includes except for the standard ones, and I can get a complete list
> of all the files included, but not a list of the include paths.
>
> Can anyone give me a suggestion on how to get the complete include
> path list?
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Don,

After running vcvars??.bat (whatever the lasted is, we use msbuild.exe /m .sln.

The /m tells it to run on max processes.

That works for VS 2010.

Gary Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

On Oct 24, 2012, at 11:28 AM, “Don Burn” wrote:

> Is there a simple if given a stock visual studio driver project (such as something handed to me by a client) to invoke the build on the vs command line and get the needed data? Sorry, I’ve found the environment nice when you just want to say build, but to step out of the visual studio environment I feel like I am in a maze of twisty turning passages all different.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message news:xxxxx@ntdev:
>
>> You can build on the vs command line and capture the include paths on the CL task
>>
>> d
>>
>> debt from my phone
>> ________________________________
>> From: Don Burn
>> Sent: 10/24/2012 8:23 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Include paths
>>
>> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
>> A challenge I have that I am hoping someone here can help on is I have
>> some old tools that need to know the complete set and order of the
>> include paths. Now with the pre-Visual Studio world this was easy, you
>> just looked at the command line in the build log. I haven’t found a way
>> to get the same data with the new environment. I can get the includes
>> except for the standard ones, and I can get a complete list of all the
>> files included, but not a list of the include paths.
>>
>> Can anyone give me a suggestion on how to get the complete include path
>> list?
>>
>>
>> Don Burn
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>>
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

here;

call “%programfiles(x86)%\Microsoft Visual Studio
11.0\VC\vcvarsall.bat” %vcvars_target%

msbuild /t:clean /t:build %1\Package\package.VcxProj
/p:Configuration=“Win8 Release” /p:Platform=%target% >>
%logdir%%logfile%.log

You get to fill in the variables. here are some clues.
vcvars_target is x86 or x86_amd64
target is x86 or x64 (grrr…)

Configuration is based on the standard projects from the online MSFT
samples, but could also be parameterized.

Mark Roddy

On Wed, Oct 24, 2012 at 12:28 PM, Don Burn wrote:
> Is there a simple if given a stock visual studio driver project (such as
> something handed to me by a client) to invoke the build on the vs command
> line and get the needed data? Sorry, I’ve found the environment nice when
> you just want to say build, but to step out of the visual studio environment
> I feel like I am in a maze of twisty turning passages all different.
>
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev:
>
>
>> You can build on the vs command line and capture the include paths on the
>> CL task
>>
>> d
>>
>> debt from my phone
>> ________________________________
>> From: Don Burn
>> Sent: 10/24/2012 8:23 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Include paths
>>
>> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
>> A challenge I have that I am hoping someone here can help on is I have
>> some old tools that need to know the complete set and order of the
>> include paths. Now with the pre-Visual Studio world this was easy, you
>> just looked at the command line in the build log. I haven’t found a way
>> to get the same data with the new environment. I can get the includes
>> except for the standard ones, and I can get a complete list of all the
>> files included, but not a list of the include paths.
>>
>> Can anyone give me a suggestion on how to get the complete include path
>> list?
>>
>>
>> Don Burn
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>>
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Ok, but all of these suggestions basically result in the same data as
you can find in cl.command.1 in the directory named for the target. And
all of those have this wonderful "/IWin8Release" (or whatever target
you are dealing with instead of Win8Release) rather than anything like a
real set of include paths so that a tool (or a person for that matter)
that is not into the magic of VS and the WDK 8 can understand. That is
what I am looking for.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Mark Roddy” wrote in message news:xxxxx@ntdev:

> here;
>
> call “%programfiles(x86)%\Microsoft Visual Studio
> 11.0\VC\vcvarsall.bat” %vcvars_target%
>
> msbuild /t:clean /t:build %1\Package\package.VcxProj
> /p:Configuration=“Win8 Release” /p:Platform=%target% >>
> %logdir%%logfile%.log
>
> You get to fill in the variables. here are some clues.
> vcvars_target is x86 or x86_amd64
> target is x86 or x64 (grrr…)
>
> Configuration is based on the standard projects from the online MSFT
> samples, but could also be parameterized.
>
>
>
> Mark Roddy
>
>
> On Wed, Oct 24, 2012 at 12:28 PM, Don Burn wrote:
> > Is there a simple if given a stock visual studio driver project (such as
> > something handed to me by a client) to invoke the build on the vs command
> > line and get the needed data? Sorry, I’ve found the environment nice when
> > you just want to say build, but to step out of the visual studio environment
> > I feel like I am in a maze of twisty turning passages all different.
> >
> >
> >
> > Don Burn
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > “Doron Holan” wrote in message
> > news:xxxxx@ntdev:
> >
> >
> >> You can build on the vs command line and capture the include paths on the
> >> CL task
> >>
> >> d
> >>
> >> debt from my phone
> >> ________________________________
> >> From: Don Burn
> >> Sent: 10/24/2012 8:23 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: [ntdev] Include paths
> >>
> >> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
> >> A challenge I have that I am hoping someone here can help on is I have
> >> some old tools that need to know the complete set and order of the
> >> include paths. Now with the pre-Visual Studio world this was easy, you
> >> just looked at the command line in the build log. I haven’t found a way
> >> to get the same data with the new environment. I can get the includes
> >> except for the standard ones, and I can get a complete list of all the
> >> files included, but not a list of the include paths.
> >>
> >> Can anyone give me a suggestion on how to get the complete include path
> >> list?
> >>
> >>
> >> Don Burn
> >> Windows Filesystem and Driver Consulting
> >> Website: http://www.windrvr.com
> >> Blog: http://msmvps.com/blogs/WinDrvr
> >>
> >>
> >>
> >>
> >> —
> >> NTDEV is sponsored by OSR
> >>
> >> For our schedule of WDF, WDM, debugging and other seminars visit:
> >> http://www.osr.com/seminars
> >>
> >> To unsubscribe, visit the List Server section of OSR Online at
> >> http://www.osronline.com/page.cfm?name=ListServer
> >
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer

I see you can get VS2012 (at least the Ultimate VS2012 flavor) to generate a XML file with all the include file dependency info in it. You might look at the generated .dgml file and see if it has the info you need.

Jan

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 8:23 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Include paths

While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
A challenge I have that I am hoping someone here can help on is I have some old tools that need to know the complete set and order of the include paths. Now with the pre-Visual Studio world this was easy, you just looked at the command line in the build log. I haven’t found a way to get the same data with the new environment. I can get the includes except for the standard ones, and I can get a complete list of all the files included, but not a list of the include paths.

Can anyone give me a suggestion on how to get the complete include path list?

The others might be set in an env var (INC I think?). still looking. You could use an il reflector to see what the msbuild task that handles the ClCompile does with the property if you don’t want to wait on me :slight_smile:

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 10:11 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Include paths

Ok, but all of these suggestions basically result in the same data as you can find in cl.command.1 in the directory named for the target. And all of those have this wonderful "/IWin8Release" (or whatever target you are dealing with instead of Win8Release) rather than anything like a real set of include paths so that a tool (or a person for that matter) that is not into the magic of VS and the WDK 8 can understand. That is what I am looking for.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Mark Roddy” wrote in message news:xxxxx@ntdev:

> here;
>
> call “%programfiles(x86)%\Microsoft Visual Studio
> 11.0\VC\vcvarsall.bat” %vcvars_target%
>
> msbuild /t:clean /t:build %1\Package\package.VcxProj
> /p:Configuration=“Win8 Release” /p:Platform=%target% >>
> %logdir%%logfile%.log
>
> You get to fill in the variables. here are some clues.
> vcvars_target is x86 or x86_amd64
> target is x86 or x64 (grrr…)
>
> Configuration is based on the standard projects from the online MSFT
> samples, but could also be parameterized.
>
>
>
> Mark Roddy
>
>
> On Wed, Oct 24, 2012 at 12:28 PM, Don Burn wrote:
> > Is there a simple if given a stock visual studio driver project
> > (such as something handed to me by a client) to invoke the build on
> > the vs command line and get the needed data? Sorry, I’ve found the
> > environment nice when you just want to say build, but to step out of
> > the visual studio environment I feel like I am in a maze of twisty turning passages all different.
> >
> >
> >
> > Don Burn
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > “Doron Holan” wrote in message
> > news:xxxxx@ntdev:
> >
> >
> >> You can build on the vs command line and capture the include paths
> >> on the CL task
> >>
> >> d
> >>
> >> debt from my phone
> >> ________________________________
> >> From: Don Burn
> >> Sent: 10/24/2012 8:23 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: [ntdev] Include paths
> >>
> >> While I had tested the Win8 WDK I hadn’t dived in deeply till recently.
> >> A challenge I have that I am hoping someone here can help on is I
> >> have some old tools that need to know the complete set and order of
> >> the include paths. Now with the pre-Visual Studio world this was
> >> easy, you just looked at the command line in the build log. I
> >> haven’t found a way to get the same data with the new environment.
> >> I can get the includes except for the standard ones, and I can get
> >> a complete list of all the files included, but not a list of the include paths.
> >>
> >> Can anyone give me a suggestion on how to get the complete include
> >> path list?
> >>
> >>
> >> Don Burn
> >> Windows Filesystem and Driver Consulting
> >> Website: http://www.windrvr.com
> >> Blog: http://msmvps.com/blogs/WinDrvr
> >>
> >>
> >>
> >>
> >> —
> >> NTDEV is sponsored by OSR
> >>
> >> For our schedule of WDF, WDM, debugging and other seminars visit:
> >> http://www.osr.com/seminars
> >>
> >> To unsubscribe, visit the List Server section of OSR Online at
> >> http://www.osronline.com/page.cfm?name=ListServer
> >
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

On 24-Oct-2012 19:10, Don Burn wrote:

Ok, but all of these suggestions basically result in the same data as
you can find in cl.command.1 in the directory named for the target. And
all of those have this wonderful "/IWin8Release" (or whatever target
you are dealing with instead of Win8Release) rather than anything like a
real set of include paths so that a tool (or a person for that matter)
that is not into the magic of VS and the WDK 8 can understand. That is
what I am looking for.

Probably the best you can do is to collect all /I switches from the
build log (whatever it is xml, html…), as Doron suggested.
The CL options come from a set of msbuild property sheets, each
of these can add another set of paths, and the vcxproj file itself
can contain its own. The only other way can be parsing these property
sheets exactly like the msbuild does it.
Why the target dir is on the include path? In case you generate some .h
files in pre-build.
– pa

Unfortunately that means I have none of the WDK include directories,
which makes this totally worthless. If you want to use tools that are
not VS aware this was pretty easy with the pre-Win8 WDK but so far it
looks like none of these tools will be able to be used with the Win8
WDK. This is a serious regression in my book, since the tools I use are
not available with VS2012 smarts.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Pavel A” wrote in message news:xxxxx@ntdev:

> On 24-Oct-2012 19:10, Don Burn wrote:
> > Ok, but all of these suggestions basically result in the same data as
> > you can find in cl.command.1 in the directory named for the target. And
> > all of those have this wonderful "/IWin8Release" (or whatever target
> > you are dealing with instead of Win8Release) rather than anything like a
> > real set of include paths so that a tool (or a person for that matter)
> > that is not into the magic of VS and the WDK 8 can understand. That is
> > what I am looking for.
>
> Probably the best you can do is to collect all /I switches from the
> build log (whatever it is xml, html…), as Doron suggested.
> The CL options come from a set of msbuild property sheets, each
> of these can add another set of paths, and the vcxproj file itself
> can contain its own. The only other way can be parsing these property
> sheets exactly like the msbuild does it.
> Why the target dir is on the include path? In case you generate some .h
> files in pre-build.
> – pa

Since you are doing the porting by hand, just look in the props and targets files in %kitsroot%\build* for “AdditionalIncludeDirectories” and you will see each additional inc dir

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 12:22 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Include paths

Unfortunately that means I have none of the WDK include directories, which makes this totally worthless. If you want to use tools that are not VS aware this was pretty easy with the pre-Win8 WDK but so far it looks like none of these tools will be able to be used with the Win8 WDK. This is a serious regression in my book, since the tools I use are not available with VS2012 smarts.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Pavel A” wrote in message news:xxxxx@ntdev:

> On 24-Oct-2012 19:10, Don Burn wrote:
> > Ok, but all of these suggestions basically result in the same data
> > as you can find in cl.command.1 in the directory named for the
> > target. And all of those have this wonderful "/IWin8Release" (or
> > whatever target you are dealing with instead of Win8Release) rather
> > than anything like a real set of include paths so that a tool (or a
> > person for that matter) that is not into the magic of VS and the
> > WDK 8 can understand. That is what I am looking for.
>
> Probably the best you can do is to collect all /I switches from the
> build log (whatever it is xml, html…), as Doron suggested.
> The CL options come from a set of msbuild property sheets, each of
> these can add another set of paths, and the vcxproj file itself can
> contain its own. The only other way can be parsing these property
> sheets exactly like the msbuild does it.
> Why the target dir is on the include path? In case you generate some
> .h files in pre-build.
> – pa


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

On 24-Oct-2012 21:30, Doron Holan wrote:

Since you are doing the porting by hand, just look in the props and targets files in %kitsroot%\build* for “AdditionalIncludeDirectories” and you will see each additional inc dir

d

And the order? how to know in which order they stack up?
– pa

Doron,

I know I don’t know the later Visual Studio environments worth a
damm, but personally the AdditionalIncludeDirectories does not help.
Maybe someone can tell me what I am supposed to get from:

build\WindowsDriver8.0.Common.targets(491):
AdditionalIncludeDirectories
=“%(TraceWpp.WppAdditionalIncludeDirectories)”
build\WindowsDriver8.0.KernelMode.props(58):
$(DDK_LIB_PATH);%(AdditionalIncludeDirectories)
build\WindowsDriver8.0.KernelMode.props(61):
$(SDK_INC_PATH);%(AdditionalIncludeDirectories)
build\WindowsDriver8.0.Shared.Props(177):
$(IntDir);%(AdditionalIncludeDirectories)
build\WindowsDriver8.0.Shared.Props(182):
$(IntDir);%(AdditionalIncludeDirectories)
build\WindowsDriver8.0.Shared.Props(259):
$(SDK_LIB_PATH);$(IntDir);$(IncludePath);%(AdditionalIncludeDirectories)

I had no problem in the “good old days” with:

1> /Ii386
1> /I.
1> /I.
1> /I…\inc
1> /Ic:\work\xxx\driver\objchk_wxp_x86\i386
1> /IC:\DevTools\DDK\7600.16385.1\inc\api
1> /IC:\DevTools\DDK\7600.16385.1\inc\api
1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
1> /IC:\DevTools\DDK\7600.16385.1\inc\crt

And while I can guess you are using a similar model, it certainly
does not make me comfortable to rely on a guess.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> Since you are doing the porting by hand, just look in the props and targets files in %kitsroot%\build* for “AdditionalIncludeDirectories” and you will see each additional inc dir
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
> Sent: Wednesday, October 24, 2012 12:22 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Include paths
>
> Unfortunately that means I have none of the WDK include directories, which makes this totally worthless. If you want to use tools that are not VS aware this was pretty easy with the pre-Win8 WDK but so far it looks like none of these tools will be able to be used with the Win8 WDK. This is a serious regression in my book, since the tools I use are not available with VS2012 smarts.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Pavel A” wrote in message news:xxxxx@ntdev:
>
> > On 24-Oct-2012 19:10, Don Burn wrote:
> > > Ok, but all of these suggestions basically result in the same data
> > > as you can find in cl.command.1 in the directory named for the
> > > target. And all of those have this wonderful "/IWin8Release" (or
> > > whatever target you are dealing with instead of Win8Release) rather
> > > than anything like a real set of include paths so that a tool (or a
> > > person for that matter) that is not into the magic of VS and the
> > > WDK 8 can understand. That is what I am looking for.
> >
> > Probably the best you can do is to collect all /I switches from the
> > build log (whatever it is xml, html…), as Doron suggested.
> > The CL options come from a set of msbuild property sheets, each of
> > these can add another set of paths, and the vcxproj file itself can
> > contain its own. The only other way can be parsing these property
> > sheets exactly like the msbuild does it.
> > Why the target dir is on the include path? In case you generate some
> > .h files in pre-build.
> > – pa
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I should have added I would love a programmatic solution, but right now
I would take an answer that gives me the data no matter how painful.

“Don Burn” wrote in message news:xxxxx@ntdev:

> Doron,
>
> I know I don’t know the later Visual Studio environments worth a
> damm, but personally the AdditionalIncludeDirectories does not help.
> Maybe someone can tell me what I am supposed to get from:
>
> build\WindowsDriver8.0.Common.targets(491):
> AdditionalIncludeDirectories
> =“%(TraceWpp.WppAdditionalIncludeDirectories)”
> build\WindowsDriver8.0.KernelMode.props(58):
> $(DDK_LIB_PATH);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.KernelMode.props(61):
> $(SDK_INC_PATH);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(177):
> $(IntDir);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(182):
> $(IntDir);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(259):
> $(SDK_LIB_PATH);$(IntDir);$(IncludePath);%(AdditionalIncludeDirectories)
>
> I had no problem in the “good old days” with:
>
> 1> /Ii386
> 1> /I.
> 1> /I.
> 1> /I…\inc
> 1> /Ic:\work\xxx\driver\objchk_wxp_x86\i386
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\api
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\api
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\crt
>
> And while I can guess you are using a similar model, it certainly
> does not make me comfortable to rely on a guess.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev:
>
> > Since you are doing the porting by hand, just look in the props and targets files in %kitsroot%\build* for “AdditionalIncludeDirectories” and you will see each additional inc dir
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
> > Sent: Wednesday, October 24, 2012 12:22 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Include paths
> >
> > Unfortunately that means I have none of the WDK include directories, which makes this totally worthless. If you want to use tools that are not VS aware this was pretty easy with the pre-Win8 WDK but so far it looks like none of these tools will be able to be used with the Win8 WDK. This is a serious regression in my book, since the tools I use are not available with VS2012 smarts.
> >
> >
> > Don Burn
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > “Pavel A” wrote in message news:xxxxx@ntdev:
> >
> > > On 24-Oct-2012 19:10, Don Burn wrote:
> > > > Ok, but all of these suggestions basically result in the same data
> > > > as you can find in cl.command.1 in the directory named for the
> > > > target. And all of those have this wonderful "/IWin8Release" (or
> > > > whatever target you are dealing with instead of Win8Release) rather
> > > > than anything like a real set of include paths so that a tool (or a
> > > > person for that matter) that is not into the magic of VS and the
> > > > WDK 8 can understand. That is what I am looking for.
> > >
> > > Probably the best you can do is to collect all /I switches from the
> > > build log (whatever it is xml, html…), as Doron suggested.
> > > The CL options come from a set of msbuild property sheets, each of
> > > these can add another set of paths, and the vcxproj file itself can
> > > contain its own. The only other way can be parsing these property
> > > sheets exactly like the msbuild does it.
> > > Why the target dir is on the include path? In case you generate some
> > > .h files in pre-build.
> > > – pa
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Msbuild /t:clean,rebuild /v:diag

Results in two env vars / properties

IncludePath = C:\Users\doronh\Documents\Visual Studio 2012\Projects\kmdffoo\kmdffoo;C:\Program Files (x86)\Windows Kits\8.0\Include\km\crt;C:\Program Files (x86)\Windows Kits\8.0\Include\KM;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\wdf\kmdf\1.11

INCLUDE=C:\Users\doronh\Documents\Visual Studio 2012\Projects\kmdffoo\kmdffoo;C:\Program Files (x86)\Windows Kits\8.0\Include\km\crt;C:\Program Files (x86)\Windows Kits\8.0\Include\KM;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\wdf\kmdf\1.11

d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 24, 2012 1:14 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Re:Include paths

I should have added I would love a programmatic solution, but right now I would take an answer that gives me the data no matter how painful.

“Don Burn” wrote in message news:xxxxx@ntdev:

> Doron,
>
> I know I don’t know the later Visual Studio environments worth a
> damm, but personally the AdditionalIncludeDirectories does not help.
> Maybe someone can tell me what I am supposed to get from:
>
> build\WindowsDriver8.0.Common.targets(491):
> AdditionalIncludeDirectories
> =“%(TraceWpp.WppAdditionalIncludeDirectories)”
> build\WindowsDriver8.0.KernelMode.props(58):
> $(DDK_LIB_PATH);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.KernelMode.props(61):
> $(SDK_INC_PATH);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(177):
> $(IntDir);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(182):
> $(IntDir);%(AdditionalIncludeDirectories)
> build\WindowsDriver8.0.Shared.Props(259):
> $(SDK_LIB_PATH);$(IntDir);$(IncludePath);%(AdditionalIncludeDirectories)
>
> I had no problem in the “good old days” with:
>
> 1> /Ii386
> 1> /I.
> 1> /I.
> 1> /I…\inc
> 1> /Ic:\work\xxx\driver\objchk_wxp_x86\i386
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\api
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\api
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\ddk
> 1> /IC:\DevTools\DDK\7600.16385.1\inc\crt
>
> And while I can guess you are using a similar model, it certainly
> does not make me comfortable to rely on a guess.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev:
>
> > Since you are doing the porting by hand, just look in the props and targets files in %kitsroot%\build* for “AdditionalIncludeDirectories” and you will see each additional inc dir
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
> > Sent: Wednesday, October 24, 2012 12:22 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Include paths
> >
> > Unfortunately that means I have none of the WDK include directories, which makes this totally worthless. If you want to use tools that are not VS aware this was pretty easy with the pre-Win8 WDK but so far it looks like none of these tools will be able to be used with the Win8 WDK. This is a serious regression in my book, since the tools I use are not available with VS2012 smarts.
> >
> >
> > Don Burn
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > “Pavel A” wrote in message news:xxxxx@ntdev:
> >
> > > On 24-Oct-2012 19:10, Don Burn wrote:
> > > > Ok, but all of these suggestions basically result in the same data
> > > > as you can find in cl.command.1 in the directory named for the
> > > > target. And all of those have this wonderful "/IWin8Release" (or
> > > > whatever target you are dealing with instead of Win8Release) rather
> > > > than anything like a real set of include paths so that a tool (or a
> > > > person for that matter) that is not into the magic of VS and the
> > > > WDK 8 can understand. That is what I am looking for.
> > >
> > > Probably the best you can do is to collect all /I switches from the
> > > build log (whatever it is xml, html…), as Doron suggested.
> > > The CL options come from a set of msbuild property sheets, each of
> > > these can add another set of paths, and the vcxproj file itself can
> > > contain its own. The only other way can be parsing these property
> > > sheets exactly like the msbuild does it.
> > > Why the target dir is on the include path? In case you generate some
> > > .h files in pre-build.
> > > – pa
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

On 10/24/2012 4:13 PM, Don Burn wrote:> I should have added I would love
a programmatic solution, but right now

I would take an answer that gives me the data no matter how painful.

Don,

Open a project and right click on the project in solution explorer.
Select Properties->VC++ Include Paths -> Edit -> Macros and you will see
a list of macros
with name/value pairs. Find the macro that you are interested in in the
left column and
see how it is expanded in the right.

I believe that these are all loaded from the registry, ultimately.

gmg.

I wanted to thank Doron and everyone who helped me with this. Doron’s
example below gives me all I need. It does lead to another question
though, In the old environment you could get the commands without
executing them by using /N as an option to NMAKE. I’ve looked but
don’t see an equivalent in MsBuild, but before I give up on that I
figured I would ask.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> Msbuild /t:clean,rebuild /v:diag
>
> Results in two env vars / properties
>
> IncludePath = C:\Users\doronh\Documents\Visual Studio 2012\Projects\kmdffoo\kmdffoo;C:\Program Files (x86)\Windows Kits\8.0\Include\km\crt;C:\Program Files (x86)\Windows Kits\8.0\Include\KM;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\wdf\kmdf\1.11
>
> INCLUDE=C:\Users\doronh\Documents\Visual Studio 2012\Projects\kmdffoo\kmdffoo;C:\Program Files (x86)\Windows Kits\8.0\Include\km\crt;C:\Program Files (x86)\Windows Kits\8.0\Include\KM;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\wdf\kmdf\1.11
>
> d