Don
Wed Mar 19 13:58:31 CDT 2008
Sorry but this is wrong. These do not boil down to WMITraceMessage that is
a routine that is inserted into your driver source by the WPP preprocessor.
Second, there are equivalents for this stuff in user mode, look in the WDK
in the bin\wppconfig\rev1 directory you will see both km* and um* files and
the um files are the ones for user mode. Instead of Driver object you
supply the AppName to WPP_INIT_TRACING.
One of the original purposes of WPP tracing was to help tune SQL which is
certainly a user space application.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website:
http://www.windrvr.com
Blog:
http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"Ian Blake" <NoNotMe@NotAnywhere> wrote in message
news:lre2u3hp7m4a2j5dv1au79e03j2srfff4q@4ax.com...
> On Wed, 19 Mar 2008 08:20:14 -0700 (PDT), 0dbell@gmail.com wrote:
>
>>I was just informed that it is impossible to use WPP in user-mode
>>applications built using Visual C++ because... "WPP is exclusively DDK
>>(see MSDN hits)".
>
> WPP is essentially a preprocessor that produces header files and
> macros that boil down to Kernel mode APIs eg. WMITraceMessage. This
> API does not exist in Win32.
>
> Clearly it is just WMI so it is possible to write code equivalent to
> WMITraceMessage etc. Nobody has yet. If you want it you will have to
> do it yourself.
>
>>
>>Well, the above statement may be not 100% accurate since the following
>>MSDN link gives some hope that it might be possible to use WPP in
>>Visual C++ *if* the compiler is replaced by the DDK's:
>>
>>
http://msdn2.microsoft.com/en-us/library/bb500923.aspx
>>
>
> This incomplete article is referring to compiling WDK under Visual C.
>
>>I said "hope" because even that tiny clue is missing some critical
>>information such as the actual command to execute in order to re-
>>configure Visual C++.
>>
>>Assuming that it may be possible to overcome the "chain reaction" of a
>>whole slew of new problems stemming from re-configuring my
>>application's build environment to use the DDK compiler, I am now
>>curious to know:
>>
>>What does the DDK compiler have that the Visual C++ 2005/2008 doesn't
>>have?
>
> Nothing. The compiler used by the WDK is sometimes identical. At the
> moment I think Visual Studio is slightly newer version. Sometimes the
> WDK version is slightly newer. It is sensible to keep the version of
> the compiler with WDK. It is tested to work with it. Mixing tool
> chains is hazardous. In the past Microsoft produced a version of
> Visual C that could not link VxDs(Window 95 drivers) properly.
>
>>
>>Is there a comparison table somewhere that would let me figure out
>>what are the side-effects of substituting one for another?
>>
>>In particular, what in the WPP makes it usable only via the DDK
>>compiler? Is it really the *compiler* itself? or is it actually the
>>DDK environment (libraries, include files, environment variables,
>>etc.)?
>
> WPP still will not work in user mode even with the WDK build
> environment. You will recall the first function/macro used was
> WPP_INIT_TRACING. Where do you expect to find the DriverObject and
> RegistryPath in your WinMain?
>
>