找回密码
 加入
搜索
查看: 5206|回复: 13

[系统综合] [已解决]请教我将这个API转成AU3错在哪里,谢谢

 火.. [复制链接]
发表于 2010-9-6 00:12:51 | 显示全部楼层 |阅读模式
本帖最后由 itljl 于 2010-9-6 16:44 编辑

$var = DllCall ( "kernel32.dll", "Long", "lpdwLevel" , "long",0)
MsgBox(0,"提示",$var)

根据百度里的API来转的

SetProcessShutdownParameters   VB声明   Declare Function SetProcessShutdownParameters Lib "kernel32" Alias "SetProcessShutdownParameters" (ByVal dwLevel As Long, ByVal dwFlags As Long) As Long   说明   在系统关闭期间,为指定进程设置他相对于其它程序的关闭顺序   返回值   Long,非零表示成功,零表示失败。   参数表   参数 类型及说明   lpdwLevel Long,从0到&H4FF的一个值。编号越高程序在系统关闭时越早关闭。   lpdwFlags Long,指定SHUTDOWN_NORETRY标志。如关闭一个进程时,会出现一个重试对话框。通过设置这个标志,就可以禁止那个对话框出现,并直接关闭进程   适用平台   Windows NT

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2010-9-6 01:19:53 | 显示全部楼层
#include 'array.au3'

$var = DllCall ( "kernel32.dll", "Long", "SetProcessShutdownParameters" , "long", 0, 'long', 0)
_ArrayDisplay($var)

api是SetProcessShutdownParameters不是lpdwLevel
http://baike.baidu.com/view/1286893.htm?fr=ala0_1

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-9-6 01:35:57 | 显示全部楼层
回复 2# 破帽遮颜


谢谢,再次 请教一下,其中"在系统关闭期间,为指定进程设置他相对于其它程序的关闭顺序" 这里似乎没有体现出要为哪一个进程设置优先级啊。假设为au3自身设置呢?
发表于 2010-9-6 02:00:09 | 显示全部楼层
回复 3# itljl

这个我也不清楚哦~好像没~等大侠才清楚~呵呵
发表于 2010-9-6 06:01:10 | 显示全部楼层
回复 3# itljl

MSDN上已经有说了:
Sets shutdown parameters for the currently calling process. This function sets a shutdown order for a process relative to the other processes in the system.

评分

参与人数 1金钱 +15 收起 理由
afan + 15

查看全部评分

发表于 2010-9-6 08:36:09 | 显示全部楼层
看MSDN中的这个函数的说明:
Sets shutdown parameters for the currently calling process. This function sets a shutdown order for a process relative to the other processes in the system.

dwLevel [in]
The shutdown priority for a process relative to other processes in the system. The system shuts down processes from high dwLevel values to low. The highest and lowest shutdown priorities are reserved for system components. This parameter must be in the following range of values.

Value Meaning
000-0FF System reserved last shutdown range.

100-1FF Application reserved last shutdown range.

200-2FF Application reserved "in between" shutdown range.

300-3FF Application reserved first shutdown range.

400-4FF System reserved first shutdown range.


我的理解:这里应该是说,设置当前调用这个函数的进程,相对于其他系统中的进程的关机级别(比如设置为0x00-0xff值,当前进程在系统关机中,处于最后被关闭的范围,值越低,关机就越处在最后)

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-9-6 09:32:30 | 显示全部楼层
谢谢各位大侠
 楼主| 发表于 2010-9-6 15:53:06 | 显示全部楼层
回复 7# 6678720


    要谢也应该是我谢啊,你。。
发表于 2010-9-6 16:13:36 | 显示全部楼层
Gan 标题居然改成了“已解放”
 楼主| 发表于 2010-9-6 16:44:32 | 显示全部楼层
回复 9# afan


    Sorry,我天天都在想着解放 -_-!!
发表于 2010-9-7 22:17:06 | 显示全部楼层
9楼第2亮点··呵呵
我刚入门,看不懂,只能旁观看高手过招了
发表于 2010-9-8 14:46:37 | 显示全部楼层
初学AU3,进来学习一下。谢谢
发表于 2010-9-8 14:47:31 | 显示全部楼层
进来学习一下。
发表于 2010-9-12 13:32:08 | 显示全部楼层
旁观看高手过招
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-1 07:42 , Processed in 0.095857 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表