I want to use prefast on my user mode c++ project. Has anyone tried this?
I'm thinking of going to the trouble of building this project in a DDK build
environment just so that I can run prefast on it ... it seems prefast only
works correctly from a DDK build environment!

Has anyone tried to integrate prefast with VS2005 for user mode projects?
If not, can anyone suggest a free tool that is equivalent.

Mirage2k2.

Re: prefast by David

David
Wed Oct 11 23:19:21 CDT 2006

There is a prefast for user mode programs. The one in the DDK is for
drivers and is tailored specifically for them.

"mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
news:35FE86F1-A6BA-4D67-A48D-832901A84F06@microsoft.com...
>I want to use prefast on my user mode c++ project. Has anyone tried this?
> I'm thinking of going to the trouble of building this project in a DDK
> build
> environment just so that I can run prefast on it ... it seems prefast only
> works correctly from a DDK build environment!
>
> Has anyone tried to integrate prefast with VS2005 for user mode projects?
> If not, can anyone suggest a free tool that is equivalent.
>
> Mirage2k2.



Re: prefast by mirage2k2

mirage2k2
Thu Oct 12 01:45:01 CDT 2006

how do I get it? I have the full version of VS2005 but it doesn't appear to
have prefast with it.


"David J. Craig" wrote:

> There is a prefast for user mode programs. The one in the DDK is for
> drivers and is tailored specifically for them.
>
> "mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
> news:35FE86F1-A6BA-4D67-A48D-832901A84F06@microsoft.com...
> >I want to use prefast on my user mode c++ project. Has anyone tried this?
> > I'm thinking of going to the trouble of building this project in a DDK
> > build
> > environment just so that I can run prefast on it ... it seems prefast only
> > works correctly from a DDK build environment!
> >
> > Has anyone tried to integrate prefast with VS2005 for user mode projects?
> > If not, can anyone suggest a free tool that is equivalent.
> >
> > Mirage2k2.
>
>
>

Re: prefast by Jeff

Jeff
Thu Oct 12 07:44:02 CDT 2006

AFAIK, it's only included with VS2005 Team System -- see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsent/html/vsts-dev.asp.

"mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
news:BD28260E-8DED-4D08-A00A-67CB91746559@microsoft.com...
> how do I get it? I have the full version of VS2005 but it doesn't appear
> to
> have prefast with it.
>
>
> "David J. Craig" wrote:
>
>> There is a prefast for user mode programs. The one in the DDK is for
>> drivers and is tailored specifically for them.
>>
>> "mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
>> news:35FE86F1-A6BA-4D67-A48D-832901A84F06@microsoft.com...
>> >I want to use prefast on my user mode c++ project. Has anyone tried
>> >this?
>> > I'm thinking of going to the trouble of building this project in a DDK
>> > build
>> > environment just so that I can run prefast on it ... it seems prefast
>> > only
>> > works correctly from a DDK build environment!
>> >
>> > Has anyone tried to integrate prefast with VS2005 for user mode
>> > projects?
>> > If not, can anyone suggest a free tool that is equivalent.
>> >
>> > Mirage2k2.
>>
>>
>>



Re: prefast by Maxim

Maxim
Thu Oct 12 15:25:35 CDT 2006

> I want to use prefast on my user mode c++ project.

I think PREFast is not so good on C++ as on C. C++ is too complex for static
analyzis.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Re: prefast by Ray

Ray
Thu Oct 12 17:06:21 CDT 2006

It won't find complex logic errors as easily in C++, granted, but it
does a pretty nice job anyway, and certainly catches a lot more than W4
in the compiler (perhaps not as much as PCLINT, but I don't really
know... I suspect they catch different things).

Maxim S. Shatskih wrote:
>> I want to use prefast on my user mode c++ project.
>
> I think PREFast is not so good on C++ as on C. C++ is too complex for static
> analyzis.
>


--
Ray

Re: prefast by pavel_a

pavel_a
Fri Oct 13 14:34:02 CDT 2006

"Jeff Henkels" wrote:
> AFAIK, it's only included with VS2005 Team System -- see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsent/html/vsts-dev.asp.

The September MSDN docum says:
"/analyze is only available in Enterprise (team development) versions for
x86 compilers."

The /analyze option of vc2005 runs Prefast.

--PA

> "mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
> news:BD28260E-8DED-4D08-A00A-67CB91746559@microsoft.com...
> > how do I get it? I have the full version of VS2005 but it doesn't appear
> > to
> > have prefast with it.
> >
> >
> > "David J. Craig" wrote:
> >
> >> There is a prefast for user mode programs. The one in the DDK is for
> >> drivers and is tailored specifically for them.
> >>
> >> "mirage2k2" <mirage2k2@discussions.microsoft.com> wrote in message
> >> news:35FE86F1-A6BA-4D67-A48D-832901A84F06@microsoft.com...
> >> >I want to use prefast on my user mode c++ project. Has anyone tried
> >> >this?
> >> > I'm thinking of going to the trouble of building this project in a DDK
> >> > build
> >> > environment just so that I can run prefast on it ... it seems prefast
> >> > only
> >> > works correctly from a DDK build environment!
> >> >
> >> > Has anyone tried to integrate prefast with VS2005 for user mode
> >> > projects?
> >> > If not, can anyone suggest a free tool that is equivalent.
> >> >
> >> > Mirage2k2.
> >>
> >>
> >>
>
>
>

Re: prefast by Mark

Mark
Sat Oct 14 11:45:37 CDT 2006

On Thu, 12 Oct 2006 15:06:21 -0700, Ray Trent <rat@nospam.nospam>
wrote:

>It won't find complex logic errors as easily in C++, granted, but it
>does a pretty nice job anyway, and certainly catches a lot more than W4
>in the compiler (perhaps not as much as PCLINT, but I don't really
>know... I suspect they catch different things).
>

As the ddk prefast is essentially the same tool as the VS2005 prefast
that Microsoft claims is just dandy for C++ up in user mode, I see no
reason why it should suddenly get stupid about C++ in kernel mode.

That static driver verifier thing won't do C++. Prefast is just fine
with it.

>Maxim S. Shatskih wrote:
>>> I want to use prefast on my user mode c++ project.
>>
>> I think PREFast is not so good on C++ as on C. C++ is too complex for static
>> analyzis.
>>


=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: prefast by Johannes

Johannes
Sun Oct 15 13:23:57 CDT 2006

To use the DDK version of prefast from a normal VS 200x build
environment, you only have to set/alter some env variables
(PREFAST_ROOT, PATH, INCLUDE).

I have successfully used the following:

set PREFAST_ROOT=D:\WINDDK\3790\bin\x86\prefast
set "PATH=%PATH%;D:\WINDDK\3790\bin\x86\prefast\scripts\"
set INCLUDE=D:\WINDDK\3790\inc\crt;C:\Program Files\Microsoft Visual
Studio .NET 2003\Vc7\include;C:\Program Files\Microsoft Visual Studio
.NET 2003\Vc7\PlatformSDK\Include;C:\Program Files\Microsoft Visual
Studio .NET 2003\Vc7\atlmfc\include

Afterwards, "prefast cl ... && prefast view" works fine.

I have used it only for C projects, so I have no idea how good prefast
is for C++ source code.

/Johannes

mirage2k2 wrote:

> I want to use prefast on my user mode c++ project. Has anyone tried this?
> I'm thinking of going to the trouble of building this project in a DDK build
> environment just so that I can run prefast on it ... it seems prefast only
> works correctly from a DDK build environment!
>
> Has anyone tried to integrate prefast with VS2005 for user mode projects?
> If not, can anyone suggest a free tool that is equivalent.
>
> Mirage2k2.


--
Johannes Passing - http://int3.de/

Re: prefast by mirage2k2

mirage2k2
Mon Oct 16 23:11:02 CDT 2006

thanks

"Johannes Passing" wrote:

> To use the DDK version of prefast from a normal VS 200x build
> environment, you only have to set/alter some env variables
> (PREFAST_ROOT, PATH, INCLUDE).
>
> I have successfully used the following:
>
> set PREFAST_ROOT=D:\WINDDK\3790\bin\x86\prefast
> set "PATH=%PATH%;D:\WINDDK\3790\bin\x86\prefast\scripts\"
> set INCLUDE=D:\WINDDK\3790\inc\crt;C:\Program Files\Microsoft Visual
> Studio .NET 2003\Vc7\include;C:\Program Files\Microsoft Visual Studio
> ..NET 2003\Vc7\PlatformSDK\Include;C:\Program Files\Microsoft Visual
> Studio .NET 2003\Vc7\atlmfc\include
>
> Afterwards, "prefast cl ... && prefast view" works fine.
>
> I have used it only for C projects, so I have no idea how good prefast
> is for C++ source code.
>
> /Johannes
>
> mirage2k2 wrote:
>
> > I want to use prefast on my user mode c++ project. Has anyone tried this?
> > I'm thinking of going to the trouble of building this project in a DDK build
> > environment just so that I can run prefast on it ... it seems prefast only
> > works correctly from a DDK build environment!
> >
> > Has anyone tried to integrate prefast with VS2005 for user mode projects?
> > If not, can anyone suggest a free tool that is equivalent.
> >
> > Mirage2k2.
>
>
> --
> Johannes Passing - http://int3.de/
>