mirror of
https://github.com/netchx/netch.git
synced 2026-04-15 21:03:23 +08:00
Fix attach console
This commit is contained in:
@@ -20,8 +20,10 @@ namespace Netch
|
||||
{
|
||||
if (args.Contains("-console"))
|
||||
{
|
||||
NativeMethods.AllocConsole();
|
||||
NativeMethods.AttachConsole(-1);
|
||||
if (!NativeMethods.AttachConsole(-1))
|
||||
{
|
||||
NativeMethods.AllocConsole();
|
||||
}
|
||||
}
|
||||
|
||||
// 创建互斥体防止多次运行
|
||||
|
||||
Reference in New Issue
Block a user