Jump to content











Photo
- - - - -

Is there a way to force ImDisk to keep device name?

imdisk.net 1.9.4

  • Please log in to reply
1 reply to this topic

#1 Victor Milovanov

Victor Milovanov

    Newbie

  • Members
  • 15 posts
  •  
    United States

Posted 12 March 2016 - 09:10 AM

Whenever I stop a disk (the same one) and then start it again, it gets new device name:

\Device\ImDisk1

\Device\ImDisk2

etc.

 

I do provide ObjectName parameter to DevioShmService, but it does not seem to be used for this purpose. I want this, because if I had to dismount forcibly, Windows would start spamming NTFS warnings to System events for the forcibly stopped disk, demanding its reconnection. But starting disk again creates new device name, so those warnings never stop until system restart.

 

Is there a way to persist device name?



#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 12 March 2016 - 09:42 AM

ObjectName means the name of the shared memory object that is used for communication between driver and your proxy service. It has nothing to do with the device object names in the kernel.

You can force the driver to use a particular device number by setting the device number parameter when you call the API to create a new device, but there is no way to pass that parameter with StartServiceThreadAndMountImDisk, so you would need to do this in two steps. First StartSerivce and then ImDiskAPI.CreateDevice.

But the problem is still that it would not work. ImDisk will just respond that the device number is already in use. Even if there were a way to use the same name it would not help since the NTFS driver is communicating with the device that you removed and just warns about that it did not get a chance to save everything. NTFS would not simply accept to save this data to another device, even if it has the same device name in the kernel because it uses a pointer directly to the device object it is working with.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users