News:

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

Main Menu

Square Brackets

Started by shankle, February 08, 2017, 09:59:24 AM

Previous topic - Next topic

shankle


                    2-7-2017
    This about API GetVolumeNameForVolumeMountPoint
   
    ; FileDat  db   'C:\905778d8-3736-424f-be2f-af9dadfad06b',0
    ; FSOutput      db   '                                       ',0
    ; buf5       db '                                                  ',0
    invoke GetVolumeNameForVolumeMountPoint, addr FileDat,\\?\FSOutput{GUID},\
          addr buf5

    No matter where I place the [] I get the same error.
    use Square Brackets to address memory, addr or offset to get address:
    \\?\FSOutput{GUID},addr buf5

Thanks for any help.
   

jj2007

include \masm32\MasmBasic\MasmBasic.inc
SetGlobals FSOutput[80]:BYTE  ; you need a buffer
Init
  invoke GetVolumeNameForVolumeMountPoint, Chr$("C:\"), addr FSOutput, 80
  Inkey addr FSOutput
EndOfCode


Output:
\\?\Volume{17ea7f9c-4021-11e1-bfb3-806e6f6e6963}\

shankle

Thanks for responding JJ.
I was in a hurry and managed to post this in the wrong forum.
It belongs in the GoAsm forum.

jj2007

No problem. In any case, your args #2 and #3 were wrong, as shown in my example.

shankle

#4
It is now working in GoAsm.
No need to move message.
Thanks JJ