Hi All,
I am using ScsiPortMoveMemory to move overlapped block of data. I am
compiling my code under windows 2000 DDK and testing on windows 2000
professional. While testing the driver i figured out that the
ScsiPortMoveMemory does not take care of overlapped memory blocks. Windows
2000 DDK documentation does not say anything about overlapped blocks case
for ScsiPortMoveMemory.
I also checked Windows 2003 DDK and it says that the ScsiPortMoveMemory
takes care of overlapped blocks.
I have following doubts:
1> Can i use the driver that is compiled on Windows 2003 DDK on Windows 2000
???
2> If the driver that is compiled on Windows 2003 DDK is used on Windows
2000 then will ScsiPortMoveMemory take care of overlapped blocks on Windows
2000.
3> If 2 is yes then does it imply that Scsi miniport drivers are statically
linked to the port driver??.
I think that ScsiPortMoveMemory will behave same (i.e. will not take care of
Overlapped memory blocks) on Windows 2000 irrespective of wherather it is
build on Windows 2000 DDK or on Windows 2003 DDK.
The only possible way that miniport driver can behave differently when build
with different DDKs is when they are linked statically.
Is this correct or am i missing something here??
Thanks,
Ajitabh
-
if you mean can you use a driver built with the w2k3 ddk for the w2k3
environment, then no, there is no guarantee that your driver will work, or
even load. With a scsi miniport it might just work, but you won’t get any
benefit.
-
as far as I can tell the scsiport implementation of ScsiPortMoveMemory is
identical in w2k/xp/w2k3 versions of the scsiport driver. Also, it appears
to me that none of the implementations handle overlapped buffers correctly,
regardless of what the documentation might say. So the answer to your
question aside from any other complications, is no, it will not make any
difference.
-
minports are dynamically linked to scsiport.sys when they are loaded.
Thus even if this was fixed in w2k3 it wouldn’t matter for w2k.
You might try seeing if you can use memmove directly in your miniport. If
not then you can build a small static library that provides your own api
that includes a wrapper around memmove. Link your miniport with that. Note
that ntddk.h simply defines RtlMoveMemory as:
#define RtlMoveMemory(Destination,Source,Length)
memmove((Destination),(Source),(Length))
Warning: I’m assuming an x86 32bit build environment.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
Saxena, Ajitabh Prakash
Sent: Friday, June 04, 2004 6:50 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] ScsiPortMoveMemory for overlapped blocks on
Windows 2000 and 2003
Hi All,
I am using ScsiPortMoveMemory to move overlapped block
of data. I am compiling my code under windows 2000 DDK and
testing on windows 2000 professional. While testing the
driver i figured out that the ScsiPortMoveMemory does not
take care of overlapped memory blocks. Windows 2000 DDK
documentation does not say anything about overlapped blocks
case for ScsiPortMoveMemory.
I also checked Windows 2003 DDK and it says that the
ScsiPortMoveMemory takes care of overlapped blocks.
I have following doubts:
1> Can i use the driver that is compiled on Windows 2003 DDK
on Windows
1> 2000
???
2> If the driver that is compiled on Windows 2003 DDK is used
on Windows
2000 then will ScsiPortMoveMemory take care of overlapped
blocks on Windows 2000.
3> If 2 is yes then does it imply that Scsi miniport drivers are
3> statically
linked to the port driver??.
I think that ScsiPortMoveMemory will behave same (i.e. will
not take care of Overlapped memory blocks) on Windows 2000
irrespective of wherather it is build on Windows 2000 DDK or
on Windows 2003 DDK.
The only possible way that miniport driver can behave
differently when build with different DDKs is when they are
linked statically.
Is this correct or am i missing something here??
Thanks,
Ajitabh
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com