找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 31935|回复: 6

[转贴] DynamicWrapperX for Windows10 x64

[复制链接]
发表于 2017-10-17 22:39:38 | 显示全部楼层 |阅读模式
例子是官网的例子,本人做了 x64 兼容修改。
提示:没有安装过 DynamicWrapperX 的,先执行 附件中的 DynamicWrapperX_Make.vbs。

  1. DynamicWrapperX.7z 文件说明:
  2. .\dynwrapx1_00_eng.zip                        --官网已挂?原文件及示例文件在这里。
  3. .\DynamicWrapperX_Make.vbs                --首次使用 DynamicWrapperX ,自动注册,可在 x86/x64 系统中使用。
  4. .\DynamicWrapperX_Init-WinList.vbs       --列出 Windows 所有窗口标题
  5. .\Beep.vbs                                            --调用主板嗡鸣器发出声音
  6. .\Hello.vbs                                            --简单对话框 Windows API MessageBoxW()
复制代码
示例:DynamicWrapperX_Make.vbs
  1. '************************************************************************
  2. 'Main
  3. '************************************************************************
  4. Sub Main()
  5.        
  6.         If Not DynamicWrapperX_Init() Then Exit Sub
  7.        
  8.         Msgbox "DynamicWrapperX_Init() = OK"
  9.        
  10.         Set DX = CreateObject("DynamicWrapperX")

  11.         DX.Register "user32", "EnumWindows",    "i=pl"
  12.         DX.Register "user32", "GetWindowTextW", "i=hWl"     ' Unicode variant.
  13.         ' DX.Register "user32", "GetWindowText", "i=hSl"    ' ANSI variant.

  14.         Set Ref = GetRef("CbkEnumWin")  ' Get a reference to the function.

  15.         pCbkFunc = DX.RegisterCallback(Ref, "i=hl", "r=l")  ' Register CbkEnumWin
  16.                                                                                                                 ' as a callback procedure
  17.                                                                                                                 ' and get its pointer.
  18.         n = 0 : m = 0 : WinList = ""
  19.         Title = Space(256)              ' Buffer for the window titles (an output string).

  20.         DX.EnumWindows pCbkFunc, 0      ' Call EnumWindows and pass it the pointer
  21.                                                                         ' to the callback procedure.      

  22.         WScript.Echo "Windows in total: " & m & vbCrLf & "With a title: " & n & _
  23.                                   vbCrLf & vbCrLf & WinList
  24.        
  25. End Sub

  26. '************************************************************************
  27. 'The callback function itself
  28. '************************************************************************
  29. Function CbkEnumWin(ByVal hwnd, ByVal lparam)
  30.        
  31.         DX.GetWindowTextW hwnd, Title, 256
  32.         ' DX.GetWindowText hwnd, Title, 256   ' ANSI variant.
  33.         If Len(Title) > 0 Then  ' Add the title to the list if its length is greater than 0.
  34.                 WinList = WinList & hwnd & vbTab & Title & vbCrLf
  35.                 n = n + 1
  36.         End If
  37.         m = m + 1
  38.         CbkEnumWin = 1          ' Returning 0 will stop the calls.
  39. End Function
复制代码
结果如下:
  1. ---------------------------
  2. Windows Script Host
  3. ---------------------------
  4. Windows in total: 464
  5. With a title: 232

  6. 197348        CandidateWindow
  7. 1116542        f.lux note
  8. 393324        f.lux note
  9. 526706        Mode Indicator
  10. 200264        Mode Indicator
  11. 329256        百度云
  12. 68284        TeamViewer Panel (最小化)
  13. 68282        TeamViewer Panel
  14. 68186        item
  15. 198658        pallas
  16. 198654        pallas
  17. 395326        pallas_mk
  18. 66152        电池指示器
  19. 66232        Network Flyout
  20. 196988        dummyLayeredWnd
  21. 67028        DivX Update
  22. 66630        桌面歌词
  23. 67322        Mode Indicator
  24. 197434        Mode Indicator
  25. 330582        Mode Indicator
  26. 67452        CandidateWindow
  27. 527208        Mode Indicator
  28. 657950        CandidateWindow
  29. 67874        Mode Indicator
  30. 2296658        Mode Indicator
  31. 1182228        Mode Indicator
  32. 131922        Mode Indicator
  33. 134680        Mode Indicator
  34. 3476026        R:\DynamicWrapperX
  35. 263772        VBS原创&转载 - 批处理之家 批处理_BAT_CMD_DOS_VBS_Perl_Python_PowerShell - Powered by Discuz! - Google Chrome
  36. 197180        f.lux: Warm at sunset, with a candle before bed
  37. 265792        R:\DynamicWrapperX.7z\DynamicWrapperX\
  38. 592728        无标题 - 记事本
  39. 1247808        转至
  40. 41551982        替换
  41. 656466        C:\Users\Yu2n\Desktop\base64utf8.vbs - Notepad++
  42. 132724        工具栏选项
  43. 67402        Project Window Insert
  44. 67404        Project Window Insert
  45. 67406        Project Window Insert
  46. 67408        Project Window Insert
  47. 67396        Code Window
  48. 67398        Code Window
  49. 67400        Code Window
  50. 67332        Microsoft Visual Basic - Book1
  51. 199640        任务管理器
  52. 68318        YU2N-DEV - TeamViewer - 免费许可证(仅非商业用途)
  53. 656496        G
  54. 134778        G
  55. 66104        计算机和联系人
  56. 65904        TeamViewer
  57. 131268        TeamViewer - 文件传输事件日志
  58. 395870        应用商店
  59. 132008        Groove 音乐
  60. 197486        Groove 音乐
  61. 132062        照片
  62. 394142        照片
  63. 132050        电影和电视
  64. 264854        电影和电视
  65. 68270        应用商店
  66. 395238        d:\game\英雄联盟\leagueclient\.\GameLoader.exe::GAMELOADER
  67. 133266        进度
  68. 723080        G
  69. 788356        TCLS_CORE_WND_08584278
  70. 655964        TCLS_CORE_WND_79840640
  71. 460900        tgp_login
  72. 395152        tgp_login
  73. 918870        ClassName531937
  74. 329780        TCLS_CORE_WND_562310784
  75. 198790        _TGP_SERVER_DIR_WND_NAME_
  76. 198600        tgp_cross_mgs_wnd_19322F30-BAF4-49E3-8BE7-6B39B3A674A6
  77. 67560        HIDE
  78. 67516        ClassName511843
  79. 133014        TCLS_CORE_WND_10746792
  80. 67512        G
  81. 67508        TGP-BS-CALLBACK-WINDOW-4741AA4C
  82. 67506        TGP_TRAYICON_NEW
  83. 67504        TCLS_CORE_WND_10223212
  84. 67502        TGP_RES_MGR_Window
  85. 67498        _TCLS_CORE_APP_WND_NAME_
  86. 133016        TCLS_CORE_WND_53691080
  87. 198540        TGP_EXTERNAL_MESSAGE_RECEIVER
  88. 198538        _TGP_MAIN_WINDOW_WND_NAME_
  89. 264070        TCLS_CORE_WND_53891488
  90. 133020        tgp_login
  91. 67346        属性
  92. 67190        Microsoft Excel - Book1
  93. 67292        DDE Server Window
  94. 131976        AXWIN Frame Window
  95. 328620        多玩英雄联盟盒子
  96. 394036        G
  97. 196696        MediaEspresso DeviceDetector
  98. 394566        G
  99. 67092        向日葵客户端
  100. 67100        OrayShadow
  101. 67084        oray
  102. 196726        G
  103. 67046        Advanced Controls: WOW(R) HD
  104. 66908        SRS Audio Sandbox
  105. 67040        DivXUpdate
  106. 67020        Updater Error
  107. 67008        DivX Update
  108. 132526        DivXIPCWindowName
  109. 66692        dummyLayeredWnd
  110. 66890        NetWorx (所有以太网连接)
  111. 131622        设置
  112. 132196        欢迎使用百度网盘
  113. 66622        Mode Indicator
  114. 262904        传奇 - 李健
  115. 131260        迷你播放器
  116. 131528        传奇 - 李健
  117. 66574        G
  118. 66552        G
  119. 66334        DDE Server Window
  120. 131846        EVERYTHING_SERVICE_CLIENT
  121. 131130        SecHealthHost
  122. 66254        Windows Shell Experience 主机
  123. 66252        MS_WebcheckMonitor
  124. 66148        DDE Server Window
  125. 65902        DDE Server Window
  126. 196724        BluetoothNotificationAreaIconWindowClass
  127. 65750        The Event Manager - Status
  128. 65752        HotKey Listener
  129. 65714        TVMainThreadCall
  130. 65676        Windows Push Notifications Platform
  131. 65672        G
  132. 196636        Task Host Window
  133. 65602        DWM Notification Window
  134. 65740        igfxtrayWindow
  135. 67212        GDI+ Window
  136. 67574        WeGame
  137. 329252        欢迎使用百度网盘
  138. 65868        Program Manager
  139. 134074        MSCTFIME UI
  140. 66026        Default IME
  141. 67186        MSCTFIME UI
  142. 65892        Default IME
  143. 197334        MSCTFIME UI
  144. 131448        Default IME
  145. 65858        MSCTFIME UI
  146. 65738        Default IME
  147. 525054        MSCTFIME UI
  148. 133074        Default IME
  149. 66208        Default IME
  150. 199290        MSCTFIME UI
  151. 88148410        Default IME
  152. 1052172        Default IME
  153. 132674        MSCTFIME UI
  154. 197504        Default IME
  155. 7473982        MSCTFIME UI
  156. 60886442        Default IME
  157. 134708        Default IME
  158. 133516        Default IME
  159. 65882        MSCTFIME UI
  160. 65700        Default IME
  161. 1641008        MSCTFIME UI
  162. 658252        Default IME
  163. 67744        MSCTFIME UI
  164. 788512        Default IME
  165. 67276        MSCTFIME UI
  166. 67194        Default IME
  167. 134128        MSCTFIME UI
  168. 68588        Default IME
  169. 66064        MSCTFIME UI
  170. 65716        Default IME
  171. 395366        Default IME
  172. 526460        Default IME
  173. 134782        Default IME
  174. 68618        Default IME
  175. 591844        Default IME
  176. 132044        Default IME
  177. 197554        Default IME
  178. 131966        Default IME
  179. 132058        Default IME
  180. 197612        Default IME
  181. 132042        Default IME
  182. 133796        Default IME
  183. 68272        Default IME
  184. 68250        Default IME
  185. 328806        MSCTFIME UI
  186. 197932        Default IME
  187. 132258        Default IME
  188. 198754        MSCTFIME UI
  189. 198700        Default IME
  190. 329664        Default IME
  191. 395232        Default IME
  192. 67562        Default IME
  193. 67514        Default IME
  194. 67510        Default IME
  195. 67500        Default IME
  196. 394578        MSCTFIME UI
  197. 197122        Default IME
  198. 262974        Default IME
  199. 132026        MSCTFIME UI
  200. 328514        Default IME
  201. 263750        Default IME
  202. 132662        Default IME
  203. 132030        Default IME
  204. 263036        Default IME
  205. 197192        Default IME
  206. 67098        MSCTFIME UI
  207. 67086        Default IME
  208. 67082        Default IME
  209. 67036        MSCTFIME UI
  210. 66912        Default IME
  211. 67010        Default IME
  212. 66992        Default IME
  213. 66896        MSCTFIME UI
  214. 131184        Default IME
  215. 197726        Default IME
  216. 66568        MSCTFIME UI
  217. 262234        Default IME
  218. 66576        Default IME
  219. 66554        Default IME
  220. 131864        Default IME
  221. 131848        Default IME
  222. 131844        Default IME
  223. 131136        Default IME
  224. 66256        Default IME
  225. 66218        Default IME
  226. 66150        Default IME
  227. 65864        Default IME
  228. 65846        MSCTFIME UI
  229. 65844        MSCTFIME UI
  230. 65754        Default IME
  231. 65756        Default IME
  232. 65678        Default IME
  233. 65674        Default IME
  234. 67536        MSCTFIME UI
  235. 133018        Default IME
  236. 66682        MSCTFIME UI
  237. 66616        Default IME

  238. ---------------------------
  239. 确定   
  240. ---------------------------
复制代码

评分

参与人数 3技术 +3 收起 理由
codegay + 1 1
老刘 + 1 Get
CrLf + 1 棒棒哒

查看全部评分

发表于 2018-1-4 14:52:40 | 显示全部楼层
楼主发的是1.0版本的,这货最新的有2.1版了,分32/64两个版本,但是作者原来的页面打不开了。
找了一下在国外某论坛找到了一个:
http://omen999.developpez.com/tutoriels/vbs/dynawrapperx-v2-1/
页面最下方有个下载地址。

评分

参与人数 1技术 +1 收起 理由
codegay + 1 1

查看全部评分

发表于 2018-1-5 10:25:37 | 显示全部楼层


贴下介绍嘛。


DynamicWrapperX is an ActiveX component that you can use in scripts (JScript, VBScript, etc) to call:
functions exported by DLL libraries (in particular Windows API functions) (>>);
any functions whose address in memory you know (>>);
functions whose machine code (in the form of a hex string) you have (>>).


You also can:
call a script function from an external function (callback) (>>);
read and write numbers from/to memory directly (>>);
read and write strings in arbitrary encoding (>>);
allocate and free memory (>>);
copy the content of one memory block to another (>>);
read memory into a hex string and write data from a hex string to memory (>>);
get a pointer to a string, object, array, or variable (>>);
get an object by a pointer to it (>>);
find out the bitness (32 or 64) of the process your script is running in (>>).
发表于 2020-12-14 12:20:17 | 显示全部楼层
学习学习,谢谢分享!
发表于 2020-12-14 17:08:17 | 显示全部楼层
回复 2# cfwyy77_bat

感谢你的分享,收获良多!可惜网页是法语,看得很辛苦,不过介绍的确实挺全面的。
发表于 2020-12-14 17:39:40 | 显示全部楼层
感谢楼主的分享,原来楼主的资料里面有中文说明DynamicWrapperX。
发表于 2022-4-6 23:10:58 | 显示全部楼层
在哪下载呀
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 06:28 , Processed in 0.025889 second(s), 9 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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