|
7.1模块使用时候会抛出
窗口_强制显示 不能将整数型转换为空白型
系统_取DOS执行结果不能将“精易_进程结构”数据转换到“”数据
修复方法
窗口_强制显示
在模块源码中 给窗口_强制显示方法的返回值加上整数型
返回 (SetWindowPos (句柄, 选择 (总在最前, #HWND_TOPMOST, #HWND_NOTOPMOST ), 0, 0, 0, 0, 位或 ( #SWP_NOMOVE, #SWP_NOSIZE )) )
系统_取DOS执行结果
在模块源码中 将系统_取DOS执行结果的变量中的精易_进程结构改为PROCESS_INFORMATION 其变量名依然用PROCESS_INFORMATION
将下方的进程句柄中文改为hProcess
将下方的线程句柄中文改为hThread
变量名 | 类 型 | 静态 | 数组 | 备 注 | SECURITY_ATTRIBUTES | SECURITY_ATTRIBUTES | | | STARTUPINFO | STARTUPINFO_短整数 | | | PROCESS_INFORMATION | PROCESS_INFORMATION | | | hWrite | 整数型 | | | hRead | 整数型 | | | txt | 字节集 | | | Length | 整数型 | | | ExitCode | 整数型 | | | retext | 文本型 | | |
SECURITY_ATTRIBUTES.nLength = 12 SECURITY_ATTRIBUTES.lpSecurityDescriptor = 0 SECURITY_ATTRIBUTES.bInheritHandle = 真 CreatePipe (hRead, hWrite, SECURITY_ATTRIBUTES, 0 ) STARTUPINFO.cb = 68 STARTUPINFO.dwFlags = 位或 ( #STARTF_USESHOWWINDOW, #STARTF_USESTDHANDLES )STARTUPINFO.wShowWindow = #SW_HIDE STARTUPINFO.hStdOutput = hWrite STARTUPINFO.hStdError = hWrite 如果 (取操作系统类别 () ≤ 2 )CreateProcess_短整数2 (0, “command.com /c ” + 命令行文本, 0, 0, 真, 0, 0, 0, STARTUPINFO, PROCESS_INFORMATION ) CreateProcess_短整数2 (0, “cmd.exe /c ” + 命令行文本, 0, 0, 真, 0, 0, 0, STARTUPINFO, PROCESS_INFORMATION ) CloseHandle (hWrite ) 判断循环首 (Length ≠ -1 ) PeekNamedPipe (hRead, 0, 0, 0, Length, 0 ) 如果 (Length ≠ 0 )txt = 取空白字节集 (Length )ReadFile (hRead, txt, Length, Length, 0 ) retext = retext + 取字节集数据 (txt, #文本型 )GetExitCodeProcess (PROCESS_INFORMATION.hProcess, ExitCode ) 如果真 (ExitCode ≠ #STILL_ACTIVE ) CloseHandle (hRead ) 跳出循环 ()系统_处理事件 ()程序_延时 (1 )判断循环尾 ()CloseHandle (PROCESS_INFORMATION.hProcess )CloseHandle (PROCESS_INFORMATION.hThread )返回 (retext )
|
评分
-
查看全部评分
|