;============================================================================================================================================= ; step_11.asm ;What type of the disk you are working on? Hard disk, or, perhaps, floppy? ; Algorithm ;A1: Get the drive type of C:\ ;(C)I don't take any responsibility for the use of this program ; Zedr0n -- connection closed ;============================================================================================================================================= ;============================================================================================================================================= ; Options/Declarations ;============================================================================================================================================= .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib ;============================================================================================================================================= ; Data segment ;============================================================================================================================================= .data RootPath db "C:\\",0 Text db "Drive C: isn't CDROM",0 Caption db "Zedr0n's step #11",0 ;============================================================================================================================================ ; Variables segment ;============================================================================================================================================ .data? hType HANDLE ? ;============================================================================================================================================= ; Code segment ;============================================================================================================================================= .code start: A1: invoke GetDriveType,offset RootPath mov eax,hType .if hType!=DRIVE_CDROM invoke MessageBox,NULL,offset Text,offset Caption,MB_OK .endif invoke ExitProcess,NULL end start