Na ti kod u MASM pa skini MASM32 i kompajliraj !!!
Code:
; Code to change DISPLAY_FREQUENCY from current to 70Hz
; coded by Vojislav Milunovic for www.elitesecurity.org example,
; and for guy/girl who doesn't know how to use copy/past
; compiled with MASM
; asm.bat script used to compile this program
;-----------------------------------------------------------------------
;C:\masm32\bin\ml.exe /c /coff /Cp %1.asm
;C:\masm32\bin\link.exe /SUBSYSTEM:WINDOWS /LIBPATH:C:\masm32\lib %1.obj
;-----------------------------------------------------------------------
; Save file as display.asm and run asm.bat display
; This will create display.exe file; which ,obviously, you can run
.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\kernel32.lib
includelib \masm32\lib\user32.lib
DM_DISPLAYFREQUENCY equ 400000h
main PROTO
.DATA
box db "Yes No",0
suc db "Frequency of display has been change",0
error db "Failed to change frequency",0
.code
_start:
invoke main
invoke ExitProcess, NULL
main PROC
LOCAL DevMode:DEVMODE
; same as ZeroMemory, I don't know why did they change it's name in MASM32 ?!
invoke RtlZeroMemory, ADDR DevMode, sizeof(DEVMODE)
mov DevMode.dmDisplayFrequency,70
mov DevMode.dmFields, DM_DISPLAYFREQUENCY
mov DevMode.dmSize, sizeof(DEVMODE)
invoke ChangeDisplaySettings, ADDR DevMode, 0
.IF eax == DISP_CHANGE_SUCCESSFUL
invoke MessageBox, NULL, addr suc, addr box, MB_OK
.ELSE
invoke MessageBox, NULL, addr error, addr box, MB_OK
.ENDIF
main ENDP
end _start
A u C bi ovo jos jednostavnije izgledalo ali kako nemam C kompajler ovo ce ti biti dosta.