Help in unloading a driver.

I have a very simple driver. you can call legacy driver. It has just four
entry points create, close, deviceiocontrol, and unload routine.

If i unload this driver using ZwUnloadDriver it works fine on Win2K. But
fails on Windows XP SP1 with error STATUS_INVALID_DEVICE_REQUEST.

If i trace into ZwUnloadDriver, i found it is calling _IopIsLegacyDriver
function. This function is checking if the flag 0x02 is set in

Please can some one tell me who do i make my driver unloadable using
ZwUnloadDriver. What do i need to do to make this driver unloadable on XP. I
did not add any more entry points other than i specified above.