SVN r1032

SVN-Revision: r1032
This commit is contained in:
tdx
2025-11-07 10:01:31 +00:00
parent 2a53e04ed8
commit 2656f5ffa8
2 changed files with 27 additions and 50 deletions
+2 -27
View File
@@ -18,7 +18,7 @@ namespace Lskj.Notice
/// </summary>
[STAThread]
static void Main(string[] args)
{
{
CefRuntime.Load();//cef浏览器模块设置加载
var mainArgs = new CefMainArgs(args);
var app = new DemoApp();
@@ -99,29 +99,4 @@ namespace Lskj.Notice
class SingleApplication
{
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr OpenMutex(uint dwDesiredAccess, int bInheritHandle, string lpName);
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr CreateMutex(IntPtr lpMutexAttributes, int bInitialOwner, string lpName);
public static bool IsRunning(string appID)
{
bool running = false;
if (OpenMutex(0x1F0001, 0, appID) == IntPtr.Zero)
{
CreateMutex(IntPtr.Zero, 0, appID);
running = true;
}
return running;
}
}
internal sealed class DemoApp : CefApp
{
protected override void OnBeforeCommandLineProcessing(string processType, CefCommandLine commandLine)
{
commandLine.AppendSwitch("ppapi-flash-version", "28.0.0.137");
commandLine.AppendSwitch("ppapi-flash-path", @"D:\测试\LSERP\Debug\pepflashplayer.dll");
}
}
}
}
private static extern IntPtr OpenMutex(