I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
routine yet it is hanging. This is a result of plugging in a USB drive. The
documentation says it is safe to call this routine during the
InstanceSetupCallBack.
The stack looks like this:
4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
nt!KiSwapThread+0x46
nt!KeWaitForSingleObject+0x1c2
MountMgr!MountMgrDeviceControl+0x2e
nt!IopfCallDriver+0x31
fltmgr!FltGetVolumeGuidName+0x13a
MyDriver!RepInstanceSetup+0xac
fltmgr!FltpDoInstanceSetupNotification+0x4b
fltmgr!FltpInitInstance+0x272
fltmgr!FltpCreateInstanceFromName+0x295
fltmgr!FltpEnumerateRegistryInstances+0xf4
fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
fltmgr!FltpCreate+0x16a
nt!IopfCallDriver+0x31
naiavf5x+0x74a0
naiavf5x+0x2520
nt!IopfCallDriver+0x31
nt!IopParseDevice+0xa58
nt!ObpLookupObjectName+0x56a
nt!ObOpenObjectByName+0xeb
nt!IopCreateFile+0x407
nt!IoCreateFile+0x8e
nt!NtOpenFile+0x27
nt!KiFastCallEntry+0xf8
nt!ZwOpenFile+0x11
VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
nt!IopProcessWorkItem+0x13
nt!ExpWorkerThread+0x100
nt!PspSystemThreadStartup+0x34
nt!KiThreadStartup+0x16
I was going to move the call when the first opened happened, but the docs
also say that that is when the InstanceSetupCallback is called. SO that
won’t help.
When can this routine safely be called?
Thanks,
Ken