new screenshot
This commit is contained in:
BIN
img/Terminal.png
BIN
img/Terminal.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.2 MiB |
@@ -66,7 +66,9 @@ namespace mpvnet
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (App.IsStartedFromTerminal) Native.AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/);
|
if (App.IsStartedFromTerminal)
|
||||||
|
Native.AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/);
|
||||||
|
|
||||||
Application.Run(new MainForm());
|
Application.Run(new MainForm());
|
||||||
if (App.IsStartedFromTerminal) Native.FreeConsole();
|
if (App.IsStartedFromTerminal) Native.FreeConsole();
|
||||||
mutex.Dispose();
|
mutex.Dispose();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class MediaInfo : IDisposable
|
|||||||
{
|
{
|
||||||
if (!Loaded)
|
if (!Loaded)
|
||||||
{
|
{
|
||||||
if (LoadLibrary("MediaInfo.dll") == IntPtr.Zero)
|
if (Native.LoadLibrary("MediaInfo.dll") == IntPtr.Zero)
|
||||||
throw new Exception("Failed to load MediaInfo.dll.");
|
throw new Exception("Failed to load MediaInfo.dll.");
|
||||||
|
|
||||||
Loaded = true;
|
Loaded = true;
|
||||||
@@ -56,21 +56,27 @@ public class MediaInfo : IDisposable
|
|||||||
|
|
||||||
~MediaInfo() { Dispose(); }
|
~MediaInfo() { Dispose(); }
|
||||||
|
|
||||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
|
[DllImport("kernel32.dll")]
|
||||||
static extern IntPtr LoadLibrary(string path);
|
public static extern IntPtr LoadLibrary(string path);
|
||||||
|
|
||||||
[DllImport("MediaInfo.dll")]
|
[DllImport("MediaInfo.dll")]
|
||||||
static extern IntPtr MediaInfo_New();
|
static extern IntPtr MediaInfo_New();
|
||||||
|
|
||||||
[DllImport("MediaInfo.dll")]
|
[DllImport("MediaInfo.dll", CharSet = CharSet.Unicode)]
|
||||||
static extern void MediaInfo_Delete(IntPtr handle);
|
static extern int MediaInfo_Open(IntPtr handle, string path);
|
||||||
|
|
||||||
[DllImport("MediaInfo.dll", CharSet = CharSet.Unicode)]
|
[DllImport("MediaInfo.dll", CharSet = CharSet.Unicode)]
|
||||||
static extern int MediaInfo_Open(IntPtr handle, string fileName);
|
static extern IntPtr MediaInfo_Option(IntPtr handle, string optionString, string value);
|
||||||
|
|
||||||
|
[DllImport("MediaInfo.dll")]
|
||||||
|
static extern IntPtr MediaInfo_Inform(IntPtr handle, int reserved);
|
||||||
|
|
||||||
[DllImport("MediaInfo.dll")]
|
[DllImport("MediaInfo.dll")]
|
||||||
static extern int MediaInfo_Close(IntPtr handle);
|
static extern int MediaInfo_Close(IntPtr handle);
|
||||||
|
|
||||||
|
[DllImport("MediaInfo.dll")]
|
||||||
|
static extern void MediaInfo_Delete(IntPtr handle);
|
||||||
|
|
||||||
[DllImport("MediaInfo.dll", CharSet = CharSet.Unicode)]
|
[DllImport("MediaInfo.dll", CharSet = CharSet.Unicode)]
|
||||||
static extern IntPtr MediaInfo_Get(IntPtr handle,
|
static extern IntPtr MediaInfo_Get(IntPtr handle,
|
||||||
MediaInfoStreamKind streamKind,
|
MediaInfoStreamKind streamKind,
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace mpvnet
|
|
||||||
{
|
|
||||||
public class Native
|
public class Native
|
||||||
{
|
{
|
||||||
[DllImport("kernel32.dll")]
|
[DllImport("kernel32.dll")]
|
||||||
@@ -13,7 +11,7 @@ namespace mpvnet
|
|||||||
public static extern bool FreeConsole();
|
public static extern bool FreeConsole();
|
||||||
|
|
||||||
[DllImport("kernel32.dll")]
|
[DllImport("kernel32.dll")]
|
||||||
public static extern IntPtr LoadLibrary(string dllToLoad);
|
public static extern IntPtr LoadLibrary(string path);
|
||||||
|
|
||||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||||
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
||||||
@@ -95,4 +93,3 @@ namespace mpvnet
|
|||||||
public string lpData;
|
public string lpData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -16,7 +16,7 @@ using System.Windows.Forms;
|
|||||||
using WinForms = System.Windows.Forms;
|
using WinForms = System.Windows.Forms;
|
||||||
|
|
||||||
using static mpvnet.libmpv;
|
using static mpvnet.libmpv;
|
||||||
using static mpvnet.Native;
|
using static Native;
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user