Home > Web Site Updates > CInstanceChecker v1.18

CInstanceChecker v1.18

March 4, 2016

Just to let everyone know that v1.18 of CInstanceChecker has been released. Updates for this version include:

  • Updated copyright details.
  • Update the sample app project settings to more modern defaults.
  • Update the code to clean compile on VC 2010 – 2015
  • Added SAL annotations to all the code.
  • CInstanceChecker::PreviousInstanceRunning now uses FILE_MAP_READ flag when attempting to open the file mapping
  • The ActivatePreviousInstance method now includes a new HWND hSender parameter.
  • The sample app which uses a MFC CFrameWnd now shows some text in the client area to tell end-users what to do to exercise the code.
  • After updating the instructions on how to use the class, the code which referenced an internal _SINSTANCE_DATA global static instance has been refactored back into the main CInstanceChecker class
  • CInstanceChecker::TrackFirstInstanceRunning now takes a HWND hWindowToTrack parameter. This parameter now eliminates the need for the GetWindowToTrack method.
  • Reworked the internals of the CInstanceChecker class to avoid use of MFC. Instead now all the class uses ATL replacements for equivalent MFC functionality.
  • Reworked the internals of the QuitPreviousInstance method.
  • Removed the need for the ActivateChecker and GetMMFFilename methods.
  • The structure which is put into the memory mapped file now is 8 bytes in size. This is to allow interop between Win32 and Win64 instances of the same application.
  • Refactored the code in ActivatePreviousInstance & QuitPreviousInstance which finds the previous HWND into a new FindPreviousHWND method.
  • Reworked the code which serializes access to all instances of CInstanceChecker and in the process removed the need for the mutex which protects the memory mapped file.
Categories: Web Site Updates
%d bloggers like this: