;============================================================================================================================================= ; step_21.asm ;Creating LOG file... ; Algorithm ;A1: Create LOG file ;A2: Check if there are errors and show the message if there are ;(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 include setupapi.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\setupapi.lib ;============================================================================================================================================= ; Data segment ;============================================================================================================================================= .data LogFileName db "setup.log",0 Caption db "Zedr0n's step #21",0 Err db "Error while creating a log file",0 ;============================================================================================================================================ ; Variables segment ;============================================================================================================================================ .data? hp HSPFILELOG ? ;============================================================================================================================================= ; Code segment ;============================================================================================================================================= .code start: A1: invoke SetupInitializeFileLog,offset LogFileName,2 mov hp,eax A2: .if hp==INVALID_HANDLE_VALUE invoke MessageBox,NULL,offset Err,offset Caption,MB_OK invoke ExitProcess,NULL .endif invoke ExitProcess,NULL end start