NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}*.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
On second thought, being a minifilter could be a significant factor.
The basic conflict appears to be between ntifs.h and ntddk.h, since they
define a lot of the same things.
The minifilter includes fltkernel.h, which includes ntifs.h; WPP (.tmh file)
includes ndttk.h, but only on Win2K.
Maybe WPP is incompatible with minifilters on Win2K?
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Thursday, March 10, 2005 8:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WPP on Win2K?
NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}*.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com
Ken -
Your WPP command line should look something like this for W2K (notice the
undocumented -dll option!)
RUN_WPP=$(SOURCES) -km -dll -gen:{km-w2k.tpl}*.tmh
If you ever figure out a way to build a single Filter Manager based driver
image for W2K/XP/WS03 with WPP tracing enabled, let me know. I gave up on
that one.
/ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 8:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WPP on Win2K?
NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}*.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
The -dll didn’t seem to improve anything and added another error:
error C2496: ‘WPP_GLOBAL_Control’ : ‘selectany’ can only be applied to data
items with external linkage
Anyhow, it looks like this handles the bulk of the problems I’ve seen. This
is in the common header I use:
#include <fltkernel.h>
// Suppress invocation of ntddk.h
#define NTDDK
#ifndef UNICODE_STRING_MAX_BYTES
#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
#endif
#ifndef RTL_NUMBER_OF
#define RTL_NUMBER_OF(x) (sizeof(x)/sizeof(x[0]))
#endif
#ifndef RtlInitEmptyUnicodeString
#define RtlInitEmptyUnicodeString(_ucStr,_buf,_bufSize) <br> ((_ucStr)->Buffer = (_buf), <br> (_ucStr)->Length = 0, <br> (_ucStr)->MaximumLength = (USHORT)(_bufSize))
#endif
For some reason, the last 3 macros aren’t defined in the W2K version of
ntifs.h (there may be more that I’m not using, too).
HTH,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ted Hess
Sent: Thursday, March 10, 2005 9:30 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] WPP on Win2K?
Ken -
Your WPP command line should look something like this for W2K (notice the
undocumented -dll option!)
RUN_WPP=$(SOURCES) -km -dll -gen:{km-w2k.tpl}.tmh
If you ever figure out a way to build a single Filter Manager based driver
image for W2K/XP/WS03 with WPP tracing enabled, let me know. I gave up on
that one.
/ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 8:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WPP on Win2K?
NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com</fltkernel.h>
Should have looked a little deeper in my sources as well – it was over a
year ago that I encountered this problem and I do have WPP tracing in a W2K
build working.
Note: In my case they are .cpp for strong typing only. Hence the extern “C”
nonsense.
Including ntifs.h as follows:
#ifndef NTIFS
#ifdef __cplusplus
extern “C” {
#endif
#include <ntifs.h>
#ifdef __cplusplus
}
#endif
#endif NTIFS
In each source module using WPP I have the following:
#if defined(USE_WPP_TRACING)
#if defined(BUILD_W2K)
#define NTDDK
extern “C” {
#endif
#include “module.tmh”
#if defined(BUILD_W2K)
}
#endif
#endif
The key here may be the #define NTDDK to avoid ntddk.h being included over
ntifs.h
HTH, /ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 10:28 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] WPP on Win2K?
The -dll didn’t seem to improve anything and added another error:
error C2496: ‘WPP_GLOBAL_Control’ : ‘selectany’ can only be applied to data
items with external linkage
Anyhow, it looks like this handles the bulk of the problems I’ve seen. This
is in the common header I use:
#include <fltkernel.h>
// Suppress invocation of ntddk.h
#define NTDDK
#ifndef UNICODE_STRING_MAX_BYTES
#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
#endif
#ifndef RTL_NUMBER_OF
#define RTL_NUMBER_OF(x) (sizeof(x)/sizeof(x[0]))
#endif
#ifndef RtlInitEmptyUnicodeString
#define RtlInitEmptyUnicodeString(_ucStr,_buf,_bufSize) <br> ((_ucStr)->Buffer = (_buf), <br> (_ucStr)->Length = 0, <br> (_ucStr)->MaximumLength = (USHORT)(_bufSize))
#endif
For some reason, the last 3 macros aren’t defined in the W2K version of
ntifs.h (there may be more that I’m not using, too).
HTH,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ted Hess
Sent: Thursday, March 10, 2005 9:30 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] WPP on Win2K?
Ken -
Your WPP command line should look something like this for W2K (notice the
undocumented -dll option!)
RUN_WPP=$(SOURCES) -km -dll -gen:{km-w2k.tpl}.tmh
If you ever figure out a way to build a single Filter Manager based driver
image for W2K/XP/WS03 with WPP tracing enabled, let me know. I gave up on
that one.
/ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 8:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WPP on Win2K?
NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net To unsubscribe
send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com</fltkernel.h></ntifs.h>
One more thing…
You need to call WPP_INIT_TRACING() with a DeviceObject and not a
DriverObject on W2K.
/ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 10:28 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] WPP on Win2K?
The -dll didn’t seem to improve anything and added another error:
error C2496: ‘WPP_GLOBAL_Control’ : ‘selectany’ can only be applied to data
items with external linkage
Anyhow, it looks like this handles the bulk of the problems I’ve seen. This
is in the common header I use:
#include <fltkernel.h>
// Suppress invocation of ntddk.h
#define NTDDK
#ifndef UNICODE_STRING_MAX_BYTES
#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
#endif
#ifndef RTL_NUMBER_OF
#define RTL_NUMBER_OF(x) (sizeof(x)/sizeof(x[0]))
#endif
#ifndef RtlInitEmptyUnicodeString
#define RtlInitEmptyUnicodeString(_ucStr,_buf,_bufSize) <br> ((_ucStr)->Buffer = (_buf), <br> (_ucStr)->Length = 0, <br> (_ucStr)->MaximumLength = (USHORT)(_bufSize))
#endif
For some reason, the last 3 macros aren’t defined in the W2K version of
ntifs.h (there may be more that I’m not using, too).
HTH,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ted Hess
Sent: Thursday, March 10, 2005 9:30 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] WPP on Win2K?
Ken -
Your WPP command line should look something like this for W2K (notice the
undocumented -dll option!)
RUN_WPP=$(SOURCES) -km -dll -gen:{km-w2k.tpl}.tmh
If you ever figure out a way to build a single Filter Manager based driver
image for W2K/XP/WS03 with WPP tracing enabled, let me know. I gave up on
that one.
/ted
-----Original Message-----
From: Ken Cross [mailto:xxxxx@comcast.net]
Sent: Thursday, March 10, 2005 8:35 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WPP on Win2K?
NTFSD Folk:
I’m having problems getting WPP working on Win2K. Everything builds and
executes fine on XP/2003. (It’s a minifilter, but I don’t think that’s a
factor.)
Per the documentation, I’ve added this line in sources:
RUN_WPP=$(SOURCES) -km -gen:{km-w2k.tpl}.tmh
But it still gets roughly a zillion compile errors (mostly macro and struct
redefinitions). I can’t seem to find a combination of #includes that work.
I’m using IFS build 1414. Any clues?
Thanks,
Ken
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net To unsubscribe
send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com</fltkernel.h>