OSFMount ramdisk and GetVolumePathName API call

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nuldev
    Newbie
    • May 2017
    • 1

    #1

    OSFMount ramdisk and GetVolumePathName API call

    I've created a ramdisk using OSFMount 1.5.1015.0 on drive letter R:
    osfmount.com -a -t vm -f D:\Ramdisk_1G.img -m R: -o rw

    The Win32 API call GetVolumePathName behaves strange:
    Called with "R:" as input it fails with ERROR_INVALID_FUNCTION.
    Called with "R:\My Folder" as input it succeeds but returns "R:\My Folder" as result where it should be "R:".

    GetVolumePathName is essential to determine the right path for calling GetVolumeInformation.
    Last edited by nuldev; May-19-2017, 05:35 AM.
  • David (PassMark)
    Administrator
    • Jan 2003
    • 11092

    #2
    It isn't a question that has come up before and isn't something we have attempted ourselves. So we don't know the answer.
    OSFMount is a free tool, so technical support is limited. But if it is a critical issue for you please contact us about paid support options.

    Comment

    • lauzona
      Member
      • Apr 2015
      • 26

      #3
      Hi
      Originally posted by nuldev
      I've created a ramdisk using OSFMount 1.5.1015.0 on drive letter R:
      osfmount.com -a -t vm -f D:\Ramdisk_1G.img -m R: -o rw

      The Win32 API call GetVolumePathName behaves strange:
      Called with "R:" as input it fails with ERROR_INVALID_FUNCTION.
      Called with "R:\My Folder" as input it succeeds but returns "R:\My Folder" as result where it should be "R:".

      GetVolumePathName is essential to determine the right path for calling GetVolumeInformation.
      as i know that feature only worlks if there is a Volume identifier like all "Real" Volumes have one
      try GetFullPathname than you get what you want:

      https://msdn.microsoft.com/de-de/lib...(v=vs.85).aspx

      best

      Andre

      Comment

      Working...