I have a Virtual SCSI Miniport Driver in my software, It works well in 32b system(Include Windows XP/Vista/Windows 7).
But It can’t be load in Windows 7 with 64b, Of course, I can sure that it dosen’t a sign issue, my another driver can be load without sign.
I can see the debug outupt “Scsi Port Initalize, return status(0)” of my driver. FindAdapter and Initialize don’t be call? What’s wrong with my coding, I have used it under the 32b OS a few years ago. It works well.
The follow is my code of the DriverEntry.
ULONG DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PVOID Argument2)
{
HW_INITIALIZATION_DATA hwInitData;
NTSTATUS status;
memset(&hwInitData,0x00,sizeof(hwInitData));
hwInitData.HwInterrupt=NULL;
hwInitData.HwDmaStarted=NULL;
hwInitData.HwAdapterState=AdapterState;
hwInitData.SpecificLuExtensionSize=0;
hwInitData.SrbExtensionSize=0;
hwInitData.NeedPhysicalAddresses=FALSE;
hwInitData.TaggedQueuing=FALSE;
hwInitData.MultipleRequestPerLu=FALSE;
hwInitData.ReceiveEvent=FALSE;
hwInitData.HwInitializationDataSize = sizeof(HW_INITIALIZATION_DATA);
hwInitData.HwFindAdapter = (PHW_FIND_ADAPTER)FindAdapter;
hwInitData.HwInitialize = (PHW_INITIALIZE)Initialize;
hwInitData.HwStartIo = (PHW_STARTIO)StartIo;
hwInitData.HwResetBus = ResetBus;
hwInitData.HwAdapterControl = (PHW_ADAPTER_CONTROL)AdapterControl;
hwInitData.AdapterInterfaceType=Isa;
hwInitData.DeviceExtensionSize=sizeof(MyDevExt);
hwInitData.NumberOfAccessRanges=1;
hwInitData.MapBuffers=TRUE;
hwInitData.AutoRequestSense=TRUE;
status = ScsiPortInitialize(DriverObject, Argument2, &hwInitData, NULL );
DbgPrint(“Scsi Port Initalize, return status(%X)\n”);
}
Thank you very much.
Allen
What does setupapi.log say?
You could also use a check build version of storport to see its debug messages.
Igor Sharovar
Is it an exact code? Didn’t you get a compiler warning about not returning a result? And, by the way, DriverEntry should return NTSTATUS.
Igor Sharovar
Thank’s for your help.
How can I get the check build version of storport? Should I install a check build version Windows 7? Can I download it from internet?
I don’t think is a issue of the setup, I try to replace mpio.sys(of iscsi module), The same issue will be find,
By the way, I set the PnpInterface to 1 in my inf file.
Thank your
Allen
Hi, Alex Grig
Thank you very mush,
Yes I have return the status, I lost it when I post it
The follow it the log when I build it, I can’f find any warning
BUILD: Computing Include file dependencies:
BUILD: Examining c:\vscsibus directory for files to compile.
oacr invalidate root:amd64chk /autocleanqueue
1>Compiling and Linking c:\vscsibus *************
1>‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=’
1>c:\vscsibus: TARGETPATH is …\objchk_win7_amd64
Allen
>How can I get the check build version of storport?
Should I install a check build version Windows 7?
You should not install whole Check Build version of Windows. Just extract the file from a Check build distribution and replace the file in \Windows\System32\drivers.
I got the Check Build of Windows from my MSDN subscription.
Igor Sharovar
I thought you are writing a scsi miniport. The checked scsiport.sys can be
found in chk build windows. Extract it from an iso file and copy it over in
safe mode.
Yeah, getting a vscmp to load on all variants is a pain in the neck. A
virtual storport is light years easier but don’t work for xp. If you don’t
have to support XP, forget about SCSIPORT. Go straight to storport.
Good luck,
Calvin
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@sina.com
Sent: Thursday, July 08, 2010 9:23 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual SCSI Miniport Driver Loading issue
Igor Sharovar
Thank’s for your help.
How can I get the check build version of storport? Should I install a check
build version Windows 7? Can I download it from internet?
I don’t think is a issue of the setup, I try to replace mpio.sys(of iscsi
module), The same issue will be find,
By the way, I set the PnpInterface to 1 in my inf file.
Thank your
Allen
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Thank you Calvin Guan
Yes , I writting a scsi miniport for diskless, XP must be supported, Maybe, I should develop a new driver by storport for Vista or Windows 7(x64).
Best Regards.
Allen
Hello everyone,
Thanks for your attention and help.
It looks like that I have installed x86 version, It works well after clear the x86 version.
B.R.
Allen
>> It looks like that I have installed x86 version, It works well after clear the x86 version.
I doubt it.
Had you loaded the x86 driver on x64, the loader would not call your DriverEntry. The loader will fail it before it gets there.
Calvin
Hi Calvin,
Yes, My colleague install x86 version in that machine, He is tester only, I have uninstalled it by device manager, and reboot, then reinstall x64 version. the issue be find.
It work well after remove all the residual information in registy and reinstall it.
B.R.
Allen