473,383 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Timers in DLL & Windows XP

Lak
Hi

I have a regular DLL deriverd from CWinApp that uses a Timer to tick at 10m

SetTimer(NULL,1,10,TimerProc

I developed a windows UI application that works fine. When I created a console app the Timers messages are not posted
Even on Windows XP I have the similar problem

Any pointers will be appreciated

Thanks in advanc
Lakshmi
Jul 21 '05 #1
6 4381
SetTimer can't be used in a console application, SetTimer needs a Windows
Handle (you set it to NULL) and a corresponding windows message pump.

Willy.

"Lak" <an*******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hi

I have a regular DLL deriverd from CWinApp that uses a Timer to tick at
10ms

SetTimer(NULL,1,10,TimerProc)

I developed a windows UI application that works fine. When I created a
console app the Timers messages are not posted.
Even on Windows XP I have the similar problem.

Any pointers will be appreciated.

Thanks in advance
Lakshmi

Jul 21 '05 #2
SetTimer can't be used in a console application, SetTimer needs a Windows
Handle (you set it to NULL) and a corresponding windows message pump.

Willy.

"Lak" <an*******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hi

I have a regular DLL deriverd from CWinApp that uses a Timer to tick at
10ms

SetTimer(NULL,1,10,TimerProc)

I developed a windows UI application that works fine. When I created a
console app the Timers messages are not posted.
Even on Windows XP I have the similar problem.

Any pointers will be appreciated.

Thanks in advance
Lakshmi

Jul 21 '05 #3
http://msdn.microsoft.com/library/de...tion_class.asp

The article states that WinMain calls Run() to start an application's
message loop... Your console App does not have such entry point...

"Lak" <an*******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hi

I have a regular DLL deriverd from CWinApp that uses a Timer to tick at 10ms
SetTimer(NULL,1,10,TimerProc)

I developed a windows UI application that works fine. When I created a console app the Timers messages are not posted. Even on Windows XP I have the similar problem.

Any pointers will be appreciated.

Thanks in advance
Lakshmi

Jul 21 '05 #4
http://msdn.microsoft.com/library/de...tion_class.asp

The article states that WinMain calls Run() to start an application's
message loop... Your console App does not have such entry point...

"Lak" <an*******@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hi

I have a regular DLL deriverd from CWinApp that uses a Timer to tick at 10ms
SetTimer(NULL,1,10,TimerProc)

I developed a windows UI application that works fine. When I created a console app the Timers messages are not posted. Even on Windows XP I have the similar problem.

Any pointers will be appreciated.

Thanks in advance
Lakshmi

Jul 21 '05 #5
Lak
Can I use any other options to get the timer tick, So that the DLL can be used with a console application. Also I have the timer event not generated in Windows XP. Any ideas

Thank
Lakshmi
Jul 21 '05 #6
Lak
Can I use any other options to get the timer tick, So that the DLL can be used with a console application. Also I have the timer event not generated in Windows XP. Any ideas

Thank
Lakshmi
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rajesh Abraham | last post by:
I am looking to use Timers in my Windows Service application and just realised that apart from the forms Timer, there is also System.Threading,Timer and System.Timers.Timer. When should I prefer...
3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
5
by: Michael C# | last post by:
Hi all, I set up a System.Timers.Time in my app. The code basically just updates the screen, but since the processing performed is so CPU-intensive, I wanted to make sure it gets updated...
6
by: Lak | last post by:
Hi I have a regular DLL deriverd from CWinApp that uses a Timer to tick at 10m SetTimer(NULL,1,10,TimerProc I developed a windows UI application that works fine. When I created a console app...
4
by: Dave | last post by:
MS Virtual Server 2005 (not R2) with .Net 2003 I created a Console App and A windows form both with Timers in it. For the console i used system.timers and the windows form i used...
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
5
by: Tony Gravagno | last post by:
I have a class that instantiates two Timer objects that fire at different intervals. My class can be instantiated within a Windows Form or from a Windows Service. Actions performed by one of the...
1
by: roheetbakshi | last post by:
i want to use statusstrip, Progressbar,timers in my windows application but for some reason i am not being able to use these so i need help , can any one help me by giving the code for how to...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.