;本文改编自masm32v10的一个程序。
;相关的api资料在windows的win32.hlp里面没有找到。
;相关的api资料在windows的win32.hlp里面没有找到。
;功能类似与下面的两条命令:
;driverquery /v
;wmic sysdriver list full
;不足之处,敬请指导。
;QQ;112426112
;Email:leguanyuan@126.com
;Homepage:http://correy.webs.com
;wmic sysdriver list full
;不足之处,敬请指导。
;QQ;112426112
;Email:leguanyuan@126.com
;Homepage:http://correy.webs.com
.386
.model flat,stdcall
option casemap:none
include kernel32.inc
includelib kernel32.lib
include psapi.inc
includelib psapi.lib
include kernel32.inc
includelib kernel32.lib
include psapi.inc
includelib psapi.lib
.data
correy db "made by correy",0
entry db 13,10
outtitle db "按回车键退出!",0
correy db "made by correy",0
entry db 13,10
outtitle db "按回车键退出!",0
.data?
paths db 512 dup (?)
x dd ?
buffer db 512 dup (?)
hstdin dd ?
hstdout dd ?
paths db 512 dup (?)
x dd ?
buffer db 512 dup (?)
hstdin dd ?
hstdout dd ?
.code
start:
invoke GetStdHandle,-10
mov hstdin,eax
invoke GetStdHandle,-11
mov hstdout,eax
invoke EnumDeviceDrivers,0,0,ADDR x
invoke EnumDeviceDrivers,addr paths,x,ADDR x
shr x, 2
lea esi,paths
again:
invoke GetDeviceDriverFileName,[esi],addr buffer,512
invoke lstrlen,addr buffer
invoke WriteFile,hstdout,addr buffer,eax,0,0
invoke WriteFile,hstdout,addr entry,2,0,0
add esi, 4
sub x, 1
cmp x,0
jne again
invoke WriteFile,hstdout,addr outtitle,sizeof outtitle,0,0
invoke ReadFile,hstdin,addr buffer,sizeof buffer,addr x,0
ret
end start
;made at 2010.09.09
start:
invoke GetStdHandle,-10
mov hstdin,eax
invoke GetStdHandle,-11
mov hstdout,eax
invoke EnumDeviceDrivers,0,0,ADDR x
invoke EnumDeviceDrivers,addr paths,x,ADDR x
shr x, 2
lea esi,paths
again:
invoke GetDeviceDriverFileName,[esi],addr buffer,512
invoke lstrlen,addr buffer
invoke WriteFile,hstdout,addr buffer,eax,0,0
invoke WriteFile,hstdout,addr entry,2,0,0
add esi, 4
sub x, 1
cmp x,0
jne again
invoke WriteFile,hstdout,addr outtitle,sizeof outtitle,0,0
invoke ReadFile,hstdin,addr buffer,sizeof buffer,addr x,0
ret
end start
;made at 2010.09.09
没有评论:
发表评论