StorPortLogError/StorPortLogSystemEvent can't be used when Windows installing!

Hi,all

I’m developing a storport miniport RAID driver, use StorPortLogError/StorPortLogSystemEvent to record the systemplog.But when the windows installing,if I load my driver and call this two functions,than I load my driver again,Lun is missing and driver not be loaded,I put some dbgprint info in the driverentry,it is not be printed,this means the second load is not enter DriverEntry!If I don’t call this two function,driver can be load agiain sucessfully.Why the StorPortLogError/StorPortLogSystemEvent will cause this problem,does it a BUG in windows install software?Can anyone give me some help,thx!

PS:Forgive my poor english:)

In what context do you call these functions?

What kind of event do you log?

Do you log any error against the boot/install LUN?

Re Alex :
There are a lot of logs will be recorded.For example,in the StartIO,some SCSI request I will not handle,I will log ?Unexpected SCSI request will not handle with the code 0xxxx!? by call StorPortLogSystemEvent.If I call these function when windows is normal running.Load/Unload again and agin will not be a problem,I guess there must be some restrictions when windows installing,but I search on the Internet and WDK,there are nothing mentioned this situation.

Run the sedtup under debugger. When you think the driver won’t load, break into the debugger and issue “lmi” command. See if your driver is still listead in the loaded modules.

Re Alex:
I issued “lmi” command,my driver is in the loaded modules,but HWStorAdapterControl has finished,why the driver is still loaded?How can I fix this problem?