PassMark Software

Announcement

Collapse
No announcement yet.

OSFMount ramdisk and GetVolumePathName API call

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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; 05-19-2017, 05:35 AM.

  • #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


    • #3
      Hi
      Originally posted by nuldev View Post
      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...
      X