<div dir="ltr">

<span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">On 7 August 2018 at 05:12, Eliot Miranda<span> </span></span><span dir="ltr" style="font-size:small;text-decoration-style:initial;text-decoration-color:initial"><<a href="mailto:eliot.miranda@gmail.com" target="_blank" style="color:rgb(17,85,204)">eliot.miranda@gmail.com</a>></span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>wrote:</span><br style="font-size:small;text-decoration-style:initial;text-decoration-color:initial"><blockquote class="gmail_quote" style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi Ben, </div></blockquote><blockquote class="gmail_quote" style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Feel free to make this edit and commit</div></div></div></div></blockquote><div><br></div><div>I'm pushing changes here...</div><div><a href="https://github.com/bencoman/opensmalltalk-vm/tree/MinimalisticHeadless-x64-msvc2017">https://github.com/bencoman/opensmalltalk-vm/tree/MinimalisticHeadless-x64-msvc2017</a><br></div><div><br></div><div>and the diff can be tracked here...</div><div><a href="https://github.com/bencoman/opensmalltalk-vm/compare/MinimalisticHeadless...bencoman:MinimalisticHeadless-x64-msvc2017">https://github.com/bencoman/opensmalltalk-vm/compare/MinimalisticHeadless...bencoman:MinimalisticHeadless-x64-msvc2017</a><br></div><div><br></div><div><br></div><div class="gmail_extra">------------------------<br><div class="gmail_quote">On 6 August 2018 at 13:22, Ben Coman <span dir="ltr"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 6 August 2018 at 11:50, Ben Coman <<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>> wrote:<br></span><br>
<a href="https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/windows/sqPlatformSpecific-Win32.c#L80" rel="noreferrer" target="_blank">https://github.com/ronsaldo/<wbr>opensmalltalk-vm/blob/<wbr>be7b1c03/platforms/<wbr>minheadless/windows/<wbr>sqPlatformSpecific-Win32.c#L80</a><br>
 typedef HRESULT WINAPI (*<wbr>SetProcessDpiAwarenessFunction<wbr>Pointer) (int awareness);<br>
    C2059 sqPlatformSpecific-Win32.c:80 syntax error: '('<br>
    E0651 a calling convention may not be followed by a nested declarator.<br>
<br>
The following change reduces build errors to 1...<br>
  typedef HRESULT (*<wbr>SetProcessDpiAwarenessFunction<wbr>Pointer) (int awareness);<br>
<br>
but I'm not sure of the implications.</blockquote><div><br></div><div>I found the correct solution to this...</div><div>"The trick is placing the [call declaration] inside the parentheses"</div><div><a href="https://stackoverflow.com/questions/4830355/function-pointer-and-calling-convention">https://stackoverflow.com/questions/4830355/function-pointer-and-calling-convention</a><br></div><div><br></div><div>i.e. the following compiles cleanly</div><div>

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">typedef HRESULT (WINAPI *</span><wbr style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">SetProcessDpiAwarenessFunction</span><wbr style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Pointer) (int awareness);</span>

<br></div><div><br></div><div><br></div><div>-----------------------------</div><div>Now running the VM (without parameters) I get...</div><div><div>   Debug Assertion Failed!</div><div>   Program: ...\x64-Debug\dist\pharo.exe</div><div>   File: minkernel\crts\ucrt\src\appcrt\tran\amd64\ieee.c </div><div>   Line: 106</div><div>   Expression: (mask&~(_MCW_DN | _MCW_EM | _MCW_RC))==0</div></div><div><br></div><div>at the call to _controlfp(FPU_DEFAULT, _MCW_EM | _MCW_RC | _MCW_PC | _MCW_IC);</div><div><a href="https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/windows/sqPlatformSpecific-Win32.c#L118">https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/windows/sqPlatformSpecific-Win32.c#L118</a><br></div><div><br></div><div><br></div><div>According to <a href="https://msdn.microsoft.com/en-us/library/e9b52ceh.aspx">https://msdn.microsoft.com/en-us/library/e9b52ceh.aspx</a></div><div>x64 does not support _MCW_PC or _MCW_IC</div><div>

<div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">but I'm clueless about the implications of these FPU flags.</div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Could our math guys please advise?</div><br></div><div>Eliminating those two flags allows a VM run successfully without loading an Image.</div><div>i.e. it successfully passes...<br></div><div>   osvm_initialize();</div><div>   osvm_parseCommandLineArguments(argc, argv);</div><div>   osvm_initializeVM();</div><div><br></div><div>Next is to try loading an Image.</div><div><br></div><div>cheers -ben</div></div></div></div>