<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic KillTimer sometimes not working in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870304#M71870</link>
    <description>I have a dialog with an edit box. The edit box shows elapsed time and is updated by a Timer Proc&lt;BR /&gt;&lt;BR /&gt;The edit box also allows for user override - DlgSetSub is used to kill the Timer when the box gains focus - the user can then enter data in the field. The user then writes the data and dismisses the dialog - which resets the timer&lt;BR /&gt;&lt;BR /&gt;And this works very well initially&lt;BR /&gt;&lt;BR /&gt;But after a while (the time is variable) The KillTimer fails - returning false with GetLastError also returning 0. And then the edit box is still being updated and the data entry is not possible.&lt;BR /&gt;&lt;BR /&gt;So, any ideas why KillTimer would fail?&lt;BR /&gt;&lt;BR /&gt;If its any help the code is pretty simple, and optimization is disabled, and linked with the multithread libraries.&lt;BR /&gt;&lt;BR /&gt;Thankx for any help you can give&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 04 Dec 2009 02:50:44 GMT</pubDate>
    <dc:creator>jim_cox</dc:creator>
    <dc:date>2009-12-04T02:50:44Z</dc:date>
    <item>
      <title>KillTimer sometimes not working</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870304#M71870</link>
      <description>I have a dialog with an edit box. The edit box shows elapsed time and is updated by a Timer Proc&lt;BR /&gt;&lt;BR /&gt;The edit box also allows for user override - DlgSetSub is used to kill the Timer when the box gains focus - the user can then enter data in the field. The user then writes the data and dismisses the dialog - which resets the timer&lt;BR /&gt;&lt;BR /&gt;And this works very well initially&lt;BR /&gt;&lt;BR /&gt;But after a while (the time is variable) The KillTimer fails - returning false with GetLastError also returning 0. And then the edit box is still being updated and the data entry is not possible.&lt;BR /&gt;&lt;BR /&gt;So, any ideas why KillTimer would fail?&lt;BR /&gt;&lt;BR /&gt;If its any help the code is pretty simple, and optimization is disabled, and linked with the multithread libraries.&lt;BR /&gt;&lt;BR /&gt;Thankx for any help you can give&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 02:50:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870304#M71870</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-12-04T02:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: KillTimer sometimes not working</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870305#M71871</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/308522"&gt;jim.cox&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;...The user then writes the data and dismisses the dialog - which resets the timer&lt;BR /&gt;&lt;BR /&gt;And this works very well initially&lt;BR /&gt;&lt;BR /&gt;But after a while (the time is variable) The KillTimer fails - returning false with GetLastError also returning 0. And then the edit box is still being updated and the data entry is not possible.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hard to tell without seeing your code, but KillTimer requires the same window handle and timer id arguments as were used in SetTimer, and the hwnd is presumably that of the dialog's parent window (?) since when the dialog "is dismissed" its handle is no longer valid; perhaps your code somehow allows the handle validity to get out of sync. I will assure you that there is no problem with KillTimer, and F90 optimization and multithread libraries have no effect on Win32 API functions. Note that all handles in F90 should be declared INTEGER(HANDLE). Also, be sure to invoke the SAVE intrinsic in your dialog procs.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 06:22:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870305#M71871</guid>
      <dc:creator>Paul_Curtis</dc:creator>
      <dc:date>2009-12-04T06:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: KillTimer sometimes not working</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870306#M71872</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/77713"&gt;Paul Curtis&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Hard to tell without seeing your code, but KillTimer requires the same window handle and timer id arguments as were used in SetTimer, and the hwnd is presumably that of the dialog's parent window (?) since when the dialog "is dismissed" its handle is no longer valid; perhaps your code somehow allows the handle validity to get out of sync. &lt;BR /&gt;&lt;BR /&gt; I will assure you that there is no problem with KillTimer, and F90 optimization and multithread libraries have no effect on Win32 API functions. &lt;BR /&gt;&lt;BR /&gt; Note that all handles in F90 should be declared INTEGER(HANDLE). Also, be sure to invoke the SAVE intrinsic in your dialog procs.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Thanks for the comments Paul&lt;BR /&gt;&lt;BR /&gt;The dialog"dismisseal" is just SW_SHOWMINIMIZED - se I hope we are not losing the handle&lt;BR /&gt;&lt;BR /&gt;It was not so much optimisation as thread timing I was thinking of - as I say it starts out working fine...&lt;BR /&gt;&lt;BR /&gt;I'll check the definitions and I'll give that SAVE a try &lt;BR /&gt;&lt;BR /&gt;Cheers &lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;.&lt;BR /&gt;</description>
      <pubDate>Sun, 06 Dec 2009 19:44:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/KillTimer-sometimes-not-working/m-p/870306#M71872</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-12-06T19:44:12Z</dc:date>
    </item>
  </channel>
</rss>

