| |
|
|
E.T. | Moin, sees someone a Possibility, The expenses one Konsolen-Program (which Yes in cmd-Window are), in the own Program-Window einzubinden ?? my jetzige Umsetzung, the cmd-Window einzufangen, The Size anzupassen and this then below of my Program-Fensters anzudocken gefällt me not at all: I must always the Fremdfenster with to supervise (Resize, move, minimize, restore etc.), and there the Konsolen-Program right hardware- and memory-Lastig is, comes somehow everything not so right afterwards . and the cmd-Window are too in eachone Win-Version yet different big...
means somehow the cmd-Window in my Program-Window to assimilate, goes something like ??? Have yet no zündende idea...
the Konsolen-Proggi power too no expenses in a .log-File or so, which I anzapfen could (the Prog isn't of me, i will only ne surface moreover, since the operating complete by Start-Parameter working and the target the drives How with SCSI (1:0:0, 0:1:0 etc.) still bad on The nerves goes, To to the right LW has...). |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 04/11/09 ▲ |
|
|
|
|
Andreas Miethe
| such a thing ? CompileMarkSeparation $H Windows.ph
$H Structs.ph
Struct PROCESS_INFORMATION = ~PROCESS_INFORMATION
Struct SECURITY_ATTRIBUTES = ~SECURITY_ATTRIBUTES
Struct STARTUPINFO = ~STARTUPINFO
DEF &NORMAL_PRIORITY_CLASS $20
DEF &STARTF_USESTDHANDLES $100
DEF &STARTF_USESHOWWINDOW $1
CLS ~GetSysColor(~COLOR_BTNFACE)
SetDialogFont ~GetStockObject(~ANSI_VAR_FONT)
Var Ende& = 0
Var Multi& = Create(MultiEdit,%hwnd,,1,10,500,400)
Var Button& = Create(Button,%hwnd,Start,540,10,80,24)
Var Button1& = Create(Button,%hwnd,Ende,540,40,80,24)
Whilenot Ende&
Waitinput
If Clicked(Button1&)
Ende& = 1
ElseIf Clicked(Button&)
SetText Multi&,
Beispiel mit Ping
DirektDosOutputToMultiedit(, ping localhost,255,Multi&)
Endif
EndWhile
End
Proc DirektDosOutputToMultiedit
Parameters Progname$,Command$,MemBuffer&,Multiedit&
Declare hRPipe&,hWPipe&,pRBytes&,Result&
Declare PI#,SI#,SA#
Dim PI#,PROCESS_INFORMATION
Dim SI#,STARTUPINFO
Dim SA#,SECURITY_ATTRIBUTES
Declare StringBuffer$
StringBuffer$ = Space$(MemBuffer&)
SA#.nLength& =SizeOf(SA#)
SA#.bInheritHandle& = 1
SA#.lpSecurityDescriptor& = 0
Result& = ~CreatePipe(Addr(hRPipe&), Addr(hWPipe&), SA#, 0)
If Result& = 0
MessageBox(Pipe konnte nicht gestartet werden,,0)
End
Endif
If Progname$ <>
Command$ = + Command$
Endif
SI#.cb& = SizeOf(SI#)
SI#.dwFlags& = &STARTF_USESHOWWINDOW | &STARTF_USESTDHANDLES
SI#.hStdOutput& = hWPipe&
SI#.hStdError& = hWPipe&
If Progname$ =
Result& = ~CreateProcess(0, Addr(Command$), SA#, SA#, 1, &NORMAL_PRIORITY_CLASS, 0, 0, SI#,PI#)
Else
Result& = ~CreateProcess(Addr(Progname$), Addr(Command$),SA#,SA#,1,&NORMAL_PRIORITY_CLASS, 0, 0,SI#,PI#)
Endif
If Result& <> 1
MessageBox(Datei nicht gefunden,,0)
End
Else
Endif
Result& = ~CloseHandle(hWPipe&)
Var out$ =
While Result& <> 0
Result& = ~ReadFile(hRPipe&,Addr(StringBuffer$),MemBuffer&,Addr(pRBytes&), 0)
If pRBytes& > 0
Out$ = Left$(StringBuffer$,pRBytes&)
~OemToChar(Addr(Out$),Addr(Out$))
Settext Multiedit&,GetText$(Multiedit&)+Out$
If Instr(RUNNING,Out$)
Messagebox(läuft,läuft,0)
endif
Endif
Endwhile
~CloseHandle(PI#.hProcess&)
~CloseHandle(PI#.hThread&)
~CloseHandle(hRPipe&)
Dispose PI#,SI#,SA#
ENDPROC
|
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 04/11/09 ▲ |
|
|
|
|
Paul Glatz | @E.T. Zeig time How You it now make. |
|
|
| |
|
|
|
Paul Glatz | @E.T. If it reicht to the terminate the Program the edition to have can you CompileMarkSeparation help. the edition lying in the Angegebenen Textdatei! |
|
|
| |
|
|