I am trying to port my SIP library to the Win64 platform. This library
uses timeSetEvent() in order to periodically send RTP packets over
udp.I know that this function is obsolete however it still works fine
with Win32.
When trying to compile for Win64 the declaration of this function
cannot be found in any header file.
I am using BCB 10.2.1
Thanks for any direction

I tried to inlude directly both headers: mmsystem.h and timeapi.h. And
te compiler still complains timeSetEvent() function not found.
I'm afraid some of #defines might prevent the declaration to be visible.

I tried to inlude directly both headers: mmsystem.h and timeapi.h. And
the compiler still complains timeSetEvent() function not found.
I'm afraid some of #defines might prevent the declaration to be
visible.

I tried to inlude directly both headers: mmsystem.h and timeapi.h.
And the compiler still complains timeSetEvent() function not found.
I'm afraid some of #defines might prevent the declaration to be
visible.

I tried to inlude directly both headers: mmsystem.h and timeapi.h.
And the compiler still complains timeSetEvent() function not
found. I'm afraid some of #defines might prevent the declaration
to be visible.

timeSetEvent() is declared in mmsystem.h on my system. It is also
wrapped in '#ifndef MMNOTIMER', so make sure MMNOTIMER is not being
defined.

I have BCB 10.2.1 and RAD2007. In 10.2.1 the only header file
containing the function name is mmiscapi2.h and I cant see here any
suspicious #define. It curious that i didnt find the declaration in any
of .hpp files although mmsystem.pas contains timeSetEvent() declaration
as an external function. In RAD2007 the declaration is as Remy said
inside mmsystem.h. But RAD is nt my IDE as I compile for Win64

I tried to inlude directly both headers: mmsystem.h and timeapi.h.
And the compiler still complains timeSetEvent() function not
found. I'm afraid some of #defines might prevent the declaration
to be visible.

timeSetEvent() is declared in mmsystem.h on my system. It is also
wrapped in '#ifndef MMNOTIMER', so make sure MMNOTIMER is not being
defined.

Ok, I solved it. C++ 64 bit compiler is very strict. The error message
was a bit misleading to me: no matching function for call to
timeSetEvent. Problem was that my callback function should be
explicittly casted to (LPTIMECALLBACK). That solved the problem.
Thanks for assistance.

Problem was that my callback function should be explicittly casted
to (LPTIMECALLBACK). That solved the problem.

If you have to cast your callback, you declared it wrong to begin
with. Fix the declaration, then a cast will not be needed.

Yes, thats correct.
There were some DWORD args in my declaration and they should be
DWORD_PTR. It didnt change since RAD2007, so for win32 compiler there
was no difference but for win64 it was. And that is pretty clear for me
why.