Help: SCSI Miniport with WMI causes SCSIPORT to crash!!

Hi there!

I have run into problems while implementing WMI in my SCSI miniport.
Ofcourse, I am using SCSIWMI library (scsiwmi.lib).

As described in the DDK, I set ConfigInfo->WmiDataProvider = TRUE in
HwScsiFindAdapter. This is causing SCSIPORT to crash (It works fine if I
don’t set this flag to TRUE). Stack trace (please see below for full stack
tarce) tells me that it crashes while looking for something(a callback?)
in the Device Extension in SCSIPORT!SpWmiPassToMiniPort. Am I missing
something?

I guess I am doing the WMI related stuff as described in the DDK (Binary
MOF compiled with the Driver sys file). I have noticed that the crash
happens even before any calls to StartIo with function code set to
SRB_FUNCTION_WMI, so I am assuming the only WMI related stuff in my
miniport that has executed at this point is the DATA provider flag in
HwScsiFindAdapter.

My miniport is based on DDK SCSI miniport sample aha154x. Only major diff
being that mine is a VIRTUAL miniport, can that be a problem?

Any help is hugely appreciated!!

Thanks in advance!

This is some info from the kernel debugger.

PS: Unhandled Kernel Mode Exception Pointers = 0xF897C600
Code c0000005 Addr F838AD2C Info0 00000000 Info1 00000004 Info2 00000004
Info3 00000000

*** Fatal System Error: 0x0000007e
(0xC0000005,0xF838AD2C,0xF897CAA4,0xF897C7A4)

Break instruction exception - code 80000003 (first chance)

A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.

A fatal system error has occurred.

*******************************************************************************

*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 7E, {c0000005, f838ad2c, f897caa4, f897c7a4}

Probably caused by : SCSIPORT.SYS ( SCSIPORT!SpWmiPassToMiniPort+11a )

Followup: MachineOwner

nt!RtlpBreakWithStatusInstruction:
80581b54 cc int 3
kd> !analyze -v
*******************************************************************************

*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but …
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
An exception code of 0x80000002 (STATUS_DATATYPE_MISALIGNMENT) indicates
that an unaligned data reference was encountered. The trap frame will
supply additional information.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: f838ad2c, The address that the exception occurred at
Arg3: f897caa4, Exception Record Address
Arg4: f897c7a4, Context Record Address

Debugging Details:

EXCEPTION_CODE: c0000005

FAULTING_IP:
SCSIPORT!SpWmiPassToMiniPort+11a
f838ad2c 8b4804 mov ecx,[eax+0x4]

EXCEPTION_PARAMETER1: f897caa4

CONTEXT: f897c7a4 – (.cxr fffffffff897c7a4)
eax=00000000 ebx=81fd0af0 ecx=00000000 edx=00000000 esi=f897cc7c
edi=f897cbf4
eip=f838ad2c esp=f897cb6c ebp=f897cc14 iopl=0 nv up ei ng nz ac po
cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010297
SCSIPORT!SpWmiPassToMiniPort+11a:
f838ad2c 8b4804 mov ecx,[eax+0x4]
Resetting default context

DEFAULT_BUCKET_ID: DRIVER_FAULT

BUGCHECK_STR: 0x7E

LAST_CONTROL_TRANSFER: from f838b9ec to f838ad2c

STACK_TEXT:
f897cc14 f838b9ec 81fcca38 00000008 f897cc7c
SCSIPORT!SpWmiPassToMiniPort+0x11a
f897cc60 f838c188 81fcca38 0097cc7c 81fcca38
SCSIPORT!SpWmiIrpRegisterRequest+0x16b
f897cc8c f8363591 81fccaf0 81d9a628 81d9a628
SCSIPORT!ScsiPortSystemControlIrp+0xe6
f897cca0 804f61de 81fcca38 81d9a628 c00000bb
SCSIPORT!ScsiPortGlobalDispatch+0x1b
f897ccb8 806dc092 f897cd40 81d9a628 81e991d8 nt!IopfCallDriver+0x4f
f897cce8 806dc255 81d9a628 00000008 81fcca38 nt!WmipForwardWmiIrp+0x23b
f897cd14 806de56d 00000008 81fcca38 00000000 nt!WmipSendWmiIrp+0x8b
f897cd50 806de6f6 81fce180 00000000 81fce180
nt!WmipRegisterOrUpdateDS+0xa3
f897cd64 806df6a5 81fce180 81fb4640 805c7bfc nt!WmipRegisterDS+0x42
f897cd80 80590ff5 00000000 00000000 81fb4640
nt!WmipRegistrationWorker+0x101
f897cdac 80683a64 00000000 00000000 00000000 nt!ExpWorkerThread+0x10d
f897cddc 8059e9be 80590ee8 00000001 00000000
nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16

FOLLOWUP_IP:
SCSIPORT!SpWmiPassToMiniPort+11a
f838ad2c 8b4804 mov ecx,[eax+0x4]

FOLLOWUP_NAME: MachineOwner

SYMBOL_NAME: SCSIPORT!SpWmiPassToMiniPort+11a

MODULE_NAME: SCSIPORT

IMAGE_NAME: SCSIPORT.SYS

DEBUG_FLR_IMAGE_TIMESTAMP: 3b7d7f2f

STACK_COMMAND: .cxr fffffffff897c7a4 ; kb

BUCKET_ID: 0x7E_SCSIPORT!SpWmiPassToMiniPort+11a

////////////////////////////////////////////
The stack trace tells me that it is causing a memory access violation in
SCSIPORT!SpWmiPassToMiniPort, but I fail to understand why?

Here is some followup:
The first parameter to SpWmiPassToMiniPort is the miniport device object.
And the disassembly at this point is something like this:
f838ad23 8b4598 mov eax,[ebp-0x68]
f838ad26 8b8010010000 mov eax,[eax+0x110]
f838ad2c 8b4804 mov ecx,[eax+0x4]

I can see that [ebp-0x68] is nothing but device extension (SCSIPORT?)
and[eax+0x110] is NULL. I deduce that it is looking for something in
device extension at offset 0x110. What could it be?

Read the archives regarding virtual SCSI miniports. There are probably
500 messages explaining why you can not do what you are doing.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Win2kNewBie
Sent: Sunday, December 29, 2002 11:17 PM
To: NT Developers Interest List
Subject: [ntdev] Help: SCSI Miniport with WMI causes SCSIPORT to crash!!

Hi there!

I have run into problems while implementing WMI in my SCSI miniport.
Ofcourse, I am using SCSIWMI library (scsiwmi.lib).

As described in the DDK, I set ConfigInfo->WmiDataProvider = TRUE in
HwScsiFindAdapter. This is causing SCSIPORT to crash (It works fine if I
don’t set this flag to TRUE). Stack trace (please see below for full
stack
tarce) tells me that it crashes while looking for something(a callback?)
in the Device Extension in SCSIPORT!SpWmiPassToMiniPort. Am I missing
something?

I guess I am doing the WMI related stuff as described in the DDK (Binary
MOF compiled with the Driver sys file). I have noticed that the crash
happens even before any calls to StartIo with function code set to
SRB_FUNCTION_WMI, so I am assuming the only WMI related stuff in my
miniport that has executed at this point is the DATA provider flag in
HwScsiFindAdapter.

My miniport is based on DDK SCSI miniport sample aha154x. Only major
diff
being that mine is a VIRTUAL miniport, can that be a problem?

Any help is hugely appreciated!!

Thanks in advance!

This is some info from the kernel debugger.

PS: Unhandled Kernel Mode Exception Pointers = 0xF897C600
Code c0000005 Addr F838AD2C Info0 00000000 Info1 00000004 Info2 00000004
Info3 00000000

*** Fatal System Error: 0x0000007e
(0xC0000005,0xF838AD2C,0xF897CAA4,0xF897C7A4)

Break instruction exception - code 80000003 (first chance)

A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.

A fatal system error has occurred.

************************************************************************
*******

*

*
* Bugcheck Analysis

*
*

*
************************************************************************
*******

Use !analyze -v to get detailed debugging information.

BugCheck 7E, {c0000005, f838ad2c, f897caa4, f897c7a4}

Probably caused by : SCSIPORT.SYS ( SCSIPORT!SpWmiPassToMiniPort+11a )

Followup: MachineOwner

nt!RtlpBreakWithStatusInstruction:
80581b54 cc int 3
kd> !analyze -v
************************************************************************
*******

*

*
* Bugcheck Analysis

*
*

*
************************************************************************
*******

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never
have
hardcoded breakpoints in retail code, but …
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
An exception code of 0x80000002 (STATUS_DATATYPE_MISALIGNMENT) indicates
that an unaligned data reference was encountered. The trap frame will
supply additional information.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: f838ad2c, The address that the exception occurred at
Arg3: f897caa4, Exception Record Address
Arg4: f897c7a4, Context Record Address

Debugging Details:

EXCEPTION_CODE: c0000005

FAULTING_IP:
SCSIPORT!SpWmiPassToMiniPort+11a
f838ad2c 8b4804 mov ecx,[eax+0x4]

EXCEPTION_PARAMETER1: f897caa4

CONTEXT: f897c7a4 – (.cxr fffffffff897c7a4)
eax=00000000 ebx=81fd0af0 ecx=00000000 edx=00000000 esi=f897cc7c
edi=f897cbf4
eip=f838ad2c esp=f897cb6c ebp=f897cc14 iopl=0 nv up ei ng nz ac
po
cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010297
SCSIPORT!SpWmiPassToMiniPort+11a:
f838ad2c 8b4804 mov ecx,[eax+0x4]
Resetting default context

DEFAULT_BUCKET_ID: DRIVER_FAULT

BUGCHECK_STR: 0x7E

LAST_CONTROL_TRANSFER: from f838b9ec to f838ad2c

STACK_TEXT:
f897cc14 f838b9ec 81fcca38 00000008 f897cc7c
SCSIPORT!SpWmiPassToMiniPort+0x11a
f897cc60 f838c188 81fcca38 0097cc7c 81fcca38
SCSIPORT!SpWmiIrpRegisterRequest+0x16b
f897cc8c f8363591 81fccaf0 81d9a628 81d9a628
SCSIPORT!ScsiPortSystemControlIrp+0xe6
f897cca0 804f61de 81fcca38 81d9a628 c00000bb
SCSIPORT!ScsiPortGlobalDispatch+0x1b
f897ccb8 806dc092 f897cd40 81d9a628 81e991d8 nt!IopfCallDriver+0x4f
f897cce8 806dc255 81d9a628 00000008 81fcca38 nt!WmipForwardWmiIrp+0x23b
f897cd14 806de56d 00000008 81fcca38 00000000 nt!WmipSendWmiIrp+0x8b
f897cd50 806de6f6 81fce180 00000000 81fce180
nt!WmipRegisterOrUpdateDS+0xa3
f897cd64 806df6a5 81fce180 81fb4640 805c7bfc nt!WmipRegisterDS+0x42
f897cd80 80590ff5 00000000 00000000 81fb4640
nt!WmipRegistrationWorker+0x101
f897cdac 80683a64 00000000 00000000 00000000 nt!ExpWorkerThread+0x10d
f897cddc 8059e9be 80590ee8 00000001 00000000
nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16

FOLLOWUP_IP:
SCSIPORT!SpWmiPassToMiniPort+11a
f838ad2c 8b4804 mov ecx,[eax+0x4]

FOLLOWUP_NAME: MachineOwner

SYMBOL_NAME: SCSIPORT!SpWmiPassToMiniPort+11a

MODULE_NAME: SCSIPORT

IMAGE_NAME: SCSIPORT.SYS

DEBUG_FLR_IMAGE_TIMESTAMP: 3b7d7f2f

STACK_COMMAND: .cxr fffffffff897c7a4 ; kb

BUCKET_ID: 0x7E_SCSIPORT!SpWmiPassToMiniPort+11a

////////////////////////////////////////////
The stack trace tells me that it is causing a memory access violation in
SCSIPORT!SpWmiPassToMiniPort, but I fail to understand why?

Here is some followup:
The first parameter to SpWmiPassToMiniPort is the miniport device
object.
And the disassembly at this point is something like this:
f838ad23 8b4598 mov eax,[ebp-0x68]
f838ad26 8b8010010000 mov eax,[eax+0x110]
f838ad2c 8b4804 mov ecx,[eax+0x4]

I can see that [ebp-0x68] is nothing but device extension (SCSIPORT?)
and[eax+0x110] is NULL. I deduce that it is looking for something in
device extension at offset 0x110. What could it be?


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Did you define the required WMI structures and entry points that are
required? The DDK should have WMI examples that will show how to do this, if
not look at Walter Oney’s book.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105

“Win2kNewBie” wrote in message
news:xxxxx@ntdev…
>
> Hi there!
>
> I have run into problems while implementing WMI in my SCSI miniport.
> Ofcourse, I am using SCSIWMI library (scsiwmi.lib).
>
> As described in the DDK, I set ConfigInfo->WmiDataProvider = TRUE in
> HwScsiFindAdapter. This is causing SCSIPORT to crash (It works fine if I
> don’t set this flag to TRUE). Stack trace (please see below for full stack
> tarce) tells me that it crashes while looking for something(a callback?)
> in the Device Extension in SCSIPORT!SpWmiPassToMiniPort. Am I missing
> something?
>
> I guess I am doing the WMI related stuff as described in the DDK (Binary
> MOF compiled with the Driver sys file). I have noticed that the crash
> happens even before any calls to StartIo with function code set to
> SRB_FUNCTION_WMI, so I am assuming the only WMI related stuff in my
> miniport that has executed at this point is the DATA provider flag in
> HwScsiFindAdapter.
>
> My miniport is based on DDK SCSI miniport sample aha154x. Only major diff
> being that mine is a VIRTUAL miniport, can that be a problem?
>
> Any help is hugely appreciated!!
>
> Thanks in advance!
>
> This is some info from the kernel debugger.
>
> PS: Unhandled Kernel Mode Exception Pointers = 0xF897C600
> Code c0000005 Addr F838AD2C Info0 00000000 Info1 00000004 Info2 00000004
> Info3 00000000
>
> Fatal System Error: 0x0000007e
> (0xC0000005,0xF838AD2C,0xF897CAA4,0xF897C7A4)
>
> Break instruction exception - code 80000003 (first chance)
>
> A fatal system error has occurred.
> Debugger entered on first try; Bugcheck callbacks have not been invoked.
>
> A fatal system error has occurred.
>
>


>
>
>
> * Bugcheck Analysis
>
>
>
>


>
>
> Use !analyze -v to get detailed debugging information.
>
> BugCheck 7E, {c0000005, f838ad2c, f897caa4, f897c7a4}
>
> Probably caused by : SCSIPORT.SYS ( SCSIPORT!SpWmiPassToMiniPort+11a )
>
> Followup: MachineOwner
> ---------
>
> nt!RtlpBreakWithStatusInstruction:
> 80581b54 cc int 3
> kd> !analyze -v
>
***

>
>
>
> * Bugcheck Analysis
>
>
>
>


>
>
> SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
> This is a very common bugcheck. Usually the exception address pinpoints
> the driver/function that caused the problem. Always note this address
> as well as the link date of the driver/image that contains this address.
> Some common problems are exception code 0x80000003. This means a hard
> coded breakpoint or assertion was hit, but this system was booted
> /NODEBUG. This is not supposed to happen as developers should never have
> hardcoded breakpoints in retail code, but …
> If this happens, make sure a debugger gets connected, and the
> system is booted /DEBUG. This will let us see why this breakpoint is
> happening.
> An exception code of 0x80000002 (STATUS_DATATYPE_MISALIGNMENT) indicates
> that an unaligned data reference was encountered. The trap frame will
> supply additional information.
> Arguments:
> Arg1: c0000005, The exception code that was not handled
> Arg2: f838ad2c, The address that the exception occurred at
> Arg3: f897caa4, Exception Record Address
> Arg4: f897c7a4, Context Record Address
>
> Debugging Details:
> ------------------
>
>
> EXCEPTION_CODE: c0000005
>
> FAULTING_IP:
> SCSIPORT!SpWmiPassToMiniPort+11a
> f838ad2c 8b4804 mov ecx,[eax+0x4]
>
> EXCEPTION_PARAMETER1: f897caa4
>
> CONTEXT: f897c7a4 – (.cxr fffffffff897c7a4)
> eax=00000000 ebx=81fd0af0 ecx=00000000 edx=00000000 esi=f897cc7c
> edi=f897cbf4
> eip=f838ad2c esp=f897cb6c ebp=f897cc14 iopl=0 nv up ei ng nz ac po
> cy
> cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
> efl=00010297
> SCSIPORT!SpWmiPassToMiniPort+11a:
> f838ad2c 8b4804 mov ecx,[eax+0x4]
> Resetting default context
>
> DEFAULT_BUCKET_ID: DRIVER_FAULT
>
> BUGCHECK_STR: 0x7E
>
> LAST_CONTROL_TRANSFER: from f838b9ec to f838ad2c
>
> STACK_TEXT:
> f897cc14 f838b9ec 81fcca38 00000008 f897cc7c
> SCSIPORT!SpWmiPassToMiniPort+0x11a
> f897cc60 f838c188 81fcca38 0097cc7c 81fcca38
> SCSIPORT!SpWmiIrpRegisterRequest+0x16b
> f897cc8c f8363591 81fccaf0 81d9a628 81d9a628
> SCSIPORT!ScsiPortSystemControlIrp+0xe6
> f897cca0 804f61de 81fcca38 81d9a628 c00000bb
> SCSIPORT!ScsiPortGlobalDispatch+0x1b
> f897ccb8 806dc092 f897cd40 81d9a628 81e991d8 nt!IopfCallDriver+0x4f
> f897cce8 806dc255 81d9a628 00000008 81fcca38 nt!WmipForwardWmiIrp+0x23b
> f897cd14 806de56d 00000008 81fcca38 00000000 nt!WmipSendWmiIrp+0x8b
> f897cd50 806de6f6 81fce180 00000000 81fce180
> nt!WmipRegisterOrUpdateDS+0xa3
> f897cd64 806df6a5 81fce180 81fb4640 805c7bfc nt!WmipRegisterDS+0x42
> f897cd80 80590ff5 00000000 00000000 81fb4640
> nt!WmipRegistrationWorker+0x101
> f897cdac 80683a64 00000000 00000000 00000000 nt!ExpWorkerThread+0x10d
> f897cddc 8059e9be 80590ee8 00000001 00000000
> nt!PspSystemThreadStartup+0x34
> 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16
>
>
> FOLLOWUP_IP:
> SCSIPORT!SpWmiPassToMiniPort+11a
> f838ad2c 8b4804 mov ecx,[eax+0x4]
>
> FOLLOWUP_NAME: MachineOwner
>
> SYMBOL_NAME: SCSIPORT!SpWmiPassToMiniPort+11a
>
> MODULE_NAME: SCSIPORT
>
> IMAGE_NAME: SCSIPORT.SYS
>
> DEBUG_FLR_IMAGE_TIMESTAMP: 3b7d7f2f
>
> STACK_COMMAND: .cxr fffffffff897c7a4 ; kb
>
> BUCKET_ID: 0x7E_SCSIPORT!SpWmiPassToMiniPort+11a
>
> ////////////////////////////////////////////
> The stack trace tells me that it is causing a memory access violation in
> SCSIPORT!SpWmiPassToMiniPort, but I fail to understand why?
>
> Here is some followup:
> The first parameter to SpWmiPassToMiniPort is the miniport device object.
> And the disassembly at this point is something like this:
> f838ad23 8b4598 mov eax,[ebp-0x68]
> f838ad26 8b8010010000 mov eax,[eax+0x110]
> f838ad2c 8b4804 mov ecx,[eax+0x4]
>
> I can see that [ebp-0x68] is nothing but device extension (SCSIPORT?)
> and[eax+0x110] is NULL. I deduce that it is looking for something in
> device extension at offset 0x110. What could it be?
>
>

Jamey,

I ran though the archives but couldn’t find any info that might suggest a
reason for the crash that I am experiencing. There is a lot of discussion
what you need to do in order to make SCSIPORT call the FindAdapter in ur
miniport and various performance hits due to timers. However this is not
really an issue in my case. I have a working virtual minport that serves
me just fine.

But now that I have decided to enhance my miniport with WMI support, I see
this problem. Is it anyway related to my miniport being a virtual
miniport? If yes, how?

Thanks for the reply!

-Bandeep

Garry,

As DDK instructs, I start with setting ConfigInfo->WmiDataProvider = TRUE
in call to FindAdapter. I have compiled the BMF file as a resource within
my SYS file and I am really waiting for a call to StartIo with
Srb->Function = SRB_FUNTION_WMI, so that I get a chance to handle
QueryWmiRegInfo and other related calls.

Jamey (StorageCraft) seem to suggest that it is because of my miniport
being a virtual SCSI miniport, but I fail to understand how? Any clues?

Thanks once again!

I do not think this issue is a virtual/SCSIPORT/miniport problem. There is
an obscurity in the documentation for WMI that seems to permeate all classes
of drivers that attempt to use it. I do know, that using Walter’s early WDM
templates always resulted in a compile error and a runtime bug in WMI
registartion that I had to repair every time I created a template to begin a
new driver. I also know that in a seminar I attended given by Solomon, I
think it was in San Diego taught by Jamie Hanrahan, the overall feeling was
to NOT use WMI in WDM drivers since it frankly was not ready for prime time.

The original inquirer needs to deal with it as a WMI issue and not a
SCSIPORT/miniport issue. In the case mentioned above, I believe the
underlying bug was in the definition and initialization of one of the
underlying WMI data structures. The code needed was simply not produced
properly by Walter’s wizard. Be aware, however that there is over 18 months
between now and the last time I ran the wizard, so my memory can be easily
scewed, and I was not dealinjg with a SCSI miniport. Look at the definition
and use of any static or preamble/auto-initialized structures that you are
using as well as the WMI GUIDS you are using. Fire up WinDbg and step
through the code to be sure these data structures are initialized properly.

I want to say the problem I encountered was in defining the pointer to the
GUID, but I am simply not sure. To much code has passed under the bridge
since then.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105

“Win2kNewBie” wrote in message
news:xxxxx@ntdev…
>
> Garry,
>
> As DDK instructs, I start with setting ConfigInfo->WmiDataProvider = TRUE
> in call to FindAdapter. I have compiled the BMF file as a resource within
> my SYS file and I am really waiting for a call to StartIo with
> Srb->Function = SRB_FUNTION_WMI, so that I get a chance to handle
> QueryWmiRegInfo and other related calls.
>
> Jamey (StorageCraft) seem to suggest that it is because of my miniport
> being a virtual SCSI miniport, but I fail to understand how? Any clues?
>
> Thanks once again!
>
>

“Gary G. Little” wrote:

I do not think this issue is a virtual/SCSIPORT/miniport problem. There is
an obscurity in the documentation for WMI that seems to permeate all classes
of drivers that attempt to use it. I do know, that using Walter’s early WDM
templates always resulted in a compile error and a runtime bug in WMI
registartion that I had to repair every time I created a template to begin a
new driver. I also know that in a seminar I attended given by Solomon, I
think it was in San Diego taught by Jamie Hanrahan, the overall feeling was
to NOT use WMI in WDM drivers since it frankly was not ready for prime time.

I don’t think this has been true for a very long time. I have great luck
with WMI on all platforms except Win98 Gold, where it was broken due to
user-mode provider bugs. I’m not sure what the wizard problem was, but
the samples in the book (at least the 2d edition) seem to work fine on
all other platforms. If there is a problem with the wizard, I hope
someone will tell me so I can fix it…

WMI is wonderful for interfacing scripting applications to drivers. It
took me about five minutes with a client in the office to support a
scripted calibration API once. Mind you, I was using a template class in
my C++ framework to do most of the work, but it wouldn’t have taken more
than half an hour with regular syntax.

One of my advanced seminars (2 days worth, in fact) covers
WMI in great detail


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com