I can't figure out how to compare the string "NTFS" with what is returned in FileSystemNameBuffer.

I would like to branch whether drive is FAT or NTFS.



invoke GetVolumeInformation,ADDR RootPathName,
                            ADDR VolumeNameBuffer,
                            nVolumeNameSize,
                            ADDR VolumeSerialNumber,
                            ADDR MaximumComponentLength,
                            ADDR FileSystemFlags,
                            ADDR FileSystemNameBuffer, ; FAT or NTFS
                            nFileSystemNameSize

print ADDR FileSystemNameBuffer 

Posted on 2010-09-11 10:56:10 by skywalker
What does FileSystemNameBuffer display?
Posted on 2010-09-11 11:26:11 by JimmyClif
Thanks JimmyClif.

It displays whether file system is Fat, Fat32, or NTFS.

I got it figured out.

mov esi, offset Compare
mov edi, offset FileSystemNameBuffer
mov ecx, SIZEOF Compare
repe cmpsb
je next
Posted on 2010-09-11 11:28:30 by skywalker
skywalker,

repe cmpsb seems to be overkill.


        cmp    dword, 'NTFS'; FASM syntax, MASMers use 'SFTN' ;-)
        jne    NotNTFS
        cmp    byte, 0; to rule out "NTFSucks" ;-)
        je      next
NotNTFS:
Posted on 2010-09-11 12:38:00 by baldr