<?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 I had this issue when the OS in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083131#M122368</link>
    <description>&lt;P&gt;I had this issue when the OS changed from XP to Vista/Windows 7 etc.&lt;/P&gt;

&lt;P&gt;My fix was to call the API function &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;DisableProcessWindowsGhosting&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;using the following interface:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;interface&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ IF DEFINED(_X86_)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; DisableProcessWindowsGhosting() &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ATTRIBUTES DEFAULT , STDCALL, DECORATE, ALIAS: 'DisableProcessWindowsGhosting' :: DisableProcessWindowsGhosting&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ELSE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; DisableProcessWindowsGhosting() &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;BIND&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(C,NAME&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;'DisableProcessWindowsGhosting'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ENDIF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;end subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;end interface&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Good luck&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2016 11:42:40 GMT</pubDate>
    <dc:creator>Stephen_Sutcliffe1</dc:creator>
    <dc:date>2016-06-02T11:42:40Z</dc:date>
    <item>
      <title>PeekMessage causing freeze</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083130#M122367</link>
      <description>&lt;P&gt;I am using PeekMessage to get a keyboard input.&lt;/P&gt;

&lt;P&gt;On my computer this works fine but on some computers and with Windows10 it is causing a freeze and the user has to do 'Ctrl Alt Delete'.&lt;/P&gt;

&lt;P&gt;I feel as if some resource or memory is getting filled. I have include the code below. I removed the ClipCursor call in case it was causing the problem.&lt;/P&gt;

&lt;P&gt;Can you suggest what the problem could be.&lt;/P&gt;

&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUBROUTINE GETCHA (K)
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------------------------------------------------------------
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GET KEYPRESS RETURN WITH VALUE IN K

&amp;nbsp;&amp;nbsp;use grad_inc

&amp;nbsp;&amp;nbsp;include 'cgipar.gcb'&amp;nbsp;! FKEY
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;type (T_MSG)&amp;nbsp;msg
&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;integer*2&amp;nbsp;i,iext,k
&amp;nbsp;&amp;nbsp;integer(bool)&amp;nbsp;&amp;nbsp; bRet
&amp;nbsp;&amp;nbsp;logical*4&amp;nbsp;&amp;nbsp; lret
&amp;nbsp;&amp;nbsp;

&amp;nbsp;&amp;nbsp;!!lret=ClipCursor (rectmain)&amp;nbsp;! to keep cursor within drawing area to stop selecting other option

&amp;nbsp;&amp;nbsp; 10&amp;nbsp;bRet=PeekMessage (msg,hWndMain,WM_LBUTTONUP,WM_RBUTTONUP,PM_REMOVE) ! LRbutton getcha
&amp;nbsp;&amp;nbsp;if (bret==1) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! valid message
&amp;nbsp;&amp;nbsp;&amp;nbsp;if (msg%message==WM_LBUTTONUP) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=32&amp;nbsp;! space
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto 90
&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (msg%message==WM_RBUTTONUP) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=184&amp;nbsp;! f9
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto 90
&amp;nbsp;&amp;nbsp;&amp;nbsp;endif
&amp;nbsp;&amp;nbsp;endif
!&amp;nbsp;&amp;nbsp;next function changed from getmessage to peekmessage 22 Dec
&amp;nbsp;&amp;nbsp;bret=PeekMessage (msg,hWndMain,WM_KEYDOWN,WM_KEYDOWN,PM_REMOVE) ! keydown getcha
&amp;nbsp;&amp;nbsp;if (bret==1) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! valid message
&amp;nbsp;&amp;nbsp;&amp;nbsp;k=127
&amp;nbsp;&amp;nbsp;&amp;nbsp;i=msg%wParam&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! virtual key code
&amp;nbsp;&amp;nbsp;&amp;nbsp;iext=btest(msg%lParam,24)&amp;nbsp;&amp;nbsp; ! extended key flag
&amp;nbsp;&amp;nbsp;&amp;nbsp;if (iext==-1) then&amp;nbsp;&amp;nbsp;! changed from if (iext==1) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!&amp;nbsp;arrow key
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i==37) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! left arrow&amp;nbsp;&amp;nbsp;&amp;nbsp; VK_LEFT 0025
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=-76
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i==38) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! up arrow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VK_UP 0026
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=-85
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i==39) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! right arrow&amp;nbsp;&amp;nbsp; VK_RIGHT 0027
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=-82
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i==40) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! down arrow&amp;nbsp;&amp;nbsp;&amp;nbsp; VK_DOWN 0028
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=-68
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=-i
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endif
&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i&amp;gt;=112.AND.i&amp;lt;=123) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! function keys VK_F1 0077 to VK_F12 007B
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=fkey(i-111)&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i&amp;gt;=44.AND.i&amp;lt;=90) then&amp;nbsp;&amp;nbsp; ! normal keys including 0-9 &amp;amp; A-Z
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i&amp;lt;33) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! special keys
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i&amp;gt;=96.AND.i&amp;lt;=105) then&amp;nbsp; ! numeric keypad&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i-48
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i&amp;gt;=106.AND.i&amp;lt;=111) then ! maths keys
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i-64
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elseif (i&amp;gt;187) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! special keys
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i-144
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k=i
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endif
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (k==27) k=184&amp;nbsp;! Esc = f9 abort 1/11/02 David Graham
&amp;nbsp;&amp;nbsp;&amp;nbsp;endif
&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;! no messagaes
&amp;nbsp;&amp;nbsp;&amp;nbsp;k=0
&amp;nbsp;&amp;nbsp;&amp;nbsp;goto 10
&amp;nbsp;&amp;nbsp;endif

90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !!lret=ClipCursor (NULL)
&amp;nbsp;&amp;nbsp;return
&amp;nbsp;&amp;nbsp;end subroutine&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 11:16:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083130#M122367</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2016-06-02T11:16:54Z</dc:date>
    </item>
    <item>
      <title>I had this issue when the OS</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083131#M122368</link>
      <description>&lt;P&gt;I had this issue when the OS changed from XP to Vista/Windows 7 etc.&lt;/P&gt;

&lt;P&gt;My fix was to call the API function &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;DisableProcessWindowsGhosting&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;using the following interface:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;interface&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ IF DEFINED(_X86_)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; DisableProcessWindowsGhosting() &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ATTRIBUTES DEFAULT , STDCALL, DECORATE, ALIAS: 'DisableProcessWindowsGhosting' :: DisableProcessWindowsGhosting&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ELSE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; DisableProcessWindowsGhosting() &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;BIND&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(C,NAME&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;'DisableProcessWindowsGhosting'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;&lt;FONT color="#006400" face="Consolas" size="2"&gt;!DEC$ ENDIF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;end subroutine&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;end interface&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Good luck&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 11:42:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083131#M122368</guid>
      <dc:creator>Stephen_Sutcliffe1</dc:creator>
      <dc:date>2016-06-02T11:42:40Z</dc:date>
    </item>
    <item>
      <title>Thanks, that appears to have</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083132#M122369</link>
      <description>&lt;P&gt;Thanks, that appears to have fixed it.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 12:38:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083132#M122369</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2016-06-02T12:38:16Z</dc:date>
    </item>
    <item>
      <title>The interface can be</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083133#M122370</link>
      <description>&lt;P&gt;The interface can be simplified as of ifort version 16 to:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;interface
subroutine DisableProcessGhosting () bind(C,name="DisableProcessGhosting")
!DEC$ ATTRIBUTES STDCALL :: DisableProcessGhosting
end subroutine DisableProcessGhosting
end interface&lt;/PRE&gt;

&lt;P&gt;Even in past releases, you could use what was in the _X86_ case without the conditional.&lt;/P&gt;

&lt;P&gt;The interface for this routine has been added to module USER32 for the 17.0 release, which means that you will get compile errors if you use that module and redefine the interface.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 13:13:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083133#M122370</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-06-02T13:13:02Z</dc:date>
    </item>
    <item>
      <title>This problem is still</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083134#M122371</link>
      <description>&lt;P&gt;This problem is still occurring erratically.&lt;/P&gt;

&lt;P&gt;I added the DisableProcessGhosting and that helped but I'm still getting cases where the software freezes when its waiting for input from the user.&lt;/P&gt;

&lt;P&gt;When I try to reproduce the problem I can't then it occurs later. I feel something is getting 'filled up'.&lt;/P&gt;

&lt;P&gt;Do you have any advice on how to track down this sort of problem?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 09:34:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083134#M122371</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2017-04-24T09:34:42Z</dc:date>
    </item>
    <item>
      <title>You might find this (https:/</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083135#M122372</link>
      <description>&lt;P&gt;You might find this (&lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd744765(v=vs.85).aspx"&gt;https://msdn.microsoft.com/en-us/library/windows/desktop/dd744765(v=vs.85).aspx)&lt;/A&gt; of interest. Look at the Best Practices section.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:08:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083135#M122372</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2017-04-24T12:08:21Z</dc:date>
    </item>
    <item>
      <title>I would be very suspicious of</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083136#M122373</link>
      <description>&lt;P&gt;I would be very suspicious of any design that used PeekMessage.&amp;nbsp; Chances are that you are leaving (or not responding correctly to) messages in the message queue for the thread&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 21:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083136#M122373</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2017-04-24T21:35:22Z</dc:date>
    </item>
    <item>
      <title>Thanks for your comments.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083137#M122374</link>
      <description>&lt;P&gt;Thanks for your comments.&lt;/P&gt;

&lt;P&gt;Jim,&lt;/P&gt;

&lt;P&gt;The example shows a long process taking place and the user presses a key an there is no response.&lt;/P&gt;

&lt;P&gt;In my case the program is doing 'nothing' it is just waiting for a user input.&lt;/P&gt;

&lt;P&gt;Ian,&lt;/P&gt;

&lt;P&gt;What would you recommend instead of PeekMessage - do&amp;nbsp;you have a small example?&lt;/P&gt;

&lt;P&gt;------------&lt;/P&gt;

&lt;P&gt;I have added bret=PeekMessage (msg,NULL,0,0,PM_NOREMOVE) which I had added previously in other locations to help.&lt;/P&gt;

&lt;P&gt;The problem is that it is very difficult to recreate the problem, it occasionally&amp;nbsp;happens when the program is waiting for the user to press a key, then having to do Control Alt Delete after it hangs&amp;nbsp;is very annoying. I have made the change above and try it with a few users.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 07:28:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083137#M122374</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2017-04-25T07:28:18Z</dc:date>
    </item>
    <item>
      <title>Would clicking on a window</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083138#M122375</link>
      <description>&lt;P&gt;Would clicking on a window control get you out of the deadlock? (e.d. minimize, max/sizable, X)&lt;/P&gt;

&lt;P&gt;If not, then use the debugger to attach to the process, then pause into it. Hopefully you can discover the deadlock. What may be happening is&amp;nbsp; Windows is hibernating the process when not active (to conserve power). This is typically done on phones or tablets. Maybe this is what they mean by Ghosting.&lt;/P&gt;

&lt;P&gt;Hack (possible), insert&amp;nbsp;alongside your PeekMessage a periodic&amp;nbsp;PokeMessage (you figure out the name) that creates an artificial even into your message handler. You can discard the heartbeat&amp;nbsp;message. &amp;nbsp;The idea is to keep the process alive (not hibernate).&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 12:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083138#M122375</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2017-04-25T12:03:00Z</dc:date>
    </item>
    <item>
      <title>In the process of "ghosting",</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083139#M122376</link>
      <description>&lt;P&gt;In the process of "ghosting", windows hides the "real" window and replaces it with a bitmap copy.&amp;nbsp; (and adds "not responding").&amp;nbsp; There is no active application&amp;nbsp;control or button to click on when in this state.&amp;nbsp; Clicking on the bitmap will usually bring up some sort of "do you want to terminate" dialog.&amp;nbsp; However, this ghosting state is not a permanent condition.&amp;nbsp; If the loop or process causing the hang&amp;nbsp;eventually resolves, control will be restored to the application.&amp;nbsp; In theory calling peekmessage once each 4.9 seconds should be enough to prevent a "not responding"/ghosting message from occurring, but of course it does not resolve any process hang condition itself.&amp;nbsp; Turning off ghosting in that case will be irrelevant.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 13:37:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083139#M122376</guid>
      <dc:creator>garylscott1</dc:creator>
      <dc:date>2017-04-25T13:37:00Z</dc:date>
    </item>
    <item>
      <title>Quote:davidgraham wrote:What</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083140#M122377</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;davidgraham wrote:&lt;BR /&gt;What would you recommend instead of PeekMessage - do&amp;nbsp;you have a small example?&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I would expect all initial mesage retrieval to be done using the typical message loop for the thread.&amp;nbsp; PeekMesage should only be for very specialised stuff.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 20:02:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083140#M122377</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2017-04-25T20:02:03Z</dc:date>
    </item>
    <item>
      <title>Thanks for the suggestions.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083141#M122378</link>
      <description>&lt;P&gt;Thanks for the suggestions. It occasionally hangs after about 10 seconds&amp;nbsp;so it won't have gone into hibernation. I'm not sure if I have fixed it as it's intermittent.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 07:23:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083141#M122378</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2017-04-26T07:23:05Z</dc:date>
    </item>
    <item>
      <title>The PeekMessage() function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083142#M122379</link>
      <description>&lt;P&gt;The PeekMessage() function has two annoying "features":&amp;nbsp;&lt;/P&gt;

&lt;P&gt;(1) It doesn't retrieve messages in the order they were posted, but rather in a predefined order based on the type of message, and,&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;(2) I&lt;SPAN style="font-size: 1em;"&gt;f any window refuses to process any WM_PAINT message, it will repeatedly replay that exact message ad infinitum until it gets processed (which may never happen). &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;These two features act in concert to create interesting single-thread deadlock situations.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;Ask me how I know.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 15:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PeekMessage-causing-freeze/m-p/1083142#M122379</guid>
      <dc:creator>John_Paul_Chacha</dc:creator>
      <dc:date>2017-12-08T15:57:00Z</dc:date>
    </item>
  </channel>
</rss>

