估计是OS的版本问题:MSDN中的描述:
Windows NT: Requires version 4.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Windows NT: Requires version 4.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
谢谢。
[email protected]
在.H文件中
HANDLE WINAPI CreateWaitableTimerA(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
BOOL bManualReset,
LPCSTR lpTimerName );
在.CPP文件中
HANDLE WINAPI CreateWaitableTimerA(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
BOOL bManualReset,
LPCSTR lpTimerName );
{
加入你自己的代码。
}
这类函数是给系统调用的,只要你自己声明和实现一下,系统就回自己找到。
声明和实现CreateWaitableTimer() 不是CreateWaitableTimerA(),
#define _WIN32_WINNT 0x0400
然后在.cpp中先于windows.h包含即可。
OK!
谢谢大家的参与!