求教,在服务程序中如何阻塞应用程序。

lindex 2004-12-07 08:34:10
就是想在一段时间t内锁定工作站,时间t过后仍然激活应用程序,继续运行系统。
不想用LockWorkStation。因为工作站用户口令为空字符串。
...全文
109 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
danyueer 2004-12-08
  • 打赏
  • 举报
回复
用这两个函数可以阻塞线程的执行,从而达到阻塞进程执行的目的

SuspendThread
The SuspendThread function suspends the specified thread.

DWORD SuspendThread(
HANDLE hThread // handle to thread
);

ResumeThread
The ResumeThread function decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed.

DWORD ResumeThread(
HANDLE hThread // handle to thread
);
qrlvls 2004-12-08
  • 打赏
  • 举报
回复
NX
oyljerry 2004-12-08
  • 打赏
  • 举报
回复
SuspendThread挂起线程,等待,ResumeThread继续
月吻长河 2004-12-08
  • 打赏
  • 举报
回复
用SLEEP()函数吧!
lindex 2004-12-08
  • 打赏
  • 举报
回复
怎么没人理阿。

2,644

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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