Browse Source

remove mutex

main
Hendrik Langer 6 years ago
parent
commit
bb36f1a25b
  1. 3
      README.md
  2. BIN
      windows-snapshot-tool/bin/freeze.exe
  3. 9
      windows-snapshot-tool/src/main.cpp

3
README.md

@ -50,6 +50,9 @@ apt clean
echo "dtoverlay=dwc2" >> /boot/config.txt echo "dtoverlay=dwc2" >> /boot/config.txt
add "console=tty3" to /boot/cmdline.txt
(console=tty3 loglevel=3 vt.global_cursor_default=0 logo.nologo
copy everything to /opt/freezer/ copy everything to /opt/freezer/
add to /etc/rc.local: python3 /opt/freezer/display.py add to /etc/rc.local: python3 /opt/freezer/display.py

BIN
windows-snapshot-tool/bin/freeze.exe

Binary file not shown.

9
windows-snapshot-tool/src/main.cpp

@ -1,9 +1,6 @@
#include "resource.h" #include "resource.h"
#include "LimitSingleInstance.h" #include "LimitSingleInstance.h"
CLimitSingleInstance g_SingleInstanceObj(TEXT("Global\\{38593226-AABB-1234-7592-D335AAB6F22A}"));
/*variables*/ /*variables*/
UINT WM_TASKBAR = 0; UINT WM_TASKBAR = 0;
HWND Hwnd; HWND Hwnd;
@ -30,11 +27,11 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
LPSTR lpszArgument, LPSTR lpszArgument,
int nCmdShow) int nCmdShow)
{ {
if (g_SingleInstanceObj.IsAnotherInstanceRunning())
{
HWND existingApp = FindWindow(0, szClassName); HWND existingApp = FindWindow(0, szClassName);
if (existingApp)
{
SendMessage(existingApp, WM_DESTROY, 0, 0); SendMessage(existingApp, WM_DESTROY, 0, 0);
//return FALSE;
} }
/* This is the handle for our window */ /* This is the handle for our window */

Loading…
Cancel
Save