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.
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
What does FileSystemNameBuffer display?
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
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
skywalker,
repe cmpsb seems to be overkill.
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: