static TIMECAPS sTimeCaps;
...
timeGetDevCaps(&sTimeCaps, sizeof(sTimeCaps));
but when I compile with VS 2005 I get this error:
Error 1 error LNK2019:
unresolved external symbol __imp__timeGetDevCaps@8
referenced in function _WinMain@16 DEMO.obj
Problem solved, I had to manually add winmm.lib to the project
build properties linker additional dependencies.
or simpler still, add this pragma to the source (forgot about this):
#pragma comment(lib, "winmm.lib") /* include winmm.lib */