ecere中采用system,Execute,ShellOpen执行DOS命令有黑色dos窗口闪现

来自中国的朋友,欢迎您在本版面使用中文讨论问题。请注意,如果您想得到不懂中文的人的帮助,请同时提供英文译文。
Help and discussions in Chinese.
Post Reply
janksenhu
Posts: 6
Joined: Sat Feb 02, 2013 2:45 am

ecere中采用system,Execute,ShellOpen执行DOS命令有黑色dos窗口闪现

Post by janksenhu »

ecere中采用system,Execute,ShellOpen执行DOS命令有黑色dos窗口闪现,这个体验太不好了!
有其他的执行方式吗?没有Dos窗口闪现,同时DOS命令阻塞执行?
Attachments
12.jpg
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: ecere中采用system,Execute,ShellOpen执行DOS命令有黑色dos窗口闪现

Post by jerome »

Hi janksen,

hi janksen,

If you use DualPipe, do you still get a command prompt window showing up?

Code: Select all

File output = DualPipeOpen({ output = true }, command);
if(output)
{
   int exitCode;
   while(!output.eof)
   {
      output.Read( ... )
   }
   exitCode = output.GetExitCode();   
}
Also, make sure 'Console Application' setting is off.
If you still get a command prompt box, try { output = true, input = true, error = true }

Regards,

Jerome
janksenhu
Posts: 6
Joined: Sat Feb 02, 2013 2:45 am

Re: ecere中采用system,Execute,ShellOpen执行DOS命令有黑色dos窗口闪现

Post by janksenhu »

编译之后,运行卡死了!代码如下,不知道为什么!
DualPipe output = DualPipeOpen({ output = true }, "adb");
if(output)
{
int exitCode;

//TempFile fileInput { };
// SetFileInput(fileInput);

while(!output.Eof())
{
//char junk[4096];
// int count = output.Read(junk, 1, 4096);
//fileInput.Write(junk, 1, count);
}
exitCode = output.GetExitCode();
delete output;
}
Post Reply