Virtual Disk Development Kit

 View Only
  • 1.  How to see mounted volume in Windows Explorer?

    Posted Feb 21, 2011 01:01 PM

    Hello All,

    I am new bie to the VDDK stuff, so you may find my question pretty obvious.

    I am using VXMnt API to mount the disk but I don;t see it got mounted as part of Windows Explorer.

    I am able to see the \\.\vstor2-mntapi10-shared-2CB22CB2007E00000000001000000\. I believe this device comes only after successful mount of the volume.

    I also called DoDOSDevice(...) to map this device as drive.
    DoDOSDevice(...) returns successfully and creates drive but I am not able to browse it from Windows Explorer.

    Below are the calls I am making :

    VixMntApi_Init(1, 0, NULL, NULL, NULL, NULL, NULL )
    VixMntApi_OpenDisks( connection, DiskNames, numberOfDisks, VIXDISKLIB_FLAG_OPEN_READ_ONLY, &disksetHandle)

    VixMntApi_GetVolumeHandles(....)
    VixMntApi_MountVolume(...)
    VixMntApi_GetVolumeInfo(...)  ---> Used Symboliclink for DefineDOSDevice
    DoDeviceName(..)

    I changed \\.\vstor2-mntapi10-shared-2CB22CB2007E00000000001000000\
    To
    "\DEVICE\vstor2-mntapi10-shared-2CB22CB2007E00000000001000000"  ---- But no success
    "\\?\GLOBALROOT\\DEVICE\vstor2-mntapi10-shared-2CB22CB2007E00000000001000000"  -- No success.

    Please correct me where I am going wrong. If possible share the sample code.

    Thanks



  • 2.  RE: How to see mounted volume in Windows Explorer?

    Posted Feb 22, 2011 11:37 AM

    Hi,

    You can use DefineDosDevice to let windows explorer open the mounted disk:

    BOOL  fResult = DefineDosDevice(0, "M:", volInfo->symbolicLink);



  • 3.  RE: How to see mounted volume in Windows Explorer?

    Posted Feb 22, 2011 12:41 PM

    I do call

    QueryDosDevice( .... )

    DefineDosDevice ( 0, "P:", SymbolicLink );

    Both the above calls are successful. I do see the drive letter in Windows Explorer but with RED question mark on it. When I click to browse "P:" i get error. Even sometimes Windows Explorer process hangs.

    I used WinObj - SysInternal tool to see P: device but I don;t find there..... am I doing anything wrong.

    I am using Windows XP to run my mount program. I am calling MountVolume function with read-only flag.

    VixDiskLib.dll File Version : 1.2.1 Build 323406

    vixMntApi.dll FileVersion : 7,5,0,180



  • 4.  RE: How to see mounted volume in Windows Explorer?

    Posted Feb 23, 2011 06:08 AM

    Interesting thing is I am able to mount it using Vmware-mount.exe utility but not through Mount API. :smileysad:

    I will really appreciate your inputs..... If you have any sample program, that will be of great help me..... :



  • 5.  RE: How to see mounted volume in Windows Explorer?

    Posted Feb 23, 2011 08:07 AM

    Hi,

    It sounds like the program is prematurely exiting.

    Note that the program is calling MountVolume function must not exit as long as the volume needs to be accessible.

    -Sudarsan



  • 6.  RE: How to see mounted volume in Windows Explorer?

    Posted Feb 23, 2011 09:53 AM

    I ensured that I am not exiting prematurely.

    I am doing below thing :

    1. Call MountVolume  - Result = Successful

    2) Call GetVolumeInfo  to know the Symbolic link : Result = Successful.

    3) Call QueryDosDevice  Result = SucessFull

    4) Call DefineDOSDevice  Result = SuccessFull

    I put a BREAK POINT or MessageBox here so not to exit prematurely.

    Please find the attached source.....



  • 7.  RE: How to see mounted volume in Windows Explorer?
    Best Answer

    Posted Feb 23, 2011 06:03 PM

    Setting a Breakpoint will not work. The program needs to be running to be able to service the IO requests from Windows. I have not seen the attached code, but you may need to restructure your program to continue running as long as there are mounted volumes.

    Thanks

    Sudarsan



  • 8.  RE: How to see mounted volume in Windows Explorer?

    Posted Mar 25, 2013 08:01 PM

    I also face the same issue. Mount & DosDefineDevice are successful. Unable to explore the drive letter through Windows explorer or command line.

    @Sudarsan -- Where can I find the source code for Vmware-mount.exe utility (VDDK sample)? It would be really helpful (for VDDK devs) if you provide the source for this sample utility.



  • 9.  RE: How to see mounted volume in Windows Explorer?

    Posted Mar 25, 2013 08:45 PM

    @RockyConcept

    Did you solve this issue? If so, Can you please explain how?