论坛: 编程破解 标题: 求教VB中设置程序启动后在windows中的优先级的问题!!! 复制本贴地址    
作者: wanchaohh [wanchaohh]    论坛用户   登录
问题是这样的:在vb中编写了一个程序,但是这个程序需要的在windows里面启动后占用比较高的优先级,这样就需要在程序 编写的时候设置好这个程序的优先级,这样在转换为.exe文件后,在windows启动后立刻占据cpu比较高的优先级。
我想请问一下大家在vb里面可以这样设置吗?请各位给个字是答案我吧,好困惑阿!谢谢


地主 发表时间: 05-12-09 17:25

回复: jhkdiy [jhkdiy]   版主   登录
使用API函数:SetPriorityClass
The SetPriorityClass function sets the priority class for the specified process. This value together with the priority value of each thread of the process determines each thread's base priority level.

BOOL SetPriorityClass(
  HANDLE hProcess,        // handle to process
  DWORD dwPriorityClass  // priority class
);


B1层 发表时间: 06-01-01 14:32

论坛: 编程破解

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号