_WinAPI_SetParent会造成进程卡住,这是为什么?
主进程退出后,附加进程会卡住#Region ;**** 参数创建于 ACNWrapper_GUI ****#PRE_icon=C:\Windows\syswow64\SHELL32.dll|-28
#PRE_UseX64=n
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <WinAPI.au3>
#include <WinAPIProc.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$LianWoPid = Run(@ScriptDir&'\LianWoAuthC.exe')
Sleep(1000)
$LianWoAuthC = _SI_EnumProcessWindows($LianWoPid, 'LianWo')
If @error Then Exit
$GUI_WEIXIN = GUICreate('wx', 150, 150, 325, 401, $WS_POPUP)
GUISetBkColor(0x000)
_WinAPI_SetParent($GUI_WEIXIN, $LianWoAuthC)
GUISetState(@SW_SHOW)
AdlibRegister('_EXIT')
Do
Sleep(100)
Until ProcessExists($LianWoPid) == 0
Func _EXIT()
If ProcessExists($LianWoPid) == 0 Then
Exit
EndIf
EndFunc ;==>_EXIT
Func _SI_EnumProcessWindows($__process, $__parameter = Default)
$__iPid = ProcessExists($__process)
If $__iPid == 0 Then Return SetError(1, 0, 'Unknown PID');进程错误
Switch $__parameter
Case Default
$__visible = True
Case Else
$__visible = False
EndSwitch
$__EnumThreadWindows = _WinAPI_EnumProcessWindows($__iPid, $__visible);窗口列表
If Not IsArray($__EnumThreadWindows) Then Return SetError(1, 0, 'Unknown Windows')
If $__visible = True Then Return $__EnumThreadWindows
ReDim $__EnumThreadWindows
For $i = 1 To $__EnumThreadWindows
If StringRegExp($__EnumThreadWindows[$i], $__parameter) Then Return $__EnumThreadWindows[$i]
Next
Return SetError(1, 0, 'Unknown PID')
EndFunc ;==>_SI_EnumProcessWindows
链接:http://pan.baidu.com/s/1pL6rYen 密码:xxmd
客户端 附加到其他进程里面好像就没有问题。。。
估计是石沉大海,一般我问的问题貌似是不是都太难了,几乎都是无解
{:face (229):},这样子离当山贼王的理想还需要好久实现!
页:
[1]