News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

API GetVolumeNameForVolumeMountPoint

Started by shankle, March 16, 2017, 07:17:44 AM

Previous topic - Next topic

shankle

              3-15-2017
Thanks for any help.

Stats: uefi, windows 7 pro 64-bit, windows updates disabled,
       Goasm language, weekly maintenance, no viruses

This concerns the Microsoft API GetVolumeNameForVolumeMountPoint

FileDat    db   'C:\'
buf6       db '                                                  ',0 ; 50 bytes

   invoke GetVolumeNameForVolumeMountPoint, addr FileDat,addr buf6,50
        mov [hFile],rax
   
       No matter how I code FileDat the function fails. Taking out "addr"
       and inserting [] makes no difference.
       Yes I know about "\\?\Volume{GUID}\" in the 2nd parameter but the
       program fails before it's used.
       I have been on Google and found a reference about the API that says
       it needs to be executed twice to get it to work. The gentleman that
       wrote the article said that microsoft was just trying to get him to
       go away. I got the impression that no answer has been found.
       Neither of my computers use the old BIOS so I can't test if it works
       with the old BIOS.
       It should list the mount point for the Windows C OS.

sinsi

Windows 11 is better :tongue: but 98SE was the bee's knees

jj2007

We had that a few weeks ago: http://masm32.com/board/index.php?topic=5997.0

shankle

Yes JJ,
But I couldn't get it to work in GoAsm.
It seems to work now but I have said that before.

This is what made it work in GOAsm.
FileDate  db 'C:\',0
Thank you Sinsi.
The rules of GoAsm still apply even though the Microsoft
documentation doesn't show it :redface: