The MASM Forum

Miscellaneous => The Orphanage => Topic started by: shankle on February 08, 2017, 09:59:24 AM

Title: Square Brackets
Post by: shankle on February 08, 2017, 09:59:24 AM

                    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.
   
Title: Re: Square Brackets
Post by: jj2007 on February 08, 2017, 10:21:49 AM
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}\
Title: Re: Square Brackets
Post by: shankle on February 08, 2017, 11:25:43 AM
Thanks for responding JJ.
I was in a hurry and managed to post this in the wrong forum.
It belongs in the GoAsm forum.
Title: Re: Square Brackets
Post by: jj2007 on February 08, 2017, 07:52:37 PM
No problem. In any case, your args #2 and #3 were wrong, as shown in my example.
Title: Re: Square Brackets
Post by: shankle on February 09, 2017, 01:23:47 AM
It is now working in GoAsm.
No need to move message.
Thanks JJ