能力有限,实在没有办法,如何开辟多个线程,真切的希望高手解答。

orablue 2003-06-16 12:34:23
在TIMER里面没10秒开辟一个线程,去执行它的任务,然后自己注销掉。
我以前没有写过这种程序,对线程也不是太了解。
而且不要与主线程同步,不然TIMER会在那个时候停止计时。

...全文
34 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
firetoucher 2003-06-16
  • 打赏
  • 举报
回复
用CreateThread新建并关联你的线程函数
The CreateThread function creates a thread to execute within the virtual address space of the calling process.

To create a thread that runs in the virtual address space of another process, use the CreateRemoteThread function.

HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // SD
SIZE_T dwStackSize, // initial stack size
LPTHREAD_START_ROUTINE lpStartAddress, // thread function
LPVOID lpParameter, // thread argument
DWORD dwCreationFlags, // creation option
LPDWORD lpThreadId // thread identifier
);
orablue 2003-06-16
  • 打赏
  • 举报
回复
firetoucher(风焱) :
可以详细些吗?小弟对这个不是太熟悉啊。

2,507

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧