Hi, all
I found a nasty problem with prototype of
ExIsResourceAcquiredSharedLite.
This function is defined to return USHORT value in IFSKIT for
Windows NT, but ULONG on newer systems. If anyone develops
a driver which must support Windows NT and newer (I do), then
you have to use lower word only (I better changer the prototype
to BOOLEAN in IFS Kit’s header).
No, you don’t want to change the prototype to return a BOOLEAN.
The value returned by ExIsResourceAcquireSharedLite has always been
either 0 if the resource in not acquired or an owner count if the
resource is acquired.
From NT 4.0 to Windows 2000, the size of the field in the ERESOURCE
structure that stores the owner count grew from a USHORT to a ULONG.
Your driver should work fine on all platforms if your local receiving
the return value from ExIsResourceAcquiredSharedLite() is a ULONG which
is first initialized to 0.
Regards,
Molly Brown
Microsoft Corporation
This posting is provided “AS IS” with no warranties and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Wednesday, February 25, 2004 11:41 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Prototype of ExIsResourceAcquiredSharedLite
Hi, all
I found a nasty problem with prototype of
ExIsResourceAcquiredSharedLite.
This function is defined to return USHORT value in IFSKIT for Windows
NT, but ULONG on newer systems. If anyone develops a driver which must
support Windows NT and newer (I do), then you have to use lower word
only (I better changer the prototype to BOOLEAN in IFS Kit’s header).
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
> the return value from ExIsResourceAcquiredSharedLite() is a ULONG which
is first initialized to 0.
Yes, it will work. But in the case of
ASSERT(!ExIsResourceAcquiredShared(Resource))
will always fail, because on NT4, only the lower word of EAX
is set to zero. But the compiler expects an ULONG, so it does
push dword ptr [Resource]
call __imp_ExIsResourceAcquiredSharedLite
test eax, eax
which does not work. I wondered why our filter has too much
ASSERTs in debug version on NT4 :-))
L.
----- Original Message -----
From: “Molly Brown”
To: “Windows File Systems Devs Interest List”
Sent: Monday, March 01, 2004 11:58 PM
Subject: RE: [ntfsd] Prototype of ExIsResourceAcquiredSharedLite
No, you don’t want to change the prototype to return a BOOLEAN.
The value returned by ExIsResourceAcquireSharedLite has always been
either 0 if the resource in not acquired or an owner count if the
resource is acquired.
From NT 4.0 to Windows 2000, the size of the field in the ERESOURCE
structure that stores the owner count grew from a USHORT to a ULONG.
Your driver should work fine on all platforms if your local receiving
the return value from ExIsResourceAcquiredSharedLite() is a ULONG which
is first initialized to 0.
Regards,
Molly Brown
Microsoft Corporation
This posting is provided “AS IS” with no warranties and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Wednesday, February 25, 2004 11:41 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Prototype of ExIsResourceAcquiredSharedLite
Hi, all
I found a nasty problem with prototype of
ExIsResourceAcquiredSharedLite.
This function is defined to return USHORT value in IFSKIT for Windows
NT, but ULONG on newer systems. If anyone develops a driver which must
support Windows NT and newer (I do), then you have to use lower word
only (I better changer the prototype to BOOLEAN in IFS Kit’s header).
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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@volny.cz
To unsubscribe send a blank email to xxxxx@lists.osr.com