注意:要用Alt+F4关闭它。
.386 .model flat, stdcall option casemap:none include /masm32/include/windows.inc include /masm32/include/kernel32.inc include /masm32/include/user32.inc includelib /masm32/lib/user32.lib includelib /masm32/lib/kernel32.libDlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD .data g_szWinRAR db "c:/program files/winrar/winrar.exe", 0 g_szDlgCaption db "GETARC", 0g_szFailLoadLibrary db "LoadLibrary", 0 .data? g_hRAR HANDLE ?.code start: invoke LoadLibrary, ADDR g_szWinRAR .if eax!=NULL mov g_hRAR, eax invoke DialogBoxParam, g_hRAR, ADDR g_szDlgCaption, NULL, ADDR DlgProc, NULL invoke FreeLibrary, g_hRAR mov eax, OFFSET g_szDlgCaption .else mov eax , OFFSET g_szFailLoadLibrary .endif invoke MessageBox, NULL, eax, eax, NULL invoke ExitProcess, NULLDlgProc proc hDlg: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM .IF uMsg==WM_INITDIALOG invoke MessageBox, NULL, OFFSET g_szWinRAR, OFFSET g_szWinRAR, MB_SYSTEMMODAL invoke GetWindowLong, hDlg, GWL_STYLE or eax, WS_MINIMIZEBOX or WS_MAXIMIZEBOX or WS_SYSMENU invoke SetWindowLong, hDlg, GWL_STYLE, eax .ELSE invoke DefWindowProc, hDlg, uMsg, wParam, lParam ret .ENDIF mov eax,TRUE ret DlgProc endpend start