|
发表于 2011-1-13 20:57:35
|
显示全部楼层
呃,原理是这个函数吧
(摘自WE 1.21b)引用第5楼actboy168于2011-01-07 17:14发表的  :
好吧,要增加长度估计有点麻烦,我想想看 虽说const char *source有大小问题未必能放下更大的东西
可以自己重新实现这个函数这样就随便了- .text:0071FE90 ; BOOL __fastcall trigger_editor_editbox_copy(const char *source)
- .text:0071FE90 trigger_editor_editbox_copy proc near  
- .text:0071FE90
- .text:0071FE90 hWndNewOwner    = dword ptr -4
- .text:0071FE90
- .text:0071FE90                 push    ebp
- .text:0071FE91                 mov     ebp, esp
- .text:0071FE93                 push    ecx
- .text:0071FE94                 push    ebx
- .text:0071FE95                 push    esi
- .text:0071FE96                 push    edi
- .text:0071FE97                 mov     ebx, ecx
- .text:0071FE99                 call    ds:GetActiveWindow
- .text:0071FE9F                 push    ebx
- .text:0071FEA0                 mov     [ebp+hWndNewOwner], eax
- .text:0071FEA3                 call    Storm_506
- .text:0071FEA8                 mov     esi, eax
- .text:0071FEAA                 inc     esi
- .text:0071FEAB                 push    esi             ; dwBytes
- .text:0071FEAC                 push    2042h           ; uFlags
- .text:0071FEB1                 call    ds:GlobalAlloc
- .text:0071FEB7                 mov     edi, eax
- .text:0071FEB9                 test    edi, edi
- .text:0071FEBB                 jnz     short loc_71FEC4
- .text:0071FEBD                 pop     edi
- .text:0071FEBE                 pop     esi
- .text:0071FEBF                 pop     ebx
- .text:0071FEC0                 mov     esp, ebp
- .text:0071FEC2                 pop     ebp
- .text:0071FEC3                 retn
- .text:0071FEC4 ; ---------------------------------------------------------------------------
- .text:0071FEC4
- .text:0071FEC4 loc_71FEC4:                             ; CODE XREF: trigger_editor_editbox_copy+2Bj
- .text:0071FEC4                 push    edi             ; hMem
- .text:0071FEC5                 call    ds:GlobalLock
- .text:0071FECB                 test    eax, eax
- .text:0071FECD                 jnz     short loc_71FEDE
- .text:0071FECF                 call    ds:CloseClipboard
- .text:0071FED5                 pop     edi
- .text:0071FED6                 pop     esi
- .text:0071FED7                 xor     eax, eax
- .text:0071FED9                 pop     ebx
- .text:0071FEDA                 mov     esp, ebp
- .text:0071FEDC                 pop     ebp
- .text:0071FEDD                 retn
- .text:0071FEDE ; ---------------------------------------------------------------------------
- .text:0071FEDE
- .text:0071FEDE loc_71FEDE:                             ; CODE XREF: trigger_editor_editbox_copy+3Dj
- .text:0071FEDE                 push    esi             ; size
- .text:0071FEDF                 push    ebx             ; source
- .text:0071FEE0                 push    eax             ; dest
- .text:0071FEE1                 call    storm_string_copy
- .text:0071FEE6                 push    edi             ; hMem
- .text:0071FEE7                 call    ds:GlobalUnlock
- .text:0071FEED                 mov     eax, [ebp+hWndNewOwner]
- .text:0071FEF0                 push    eax             ; hWndNewOwner
- .text:0071FEF1                 call    ds:OpenClipboard
- .text:0071FEF7                 test    eax, eax
- .text:0071FEF9                 jnz     short loc_71FF0B
- .text:0071FEFB                 push    edi             ; hMem
- .text:0071FEFC                 call    ds:GlobalFree
- .text:0071FF02                 pop     edi
- .text:0071FF03                 pop     esi
- .text:0071FF04                 xor     eax, eax
- .text:0071FF06                 pop     ebx
- .text:0071FF07                 mov     esp, ebp
- .text:0071FF09                 pop     ebp
- .text:0071FF0A                 retn
- .text:0071FF0B ; ---------------------------------------------------------------------------
- .text:0071FF0B
- .text:0071FF0B loc_71FF0B:                             ; CODE XREF: trigger_editor_editbox_copy+69j
- .text:0071FF0B                 call    ds:EmptyClipboard
- .text:0071FF11                 test    eax, eax
- .text:0071FF13                 jnz     short loc_71FF2B
- .text:0071FF15                 call    ds:CloseClipboard
- .text:0071FF1B                 push    edi             ; hMem
- .text:0071FF1C                 call    ds:GlobalFree
- .text:0071FF22                 pop     edi
- .text:0071FF23                 pop     esi
- .text:0071FF24                 xor     eax, eax
- .text:0071FF26                 pop     ebx
- .text:0071FF27                 mov     esp, ebp
- .text:0071FF29                 pop     ebp
- .text:0071FF2A                 retn
- .text:0071FF2B ; ---------------------------------------------------------------------------
- .text:0071FF2B
- .text:0071FF2B loc_71FF2B:                             ; CODE XREF: trigger_editor_editbox_copy+83j
- .text:0071FF2B                 push    edi             ; hMem
- .text:0071FF2C                 push    1               ; uFormat
- .text:0071FF2E                 call    ds:SetClipboardData
- .text:0071FF34                 call    ds:CloseClipboard
- .text:0071FF3A                 pop     edi
- .text:0071FF3B                 pop     esi
- .text:0071FF3C                 mov     eax, 1
- .text:0071FF41                 pop     ebx
- .text:0071FF42                 mov     esp, ebp
- .text:0071FF44                 pop     ebp
- .text:0071FF45                 retn
- .text:0071FF45 trigger_editor_editbox_copy endp
复制代码 |
|