Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

On-Access, Transparent, Per-File Data Encryption:

OSR's File Encryption Solution Framework (FESF) provides all the infrastructure you need to build a transparent file encryption product REALLY FAST.

Super flexible policy determination and customization, all done in user-mode. Extensive starter/sample code provided.

Proven, robust, flexible. In use in multiple commercial products.

Currently available on Windows. FESF for Linux will ship in 2018.

For more info: https://www.osr.com/fesf

Go Back   OSR Online Lists > ntfsd
Welcome, Guest
You must login to post to this list
  Message 1 of 6  
10 Aug 17 13:27
Sivaller
xxxxxx@gmail.com
Join Date: 13 Jul 2017
Posts To This List: 28
Problem mount disk when i disk usb storage is connected

Hello, I still have a problem with IRP IRP_MN_MOUNT_VOLUME. It is no longer called in my driver as soon WHEN I connect an external USB drive. Windows with big concerns !! How do I works ?????? Where IOCTL function should I look ?????? Thanks Microsoft, I spent 3 months to developer my driver !! Thank
  Message 2 of 6  
10 Aug 17 14:28
Slava Imameev
xxxxxx@hotmail.com
Join Date: 13 Sep 2013
Posts To This List: 253
Problem mount disk when i disk usb storage is connected

I suggest you to stop flooding this forum with the same problem. It is not possible to isolate your problem from the description. Put code on GitHub and provide a reference. Maybe somebody will bother to look at it.
  Message 3 of 6  
10 Aug 17 15:20
Sivaller
xxxxxx@gmail.com
Join Date: 13 Jul 2017
Posts To This List: 28
Problem mount disk when i disk usb storage is connected

I deny post the full source code into git-hub. It's private source , i have already posted in party in : https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/1e278f52-9ecd-411e- b197-6ff70ece06d6/request-kernel-for-irp-irpmnmountvolume?forum=wdk For information : If a external usb storage disk is connected , there is a different behavior. If a external usb storage disk connected : The ioctl IOCTL_DISK_IS_WRITABLE,IOCTL_MEDIA_REMOVAL,IOCTL_STORAGE_QUERY_PROPERTY aren't called by kernel windows (WHEN A STORAGE DISK IS CONNECTED) I posted log and i must simplify "by ..." for avoid Forum Pollution ! When any external usb storagedisk is not connected , here log : The irp IRP_MN_MOUNT_VOLUME is called and it WORK GOOD !!! Number virtual disk already mounted : 0 58:31 IOCTL_STORAGE_GET_HOTPLUG_INFO 58:31 End InternalDeviceiocontrol 58:31 Ioctl unkown :(00074800) (477184) 58:31 End InternalDeviceiocontrol 58:31 Ioctl unkown :(00074800) (477184) 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_IS_WRITABLE 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_MEDIA_REMOVAL 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_GET_HOTPLUG_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_MEDIA_REMOVAL 58:31 End InternalDeviceiocontrol 58:31 IOCTL_VOLUME_GET_GPT_ATTRIBUTES 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_GET_DEVICE_NUMBER 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery StorageDeviceProperty 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery StorageAdapterProperty 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_QUERY_PROPERTY 58:31 PropertyStandardQuery Unknown 58:31 End InternalDeviceiocontrol 58:31 0x4d008|0x2d1190 58:31 End InternalDeviceiocontrol 58:31 0x4d008|0x2d1190 58:31 End InternalDeviceiocontrol 58:31 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 58:31 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-d4e2-2401-550e-916f0206 fb8f}' 58:31 createfile 58:31 cleanupfile 58:31 End InternalDeviceiocontrol .... .... 58:31 Overflow 58:31 closefile 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_LENGTH_INFO 58:31 End InternalDeviceiocontrol 58:31 IOCTL_DISK_GET_DRIVE_GEOMETRY 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_GET_HOTPLUG_INFO 58:31 End InternalDeviceiocontrol 58:31 Ioctl unkown :(00074800) (477184) 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_GET_HOTPLUG_INFO 58:31 End InternalDeviceiocontrol 58:31 Ioctl unkown :(00074800) (477184) 58:31 End InternalDeviceiocontrol 58:31 IOCTL_VOLUME_GET_GPT_ATTRIBUTES 58:31 End InternalDeviceiocontrol 58:31 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 58:31 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-d4e2-2401-550e-916f0206 fb8f}' 58:31 createfile 58:31 cleanupfile 58:31 End InternalDeviceiocontrol ... ... 58:31 closefile 58:31 createfile 58:31 createfile 58:31 ProcVolumeInfo 58:31 cleanupfile 58:31 cleanupfile 58:31 createfile 58:31 ProcVolumeInfo 58:31 cleanupfile 58:31 closefile 58:31 End InternalDeviceiocontrol 58:31 IOCTL_VOLUME_GET_GPT_ATTRIBUTES 58:31 End InternalDeviceiocontrol 58:31 IOCTL_STORAGE_GET_HOTPLUG_INFO 58:31 createfile 58:31 createfile 58:31 ProcVolumeInfo 58:31 cleanupfile 58:31 cleanupfile 58:31 closefile 58:31 closefile Virtual filedisk mounted successly in letter c:\cpourtesterlec1 in ID Device '0' Volume:\DosDevices\Global\Volume{cd4c8bfd-d4e2-2401-550e-916f0206fb8f} 58:31 closefile 58:31 closefile 58:32 createfile 58:32 createfile 58:32 cleanupfile 58:32 closefile 58:32 createfile 58:32 procinfo 58:32 procinfo 58:32 procinfo 58:32 procinfo 58:32 End InternalDeviceiocontrol 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-d4e2-2401-550e-916f0206 fb8f}' 58:32 cleanupfile 58:32 closefile 58:32 createfile 58:32 cleanupfile ... ... ... ... 58:32 createfile 58:32 cleanupfile 58:32 End InternalDeviceiocontrol 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-d4e2-2401-550e-916f0206 fb8f}' 58:32 Overflow 58:32 End InternalDeviceiocontrol 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 58:32 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-d4e2-2401-550e-916f0206 fb8f}' 58:32 Overflow 58:32 closefile 58:32 createfile 58:32 cleanupfile 58:32 closefile When a usb storage disk is connected , here log :(this IRP_MN_MOUNT_VOLUME is not called) The log is behavior ! Different behavior Number virtual disk already mounted : 0 6:42 IOCTL_STORAGE_GET_HOTPLUG_INFO 6:42 End InternalDeviceiocontrol 6:42 Ioctl unkown :(00074800) (477184) 6:42 End InternalDeviceiocontrol 6:42 Ioctl unkown :(00074800) (477184) 6:42 End InternalDeviceiocontrol 6:42 IOCTL_STORAGE_GET_HOTPLUG_INFO 6:42 End InternalDeviceiocontrol 6:42 Ioctl unkown :(00074800) (477184) 6:42 createfile 6:42 End InternalDeviceiocontrol 6:42 IOCTL_DISK_GET_DRIVE_GEOMETRY 6:42 cleanupfile 6:42 End InternalDeviceiocontrol 6:42 IOCTL_DISK_GET_LENGTH_INFO 6:42 End InternalDeviceiocontrol 6:42 IOCTL_VOLUME_GET_GPT_ATTRIBUTES 6:42 End InternalDeviceiocontrol 6:42 IOCTL_STORAGE_GET_HOTPLUG_INFO 6:42 closefile Virtual filedisk mounted successly in letter c:\cpourtesterlec1 in ID Device '0' Volume:\DosDevices\Global\Volume{cd4c8bfd-6242-c39c-550e-916f0206fb8f} 6:43 createfile 6:43 cleanupfile 6:43 closefile 6:43 createfile 6:43 End InternalDeviceiocontrol 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-6242-c39c-550e-916f0206 fb8f}' 6:43 cleanupfile 6:43 closefile 6:43 createfile 6:43 cleanupfile 6:43 End InternalDeviceiocontrol 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-6242-c39c-550e-916f0206 fb8f}' 6:43 Overflow 6:43 End InternalDeviceiocontrol 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-6242-c39c-550e-916f0206 fb8f}' 6:43 Overflow 6:43 closefile 6:43 createfile 6:43 cleanupfile 6:43 End InternalDeviceiocontrol 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-6242-c39c-550e-916f0206 fb8f}' 6:43 Overflow 6:43 End InternalDeviceiocontrol 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 6:43 IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:'\Device\Volume{cd4c8bfd-6242-c39c-550e-916f0206 fb8f}' 6:43 Overflow 6:43 closefile 6:43 createfile 6:43 cleanupfile 6:43 closefile Have you advice for solve this problem ?
  Message 4 of 6  
10 Aug 17 15:37
Sivaller
xxxxxx@gmail.com
Join Date: 13 Jul 2017
Posts To This List: 28
Problem mount disk when i disk usb storage is connected

I tested the ioctl function when don't work : HANDLE fkdd3=CreateFile("\\\\.\\Volume{cd4c8bfd-9061-e06a-550e-916f0206fb8f}",GENERIC_RE AD|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBU TE_NORMAL,NULL); int err=GetLastError(); if (fkdd3!=INVALID_HANDLE_VALUE) { BOOL b; DWORD dt; STORAGE_HOTPLUG_INFO _hotplugInfo={0}; b=DeviceIoControl(fkdd3,IOCTL_STORAGE_GET_HOTPLUG_INFO,NULL,0,&_hotplugInfo,siz eof(_hotplugInfo),&dt,NULL); VOLUME_GET_GPT_ATTRIBUTES_INFORMATION _tvgpt={0}; b=DeviceIoControl(fkdd3,IOCTL_VOLUME_GET_GPT_ATTRIBUTES,NULL,0,&_tvgpt,sizeof (_tvgpt),&dt,NULL); DISK_GEOMETRY _DISK_GEOMETRY={0}; b=DeviceIoControl(fkdd3,IOCTL_DISK_GET_DRIVE_GEOMETRY,NULL,0,&_DISK_GEOMETRY, sizeof(_DISK_GEOMETRY),&dt,NULL); MOUNTDEV_NAME name; //printf("sizeof %d",sizeof (MOUNTDEV_NAME)); b=DeviceIoControl(fkdd3,IOCTL_MOUNTDEV_QUERY_DEVICE_NAME,NULL,0,&name,sizeof (MOUNTDEV_NAME),&dt,NULL); name.Name[name.NameLength>>1]=0; CloseHandle(fkdd3); } It's good for function IOCTL tested , and i don't understand why the IRP_MN_MOUNT_VOLUME is not called when i usb stoage disk usb connected.
  Message 5 of 6  
10 Aug 17 17:13
Sivaller
xxxxxx@gmail.com
Join Date: 13 Jul 2017
Posts To This List: 28
Problem mount disk when i disk usb storage is connected

KeyStoke error: It's good for function IOCTL tested , and i don't understand why the IRP_MN_MOUNT_VOLUME is not called when i usb stoage disk usb connected. It's good for function IOCTL tested , and i don't understand why the IRP_MN_MOUNT_VOLUME is not called when a usb storage disk is connected.
  Message 6 of 6  
10 Aug 17 21:59
Sivaller
xxxxxx@gmail.com
Join Date: 13 Jul 2017
Posts To This List: 28
Problem mount disk when i disk usb storage is connected

Sorry , but my function ioctl function good work and good resultat , i have compared ! So windows have a serious problem ! (bug) There are no foolproof and perfect programs!
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntfsd list to be able to post.

All times are GMT -5. The time now is 07:09.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license