driver unload and fltmgr

hallo, after calling IoRegisterFileSystem (win10) fltmgr seems to have
a ref. on my driver and stops it from unloading. that really extends
development
times. are there any workarounds. disbaling fltmgr seems not to be a good
idea…

mp

Fltmgr doesn’t have a ref. The matter is you have existing device-object.
In this case it’s your registered filesystem. Make ioctl which unregister
file system first and then delete its device-object. After that your unload
routine must be called.

18 нояб. 2016 г. 5:06 PM пользователь “maik peterson” <
xxxxx@googlemail.com> написал:

hallo, after calling IoRegisterFileSystem (win10) fltmgr seems to have
a ref. on my driver and stops it from unloading. that really extends
development
times. are there any workarounds. disbaling fltmgr seems not to be a good
idea…

mp
— NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
WDF, Windows internals and software drivers! Details at To unsubscribe,
visit the List Server section of OSR Online at

puhh, yes clear i unregister ! that would have been too simple. but just to
unregister doesnt help. still open ref. and unload fails. this seems to
happen to all fs today (win10).

2016-11-18 15:15 GMT+01:00 Anatoly Mikhailov :

> Fltmgr doesn’t have a ref. The matter is you have existing device-object.
> In this case it’s your registered filesystem. Make ioctl which unregister
> file system first and then delete its device-object. After that your unload
> routine must be called.
>
> 18 нояб. 2016 г. 5:06 PM пользователь “maik peterson” <
> xxxxx@googlemail.com> написал:
>
>> hallo, after calling IoRegisterFileSystem (win10) fltmgr seems to have
>> a ref. on my driver and stops it from unloading. that really extends
>> development
>> times. are there any workarounds. disbaling fltmgr seems not to be a good
>> idea…
>>
>> mp
>> — NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
>> WDF, Windows internals and software drivers! Details at To unsubscribe,
>> visit the List Server section of OSR Online at
>
> — NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
> WDF, Windows internals and software drivers! Details at To unsubscribe,
> visit the List Server section of OSR Online at

So you unregistered your fs and deleted its device_object but still have
unload not called. Am I correct?

18 нояб. 2016 г. 7:08 PM пользователь “maik peterson” <
xxxxx@googlemail.com> написал:

puhh, yes clear i unregister ! that would have been too simple. but just
to unregister doesnt help. still open ref. and unload fails. this seems to
happen to all fs today (win10).

2016-11-18 15:15 GMT+01:00 Anatoly Mikhailov :
>
>> Fltmgr doesn’t have a ref. The matter is you have existing device-object.
>> In this case it’s your registered filesystem. Make ioctl which unregister
>> file system first and then delete its device-object. After that your unload
>> routine must be called.
>>
>> 18 нояб. 2016 г. 5:06 PM пользователь “maik peterson” <
>> xxxxx@googlemail.com> написал:
>>
>>> hallo, after calling IoRegisterFileSystem (win10) fltmgr seems to have
>>> a ref. on my driver and stops it from unloading. that really extends
>>> development
>>> times. are there any workarounds. disbaling fltmgr seems not to be a
>>> good idea…
>>>
>>> mp
>>> — NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
>>> WDF, Windows internals and software drivers! Details at To unsubscribe,
>>> visit the List Server section of OSR Online at
>>
>> — NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
>> WDF, Windows internals and software drivers! Details at To unsubscribe,
>> visit the List Server section of OSR Online at
>
>
> — NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis,
> WDF, Windows internals and software drivers! Details at To unsubscribe,
> visit the List Server section of OSR Online at

Try to do:
DriverObject->Flags &= ~0x80;

before unregistering and deleting your FS to see if unload would be called
or not.