SVN r1032
SVN-Revision: r1032
This commit is contained in:
@@ -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(
|
||||
Reference in New Issue
Block a user