flat assembler
Message board for the users of flat assembler.

Index > Windows > SetTimer problem

Author
Thread Post new topic Reply to topic
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
The TimerProc does not get called as expected. Why? Anyone? Plz.
Code:
include 'win32axp'

.data
id dd 0
tick dd 0

.code
proc TimerProc hwnd, uMsg, idEvent, dwTime
mov eax,[idEvent]
 .if eax = id
                inc [tick]
          cinvoke printf, <"Timer tick -- %u",10>, [tick]
        .endif
ret
endp

proc main
   invoke SetTimer, 0, 0, 1000, TimerProc
        mov [id], eax
     if ~eax

         cinvoke puts, "Failed."
                cinvoke exit, 1
        .endif

  cinvoke printf, "Press ENTER to EXIT. "
        cinvoke getchar

        invoke KillTimer, 0, [id]

        cinvoke exit, 1
endp

.end main
    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 08 Aug 2007, 08:54
View user's profile Send private message Reply with quote
Yardman



Joined: 12 Apr 2005
Posts: 245
Location: US
Yardman
[ Post removed by author. ]


Last edited by Yardman on 04 Apr 2012, 02:26; edited 1 time in total
Post 08 Aug 2007, 19:15
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Yardman, thank you soooo very much! Smile

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 09 Aug 2007, 05:28
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.