CreateThread的定于如下:
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes
DWORD dwStackSize, // initial thread stack size, in bytes
LPTHREAD_START_ROUTINE lpStartAddress, // pointer to thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // pointer to returned thread identifier
); 现执行如下的代码(delphi)
CreateThread(NIL,0,@ThreadTest,NiL,CREATE_SUSPENDED,Nil);出现错误提示:
[Error] Project1.dpr(26): Types of actual and formal var parameters must be identical请问该怎么解决?
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes
DWORD dwStackSize, // initial thread stack size, in bytes
LPTHREAD_START_ROUTINE lpStartAddress, // pointer to thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // pointer to returned thread identifier
); 现执行如下的代码(delphi)
CreateThread(NIL,0,@ThreadTest,NiL,CREATE_SUSPENDED,Nil);出现错误提示:
[Error] Project1.dpr(26): Types of actual and formal var parameters must be identical请问该怎么解决?
var ThreadId: DWORD;
CreateThread(NIL,0,@ThreadTest,NiL,CREATE_SUSPENDED,ThreadId);
商榷!
还有一个问题,您知道
settimer 允许有事件间隔,但是它只有具有窗体的才能接受Timer事件,如果是进程的就无法接受事件,是这样的吗?有方法解决?
商榷!