[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] 批处理调用dll函数的工具_call.exe(2009-06-01)

http://www.dostips.com/forum/viewtopic.php?t=504

Hi all,

I have created handy and portable command line utility that is
able to call dllexported functions:
http://www.2shared.com/file/5485995/4b969d2c/_call.html


弹出一个包含 yes 和 no 按钮的窗口
  1. @echo off
  2. _call user32.dll MessageBoxA -d 0 -s "Yes or No?" -s "Question" -d 36
  3. rem 36 = MB_ICONQUESTION+MB_YESNO
  4. if %errorlevel% == 6 (goto :yes) else (goto :no)
  5. :yes
  6. echo Yes!
  7. pause
  8. exit
  9. :no
  10. echo No!
  11. pause
  12. exit
复制代码
计算两个时间的差值
  1. @echo off
  2. _call kernel32.dll GetTickCount
  3. set /a start=%errorlevel%
  4. set /p name=请输入你的名字:
  5. _call kernel32.dll GetTickCount
  6. set /a end=%errorlevel%
  7. set /a diff=%end%-%start%
  8. echo 你好 %name%,你花了 %diff% 秒钟来输入你的名字。
  9. pause
  10. exit
复制代码
更换桌面壁纸
  1. @echo off
  2. set /p img=请输入需要设置为壁纸的bmp格式图片路径:
  3. _call user32.dll SystemParametersInfoA -d 20 -d 0 -s "%img%" -d 3
  4. pause
  5. exit
复制代码
获取字符串长度
  1. @echo off
  2. set /p str=Type something :
  3. _call msvcrt.dll strlen -s "%str%"
  4. echo String length: %errorlevel% chars
  5. pause
  6. exit
复制代码
===============================以下为原作者2009-04-30更新===============================

Hello again, I'm back with a new release!

New features and fixes:
- It has now support for string pointers (dll out, in/out)
- Support for hex decimals
- Return value can be used as handle to anyting!
-> Three new definition selectors: -s' (str in/out), -s# (str in) and -x (hex decimal)
- Better help screen

Still missing:
- Support for structures (e.g. COORD {X,Y})
- Decimal pointers (app may crash if you try)


可执行文件、实例、更新日志下载

原作者提供的下载地址:http://drop.io/cmd_call
本地下载:http://bcn.bathome.net/s/tool/index.html?key=_call
1

评分人数

我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

回复 2楼 的帖子

你可以到dostips论坛问问原作者,或者我帮你问也行。
^_^
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

Our users have posted a total of 1131 articles
We have 395 registered users
The newest registered user is pusofalse


看到你注册了,你自己问吧,呵呵。
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 8楼 的帖子

7楼那个试了没?
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表