<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Windows Mutex won&#039;t work with active Skinning</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Windows Mutex won&#039;t work with active Skinning]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 15:09:15 +0000</pubDate>
  <lastBuildDate>Tue, 15 Sep 2009 03:28:14 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15172</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Windows Mutex won&#039;t work with active Skinning : I&amp;#039;m using Visual DataFlex...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15172&amp;PID=53025&amp;title=windows-mutex-wont-work-with-active-skinning#53025</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5536">MatthiasB</a><br /><strong>Subject:</strong> 15172<br /><strong>Posted:</strong> 15 September 2009 at 3:28am<br /><br />I'm using Visual DataFlex 2009 v15 together with CodeJock v13.1.<DIV>We tried to avoid loading the same DataFlex program twice with the use of Mutex.</DIV><DIV>&nbsp;</DIV><DIV>The following code works fine if I use the program caption in order to create a Mutex.</DIV><DIV>&nbsp;</DIV><DIV><font face="Courier New, Courier, mono"></DIV><DIV>// external functions<BR>#IFNDEF Get_CreateMuteX<BR>&nbsp;&nbsp;&nbsp; External_Function CreateMuteX "CreateMutexA" Kernel32.dll Integer i1 Integer i2 Integer i3 Returns Integer<BR>#ENDIF<BR>#IFNDEF Get_CloseHandle<BR>&nbsp;&nbsp; External_Function CloseHandle "CloseHandle" Kernel32.dll Integer i1 Returns Integer<BR>#ENDIF<BR>&nbsp;<BR>// function to create a mutex<BR>Function Create_MuteX_Object String sLabel Returns Boolean<BR>&nbsp;&nbsp; Integer iVoid iErr<BR>&nbsp;&nbsp; String sID<BR>&nbsp;&nbsp; Move sLabel to sID<BR>&nbsp;&nbsp; Move (CreateMuteX(0,1,AddressOf(sID))) to ghMuteX<BR>&nbsp;&nbsp; If (ghMuteX &lt;&gt; ERROR_INVALID_HANDLE) Begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Move (GetLastError()) to iErr<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If (iErr = ERROR_ALREADY_EXISTS) Begin&nbsp; // program is already <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // running<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Move (CloseHandle(ghMuteX)) to iVoid<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Move 0 to ghMuteX<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // kill the application here if you do not want to allow <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // multiple instances<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Function_Return False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else Send None&nbsp; // program is not already running<BR>&nbsp;&nbsp; End<BR>&nbsp;&nbsp; Else Send None&nbsp; // rare error; object could not be created<BR>&nbsp;&nbsp; Function_Return True<BR>End_Function&nbsp; // Create_MuteX_Object</DIV><DIV></font></DIV><DIV>&nbsp;</DIV><DIV>However if my program contains a Skin object:</DIV><DIV><DIV>&nbsp;</DIV><DIV><font face="Courier New, Courier, mono"></DIV></DIV><DIV>Object oSkin is a cCJSkinFramework<BR>&nbsp;&nbsp; Set psSkinFile to "..."<BR>&nbsp;&nbsp; Set psSkinIni to "..."<BR>End_Object<BR><DIV></font></DIV><DIV>&nbsp;</DIV></DIV><DIV>the function Create_MuteX_Object always creates a new mutex object ??!</DIV><DIV>&nbsp;</DIV><DIV>Any ideas?</DIV><DIV><BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 15 Sep 2009 03:28:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15172&amp;PID=53025&amp;title=windows-mutex-wont-work-with-active-skinning#53025</guid>
  </item> 
 </channel>
</rss>