<?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 EnumFontFamiliesEx fails under 32bit but fine under 64bit in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077783#M121035</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm using &lt;FONT size="3"&gt;EnumFontFamiliesEx from ifwin to find the font names on the users computer.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;I have the following code:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; != Process reading the Fonts on this PC&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer function enum_fonts(lFont, pFont, fType, lParam)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use ifwin&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_ENUMLOGFONTEX) :: lFont&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_NEWTEXTMETRICEX) :: pFont&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(DWORD) :: fType&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(LONG_PTR) :: lParam&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: i,len,c&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum_fonts = 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (npcfonts .lt. MAXPCFNT) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; npcfonts = npcfonts + 1&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcfonts(npcfonts) = lFont%elfFullName(1:FNTLEN)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;do i = 2,FNTLEN ! Remove null termination&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = ichar(pcfonts(npcfonts)(i:i))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c .eq. 0) then&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcfonts(npcfonts)(i:FNTLEN) = ' '&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enddo&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end function enum_fonts&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; != Read the Fonts on this PC&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine GetPCFonts()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use ifwin&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(HANDLE) hdc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_LOGFONT) LogFont;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: ret&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hdc = GetDC(0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfCharSet = ANSI_CHARSET&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfPitchAndFamily = 0&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfFaceName = ' '&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfFaceName(1:1) = achar(0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; npcfonts = 0&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = EnumFontFamiliesEx(hdc,LogFont,%REF(enum_fonts),0,0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine GetPCFonts&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;Note npcfonts, pcfonts, FNTLEN(=32)&amp;nbsp;and MAXPCFNT(=1024) are at the module level.&lt;BR /&gt;
	This runs as expected on the 64bit version, giving me 303 fonts on my PC&lt;BR /&gt;
	but in the 32bit version it only returns 1 font. I can't see why it's working in&lt;BR /&gt;
	one case and not the other as the integer default is 4 in both cases and&lt;BR /&gt;
	the declarations see fine otherwise, and I'm always returning 1 from&lt;BR /&gt;
	enum_fonts to continue&amp;nbsp;enumeration.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;Thanks for any help,&lt;/FONT&gt;&lt;BR /&gt;
	&lt;FONT size="3"&gt;David.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Note: I'm using Intel(R) Visual Fortran Composer XE 2013 SP1 Update 6 Integration for Microsoft Visual Studio* 2008, 14.0.0100.2008, Copyright (C) 2002-2014 Intel Corporation as we haven't validated our software under a later version yet.&lt;/P&gt;

&lt;P&gt;Also I can't find any recorded bug fixes for EnumFontFamiliesEx.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Nov 2016 21:40:37 GMT</pubDate>
    <dc:creator>Baird__David</dc:creator>
    <dc:date>2016-11-06T21:40:37Z</dc:date>
    <item>
      <title>EnumFontFamiliesEx fails under 32bit but fine under 64bit</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077783#M121035</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm using &lt;FONT size="3"&gt;EnumFontFamiliesEx from ifwin to find the font names on the users computer.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;I have the following code:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; != Process reading the Fonts on this PC&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer function enum_fonts(lFont, pFont, fType, lParam)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use ifwin&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_ENUMLOGFONTEX) :: lFont&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_NEWTEXTMETRICEX) :: pFont&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(DWORD) :: fType&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(LONG_PTR) :: lParam&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: i,len,c&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum_fonts = 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (npcfonts .lt. MAXPCFNT) then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; npcfonts = npcfonts + 1&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcfonts(npcfonts) = lFont%elfFullName(1:FNTLEN)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;do i = 2,FNTLEN ! Remove null termination&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = ichar(pcfonts(npcfonts)(i:i))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (c .eq. 0) then&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcfonts(npcfonts)(i:FNTLEN) = ' '&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enddo&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end function enum_fonts&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; != Read the Fonts on this PC&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine GetPCFonts()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use ifwin&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(HANDLE) hdc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type (T_LOGFONT) LogFont;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: ret&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hdc = GetDC(0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfCharSet = ANSI_CHARSET&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfPitchAndFamily = 0&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfFaceName = ' '&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogFont%lfFaceName(1:1) = achar(0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; npcfonts = 0&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = EnumFontFamiliesEx(hdc,LogFont,%REF(enum_fonts),0,0)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine GetPCFonts&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;Note npcfonts, pcfonts, FNTLEN(=32)&amp;nbsp;and MAXPCFNT(=1024) are at the module level.&lt;BR /&gt;
	This runs as expected on the 64bit version, giving me 303 fonts on my PC&lt;BR /&gt;
	but in the 32bit version it only returns 1 font. I can't see why it's working in&lt;BR /&gt;
	one case and not the other as the integer default is 4 in both cases and&lt;BR /&gt;
	the declarations see fine otherwise, and I'm always returning 1 from&lt;BR /&gt;
	enum_fonts to continue&amp;nbsp;enumeration.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT size="3"&gt;Thanks for any help,&lt;/FONT&gt;&lt;BR /&gt;
	&lt;FONT size="3"&gt;David.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;Note: I'm using Intel(R) Visual Fortran Composer XE 2013 SP1 Update 6 Integration for Microsoft Visual Studio* 2008, 14.0.0100.2008, Copyright (C) 2002-2014 Intel Corporation as we haven't validated our software under a later version yet.&lt;/P&gt;

&lt;P&gt;Also I can't find any recorded bug fixes for EnumFontFamiliesEx.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2016 21:40:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077783#M121035</guid>
      <dc:creator>Baird__David</dc:creator>
      <dc:date>2016-11-06T21:40:37Z</dc:date>
    </item>
    <item>
      <title>All Windows API callback</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077784#M121036</link>
      <description>&lt;P&gt;All Windows API callback functions must use the STDCALL calling convention. On Intel 64 this doesn't matter, but it does on IA-32. Also, your callback routine doesn't specify that the last two arguments are passed by value.&lt;/P&gt;

&lt;P&gt;Try this.In your callback routine, add:&lt;/P&gt;

&lt;P&gt;!DEC$ ATTRIBUTES STDCALL, REFERENCE ::enum_fonts&lt;BR /&gt;
	!DEC$ ATTRIBUTES VALUE :: ftype, lParam&lt;/P&gt;

&lt;P&gt;I did this and it works.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 16:18:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077784#M121036</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-07T16:18:57Z</dc:date>
    </item>
    <item>
      <title>Thanks so much Steve, that's</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077785#M121037</link>
      <description>&lt;P&gt;Thanks so much Steve, that's gold, very much appreciated.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I've been looking but can't find much documentation on the ifwin library beyond three pages in the help, which don't give any details like this.&lt;/P&gt;

&lt;P&gt;Is there a document that goes into more detail?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 19:03:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077785#M121037</guid>
      <dc:creator>Baird__David</dc:creator>
      <dc:date>2016-11-07T19:03:04Z</dc:date>
    </item>
    <item>
      <title>MSDN Library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077786#M121038</link>
      <description>&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/default.aspx"&gt;MSDN Library&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You'll probably also want to read&amp;nbsp;&lt;A href="https://software.intel.com/en-us/compiler_winapp_f" rel="nofollow" style="box-sizing: border-box; color: rgb(0, 174, 239); outline: 0px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px;" target="_blank"&gt;Using Intel® Visual Fortran to Create and Build Windows*-Based Applications&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 19:14:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077786#M121038</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-07T19:14:19Z</dc:date>
    </item>
    <item>
      <title>Thanks, I'm very familar with</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077787#M121039</link>
      <description>&lt;P&gt;Thanks, I'm very familar with the Windows Platform SDK, what I need is a document that shows how to declare the calls&amp;nbsp;on the Fortran side.&lt;BR /&gt;
	&amp;nbsp;reading ifwinty.f90 gives me most of what I need but not the information on declaring the callbacks.&amp;nbsp;Your comment gives&amp;nbsp;me a good start. I've read the &lt;A href="https://software.intel.com/en-us/compiler_winapp_f"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;Using Intel® Visual Fortran to Create and Build Windows*-Based Applications&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt; but it's pretty lightweight, not&amp;nbsp;the full reference manual I was hoping for. Thanks again, much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 19:39:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077787#M121039</guid>
      <dc:creator>Baird__David</dc:creator>
      <dc:date>2016-11-07T19:39:37Z</dc:date>
    </item>
    <item>
      <title>MSDN is the "full reference</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077788#M121040</link>
      <description>&lt;P&gt;MSDN is the "full reference manual". There are also lots of &lt;A href="https://software.intel.com/en-us/product-code-samples"&gt;examples&lt;/A&gt; we provide. It's not really possible for us to describe how to use each and every API routine from Fortran - the best we can do is some general guidelines. I'll admit that the STDCALL requirement for callbacks can be obscure, but it's a fundamental aspect of Windows API programming.&lt;/P&gt;

&lt;P&gt;There once was a book "Compaq Visual Fortran: A Guide to Creating Windows Applications" that went into this topic in great detail. It is still mostly applicable to Intel Visual Fortran, but it hasn't been published in a while and copies are expensive.&lt;/P&gt;

&lt;P&gt;You might want to start with&amp;nbsp;https://msdn.microsoft.com/library/windows/desktop/ff381399(v=vs.85).aspx - while this is C++ oriented, a lot of the text is generally applicable to Fortran. Even here, though, the need for STDCALL is obscure - possibly because this is hidden in the C++ header files. We've started to add abstract interfaces for callbacks to our modules, specifying STDCALL, so that may help, but it wouldn't have helped you here. Luckily, once you become aware of this it becomes second-nature. And, as I said, it is a 32-bit issue only since on x64 there is only one calling convention.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 20:11:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077788#M121040</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-07T20:11:01Z</dc:date>
    </item>
    <item>
      <title>David,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077789#M121041</link>
      <description>&lt;P abp="523"&gt;David,&lt;/P&gt;

&lt;P abp="524"&gt;the Lawrence book is still available.&amp;nbsp;Amazon ask prices up to USD 80, our local Dutch (book)store (bol.com) has a price&amp;nbsp;euro 60. You can obtain the examples of the book via the site&amp;nbsp; &lt;A href="http://booksite.elsevier.com/9781555582494/" abp="525"&gt;http://booksite.elsevier.com/9781555582494/&lt;/A&gt;&lt;/P&gt;

&lt;P abp="526"&gt;Unfortunately, the book is&amp;nbsp;out-of-data. It is published in 2002 and thus has not used&amp;nbsp;Fortran 2003&amp;nbsp;with its&amp;nbsp;ISO_C_BINDING.stuff. It thus does not show you how to wrtite a window program in a strict standard-conforming and compiler-independent way. It uses&amp;nbsp;the Compaq compiler now known as &amp;nbsp;Intel.&amp;nbsp;The Fortran&amp;nbsp;&lt;EM abp="527"&gt;introduction&lt;/EM&gt;&amp;nbsp; aspect is the weak point. But there are a number of more advanced topics that are handled very well. For that reason I can recomment it. (Of course, always besides the Petzold book!)&lt;/P&gt;

&lt;P abp="528"&gt;Robert&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 14:47:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077789#M121041</guid>
      <dc:creator>Robert_van_Amerongen</dc:creator>
      <dc:date>2016-11-08T14:47:15Z</dc:date>
    </item>
    <item>
      <title>There isn't a way to write a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077790#M121042</link>
      <description>&lt;P&gt;There isn't a way to write a Windows API program in a compiler-independent way. You can generally avoid nonstandard code in your own application with some effort. The Lawrence book is still very applicable.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 18:49:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077790#M121042</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-08T18:49:00Z</dc:date>
    </item>
    <item>
      <title>Thanks everyone for the input</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077791#M121043</link>
      <description>&lt;P&gt;Thanks everyone for the input, I've ordered a copy from Better World Books who sell second hand books and have free shipping to any country:&lt;BR /&gt;
	&lt;A href="http://www.betterworldbooks.com/Compaq-Visual-FORTRAN--A-Guide-to-Creating-Windows-Applications-id-9781555582494.aspx"&gt;&lt;/A&gt;&lt;A href="http://www.betterworldbooks.com/Compaq-Visual-FORTRAN--A-Guide-to-Creating-Windows-Applications-id-9781555582494.aspx" target="_blank"&gt;http://www.betterworldbooks.com/Compaq-Visual-FORTRAN--A-Guide-to-Creating-Windows-Applications-id-9781555582494.aspx&lt;/A&gt;&lt;BR /&gt;
	Mine cost US$31 including shipping. Better Wortd also donate a book to charity for each one you buy.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 20:11:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077791#M121043</guid>
      <dc:creator>Baird__David</dc:creator>
      <dc:date>2016-11-08T20:11:20Z</dc:date>
    </item>
    <item>
      <title>In my post #7 I was not clear</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077792#M121044</link>
      <description>&lt;P&gt;In my post #7 I was not clear. With "compiler-independent" I did mean the situation of having only one Fortran file(or set of files) that can be used in combination with more that one compiler. My experience with the WinAPI, OpenGL, freeglut&amp;nbsp;is that for 64 bits it always works fine. For 32 bits you need to add directives. A drawback, of course, is that you have to write yourself&amp;nbsp;a module with the&amp;nbsp;named constants, structs and interfaces .&lt;/P&gt;

&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 14:48:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077792#M121044</guid>
      <dc:creator>Robert_van_Amerongen</dc:creator>
      <dc:date>2016-11-09T14:48:58Z</dc:date>
    </item>
    <item>
      <title>The nice thing is that !DEC$</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077793#M121045</link>
      <description>&lt;P&gt;The nice thing is that !DEC$ ATTRIBUTES STDCALL and !GCC$ ATTRIBUTES STDCALL are pretty much compatible for procedures with the BIND attribute, so a single source with both ATTRIBUTES declarations generally works fine in both gfortran and ifort, 32 bits and 64 bits. The worst incompatibility I can recall is that C_LONG ends up being 8 in cygwin, so Windows data types that are dependent on this constant should be made dependent on another constant for Windows code intended for use in cygwin. Doesn't Windows C code potentially suffer for the same problem with Windows header files?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2016 23:41:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077793#M121045</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2016-11-26T23:41:06Z</dc:date>
    </item>
    <item>
      <title>I don't see how C_LONG can</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077794#M121046</link>
      <description>&lt;P&gt;I don't see how C_LONG can change based on using Cygwin - at least using Intel Fortran. Maybe gfortran handles it differently.&lt;/P&gt;

&lt;P&gt;In Intel Fortran, using our modules, you'd be using named constants such as DWORD that always are the right kind. Windows C code would similarly be using typedefs declared in windows.h.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 01:06:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077794#M121046</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-27T01:06:58Z</dc:date>
    </item>
    <item>
      <title>The issue is that if you look</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077795#M121047</link>
      <description>&lt;P&gt;The issue is that if you look in &lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx"&gt;https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx&lt;/A&gt; it says that DWORD is defined in IntSafe.h as typedef unsigned long DWORD; and the cygwin headers end up with sizeof(long) = 8. Thus cygwin+windows headers produce the wrong effective KIND for DWORD, and if the programmer says something like INTEGER, PARAMETER, PUBLIC :: DWORD = C_LONG, the result would be DWORD = 8 in 64-bit code.&lt;/P&gt;

&lt;P&gt;BTW, gfortran looks like they are finally going to change the KIND of the internal LEN of CHARACTER variables to be C_PTRDIFF_T instead of the previous C_INT. I would have thought that C_SIZE_T (doesn't ifort use this?)&amp;nbsp;were more appropriate.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 06:36:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077795#M121047</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2016-11-27T06:36:12Z</dc:date>
    </item>
    <item>
      <title>Ah, Cygwin C headers -</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077796#M121048</link>
      <description>&lt;P&gt;Ah, Cygwin C headers - certainly if you're using gcc in Cygwin I could see (!) a problem there. Doesn't affect ifort. Yes, ifort uses C_SIZE_T for character lengths.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 14:26:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/EnumFontFamiliesEx-fails-under-32bit-but-fine-under-64bit/m-p/1077796#M121048</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-27T14:26:33Z</dc:date>
    </item>
  </channel>
</rss>

