Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Polling timer problem!!!

Status
Not open for further replies.

sasit

Technical User
Mar 17, 2003
8
US

Hi, all,

according to MSDN, the createtimerqueue() is available in windows 2000 professional in kernel32.lib. but unresolved when trying to use it. I wanted to try to link kernel32.dll instead, how to tell VC++ to look for kernel32.dll in VC++?

any other polling timer I can use if createtimerqueue is not available?
thanks much


 
Here is an excerpt of code from a file that i use timer queue timers in.

Code:
#if WINVER < 0x0500
/**
	TimerQueueTimer class implementation uses kernel objects
	that are not available before the windows 5 kernel. Place the
	following definitions in your stdafx.h file to remove this warning:

#define _WIN32_WINNT 0x0500
#define WINVER 0x0500

*/
#error TimerQueueTimer.h requires Win32 Kernel 5
#endif
#if 0x0500 > _WIN32_WINNT
#error TimerQueueTimer.h requires Win32 Kernel 5
#endif

hope that helps
-pete
 
Pete,
do you know if function is in kernel32.lib or dll? how to specify to link kernel32.dll in Vc?
thanks
 
Err... I hope that writing createtimerqueue is just out of commodity. (CreateTimerQueue).

What VC are you using? Since the method is supported on win2000, I guess it is not present on the MSVC 6.0 distribution, released in '97. If you have vc7, adding kernel32.lib should be enough, no additional stuff to do.

I use SetTimer whenever I need timers and work with timer IDs. I guess that would help.

Cheers,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Your project should automatically be linking to it. If your using VC 6, you probably need to download the latest version of the Platform SDK since those lib versions did not exist when VC 6 was released.

-pete
 
Hey Pete, do you have a reference for the platform SDK download? I looked for &quot;platform sdk download&quot; on the MS site and found nothing...

Thanks,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Razvan,

try this link
Pete can tell if this is right.

I have vC6 on 2000. that might be the problem? since the kernel32.lib on windows 2000 has the timer, why cannot it work?

is there a utility in windows which can do symbol lookup like &quot;nm&quot; in unix?
thanks
 
>> since the kernel32.lib on windows 2000 has the timer,

Sure you have the kernel32.dll installed in your system folders but you need the updated .lib/.h file(s) in your VC++ environment for building your project.

does that help?

oh, yeah the link is correct.
-pete
 
pete,
which sdk has the related updates? is kernel32.lib in core sdk?
thanks
 
OK ... still a long way to go.
now, have the kernel.lib which has the CreateTimerQueueTimer function, but still Vc could not resolve the symbol when compiling.

How to fix the problem?
 
Have you ever had the Platform SDK installed on your system before? If not, did you follow the instructions for integrating it with your VC++ environment? You can't just put the files on your computer you have to tell your IDE where it is so it can use it yes?

-pete
 
Pete,
what I did was:
1) set the path where the lib is located in vc++ under &quot;build&quot;.
2) add the lib as one of the libraries to load in project setting.
is that right.
thanks
 
I can’t find the locations your referring to:

1) Select Tools/Options from the menu in VC++ IDE
2) On the dialog box that opens select the “Directories” tab.
3) In the combobox labeled “show directories for:” you need to select “Library files”.
4) In the list labeled “Directories” you should have/make an entry that looks something like this:

Repeat this for “Include files” in the combobox.

C:\Program Files\Microsoft Platform SDK\lib

hope that helps
-pete


 
Pete,

the installation of the platform SDK was failed. it was failed right after installation started. any possible reasons? how to know if the CoreSDK is right for Windows 2000 or xp?
thanks
 
>> any possible reasons?

Did you look in the even logs?

-pete
 
the installation was failed with the following
1601: a windows installer error has occured
512: installation failed with one or more errors

any insight?
thanks
 
By now you probably looked that up on google and found several possible reasons for that error. Some sources referenced an &quot;out of disk space&quot; condition and others referenced a general &quot;contact support&quot; message being associated with that error.

Verify you have disk space available and you have the latest Service Packs installed. Then go to technet and research the problem:
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top