返回列表 发帖

[转贴] DynamicWrapperX for Windows10 x64

例子是官网的例子,本人做了 x64 兼容修改。
提示:没有安装过 DynamicWrapperX 的,先执行 附件中的 DynamicWrapperX_Make.vbs。
DynamicWrapperX.7z 文件说明:
.\dynwrapx1_00_eng.zip                        --官网已挂?原文件及示例文件在这里。
.\DynamicWrapperX_Make.vbs                --首次使用 DynamicWrapperX ,自动注册,可在 x86/x64 系统中使用。
.\DynamicWrapperX_Init-WinList.vbs       --列出 Windows 所有窗口标题
.\Beep.vbs                                            --调用主板嗡鸣器发出声音
.\Hello.vbs                                            --简单对话框 Windows API MessageBoxW()COPY
示例:DynamicWrapperX_Make.vbs
'************************************************************************
'Main
'************************************************************************
Sub Main()
If Not DynamicWrapperX_Init() Then Exit Sub
Msgbox "DynamicWrapperX_Init() = OK"
Set DX = CreateObject("DynamicWrapperX")
DX.Register "user32", "EnumWindows",    "i=pl"
DX.Register "user32", "GetWindowTextW", "i=hWl"     ' Unicode variant.
' DX.Register "user32", "GetWindowText", "i=hSl"    ' ANSI variant.
Set Ref = GetRef("CbkEnumWin")  ' Get a reference to the function.
pCbkFunc = DX.RegisterCallback(Ref, "i=hl", "r=l")  ' Register CbkEnumWin
' as a callback procedure
' and get its pointer.
n = 0 : m = 0 : WinList = ""
Title = Space(256)              ' Buffer for the window titles (an output string).
DX.EnumWindows pCbkFunc, 0      ' Call EnumWindows and pass it the pointer
' to the callback procedure.      
WScript.Echo "Windows in total: " & m & vbCrLf & "With a title: " & n & _
  vbCrLf & vbCrLf & WinList
End Sub
'************************************************************************
'The callback function itself
'************************************************************************
Function CbkEnumWin(ByVal hwnd, ByVal lparam)
DX.GetWindowTextW hwnd, Title, 256
' DX.GetWindowText hwnd, Title, 256   ' ANSI variant.
If Len(Title) > 0 Then  ' Add the title to the list if its length is greater than 0.
WinList = WinList & hwnd & vbTab & Title & vbCrLf
n = n + 1
End If
m = m + 1
CbkEnumWin = 1          ' Returning 0 will stop the calls.
End FunctionCOPY
结果如下:
---------------------------
Windows Script Host
---------------------------
Windows in total: 464
With a title: 232
197348 CandidateWindow
1116542 f.lux note
393324 f.lux note
526706 Mode Indicator
200264 Mode Indicator
329256 百度云
68284 TeamViewer Panel (最小化)
68282 TeamViewer Panel
68186 item
198658 pallas
198654 pallas
395326 pallas_mk
66152 电池指示器
66232 Network Flyout
196988 dummyLayeredWnd
67028 DivX Update
66630 桌面歌词
67322 Mode Indicator
197434 Mode Indicator
330582 Mode Indicator
67452 CandidateWindow
527208 Mode Indicator
657950 CandidateWindow
67874 Mode Indicator
2296658 Mode Indicator
1182228 Mode Indicator
131922 Mode Indicator
134680 Mode Indicator
3476026 R:\DynamicWrapperX
263772 VBS原创&转载 - 批处理之家 批处理_BAT_CMD_DOS_VBS_Perl_Python_PowerShell - Powered by Discuz! - Google Chrome
197180 f.lux: Warm at sunset, with a candle before bed
265792 R:\DynamicWrapperX.7z\DynamicWrapperX\
592728 无标题 - 记事本
1247808 转至
41551982 替换
656466 C:\Users\Yu2n\Desktop\base64utf8.vbs - Notepad++
132724 工具栏选项
67402 Project Window Insert
67404 Project Window Insert
67406 Project Window Insert
67408 Project Window Insert
67396 Code Window
67398 Code Window
67400 Code Window
67332 Microsoft Visual Basic - Book1
199640 任务管理器
68318 YU2N-DEV - TeamViewer - 免费许可证(仅非商业用途)
656496 G
134778 G
66104 计算机和联系人
65904 TeamViewer
131268 TeamViewer - 文件传输事件日志
395870 应用商店
132008 Groove 音乐
197486 Groove 音乐
132062 照片
394142 照片
132050 电影和电视
264854 电影和电视
68270 应用商店
395238 d:\game\英雄联盟\leagueclient\.\GameLoader.exe::GAMELOADER
133266 进度
723080 G
788356 TCLS_CORE_WND_08584278
655964 TCLS_CORE_WND_79840640
460900 tgp_login
395152 tgp_login
918870 ClassName531937
329780 TCLS_CORE_WND_562310784
198790 _TGP_SERVER_DIR_WND_NAME_
198600 tgp_cross_mgs_wnd_19322F30-BAF4-49E3-8BE7-6B39B3A674A6
67560 HIDE
67516 ClassName511843
133014 TCLS_CORE_WND_10746792
67512 G
67508 TGP-BS-CALLBACK-WINDOW-4741AA4C
67506 TGP_TRAYICON_NEW
67504 TCLS_CORE_WND_10223212
67502 TGP_RES_MGR_Window
67498 _TCLS_CORE_APP_WND_NAME_
133016 TCLS_CORE_WND_53691080
198540 TGP_EXTERNAL_MESSAGE_RECEIVER
198538 _TGP_MAIN_WINDOW_WND_NAME_
264070 TCLS_CORE_WND_53891488
133020 tgp_login
67346 属性
67190 Microsoft Excel - Book1
67292 DDE Server Window
131976 AXWIN Frame Window
328620 多玩英雄联盟盒子
394036 G
196696 MediaEspresso DeviceDetector
394566 G
67092 向日葵客户端
67100 OrayShadow
67084 oray
196726 G
67046 Advanced Controls: WOW(R) HD
66908 SRS Audio Sandbox
67040 DivXUpdate
67020 Updater Error
67008 DivX Update
132526 DivXIPCWindowName
66692 dummyLayeredWnd
66890 NetWorx (所有以太网连接)
131622 设置
132196 欢迎使用百度网盘
66622 Mode Indicator
262904 传奇 - 李健
131260 迷你播放器
131528 传奇 - 李健
66574 G
66552 G
66334 DDE Server Window
131846 EVERYTHING_SERVICE_CLIENT
131130 SecHealthHost
66254 Windows Shell Experience 主机
66252 MS_WebcheckMonitor
66148 DDE Server Window
65902 DDE Server Window
196724 BluetoothNotificationAreaIconWindowClass
65750 The Event Manager - Status
65752 HotKey Listener
65714 TVMainThreadCall
65676 Windows Push Notifications Platform
65672 G
196636 Task Host Window
65602 DWM Notification Window
65740 igfxtrayWindow
67212 GDI+ Window
67574 WeGame
329252 欢迎使用百度网盘
65868 Program Manager
134074 MSCTFIME UI
66026 Default IME
67186 MSCTFIME UI
65892 Default IME
197334 MSCTFIME UI
131448 Default IME
65858 MSCTFIME UI
65738 Default IME
525054 MSCTFIME UI
133074 Default IME
66208 Default IME
199290 MSCTFIME UI
88148410 Default IME
1052172 Default IME
132674 MSCTFIME UI
197504 Default IME
7473982 MSCTFIME UI
60886442 Default IME
134708 Default IME
133516 Default IME
65882 MSCTFIME UI
65700 Default IME
1641008 MSCTFIME UI
658252 Default IME
67744 MSCTFIME UI
788512 Default IME
67276 MSCTFIME UI
67194 Default IME
134128 MSCTFIME UI
68588 Default IME
66064 MSCTFIME UI
65716 Default IME
395366 Default IME
526460 Default IME
134782 Default IME
68618 Default IME
591844 Default IME
132044 Default IME
197554 Default IME
131966 Default IME
132058 Default IME
197612 Default IME
132042 Default IME
133796 Default IME
68272 Default IME
68250 Default IME
328806 MSCTFIME UI
197932 Default IME
132258 Default IME
198754 MSCTFIME UI
198700 Default IME
329664 Default IME
395232 Default IME
67562 Default IME
67514 Default IME
67510 Default IME
67500 Default IME
394578 MSCTFIME UI
197122 Default IME
262974 Default IME
132026 MSCTFIME UI
328514 Default IME
263750 Default IME
132662 Default IME
132030 Default IME
263036 Default IME
197192 Default IME
67098 MSCTFIME UI
67086 Default IME
67082 Default IME
67036 MSCTFIME UI
66912 Default IME
67010 Default IME
66992 Default IME
66896 MSCTFIME UI
131184 Default IME
197726 Default IME
66568 MSCTFIME UI
262234 Default IME
66576 Default IME
66554 Default IME
131864 Default IME
131848 Default IME
131844 Default IME
131136 Default IME
66256 Default IME
66218 Default IME
66150 Default IME
65864 Default IME
65846 MSCTFIME UI
65844 MSCTFIME UI
65754 Default IME
65756 Default IME
65678 Default IME
65674 Default IME
67536 MSCTFIME UI
133018 Default IME
66682 MSCTFIME UI
66616 Default IME
---------------------------
确定   
---------------------------COPY
3

评分人数

『千江有水千江月』千江有水,月映千江;万里无云,万里青天。    http://yu2n.qiniudn.com/

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

评分人数

TOP



贴下介绍嘛。


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 (>>).
去学去写去用才有进步。安装python3代码存为xx.py 双击运行或右键用IDLE打开按F5运行

TOP

学习学习,谢谢分享!

TOP

回复 2# cfwyy77_bat

感谢你的分享,收获良多!可惜网页是法语,看得很辛苦,不过介绍的确实挺全面的。

TOP

感谢楼主的分享,原来楼主的资料里面有中文说明DynamicWrapperX。

TOP

在哪下载呀

TOP

返回列表