Author Topic: Square Brackets  (Read 1173 times)

shankle

  • Member
  • ****
  • Posts: 797
Square Brackets
« 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.
   

jj2007

  • Member
  • *****
  • Posts: 8773
  • Assembler is fun ;-)
    • MasmBasic
Re: Square Brackets
« Reply #1 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:
Code: [Select]
\\?\Volume{17ea7f9c-4021-11e1-bfb3-806e6f6e6963}\

shankle

  • Member
  • ****
  • Posts: 797
Re: Square Brackets
« Reply #2 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.

jj2007

  • Member
  • *****
  • Posts: 8773
  • Assembler is fun ;-)
    • MasmBasic
Re: Square Brackets
« Reply #3 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.

shankle

  • Member
  • ****
  • Posts: 797
Re: Square Brackets
« Reply #4 on: February 09, 2017, 01:23:47 AM »
It is now working in GoAsm.
No need to move message.
Thanks JJ
« Last Edit: February 09, 2017, 08:06:15 AM by shankle »