<div dir="ltr"><div>After working around Win32Window externalType with light surgery (in plain English, this translates to heavy butchery), the next hurdle is that</div><div>    (Win32Window on: Win32Window getFocus) getDC.</div><div>will trigger an Error (could not coerce arguments).</div><div>I cannot pass a Win32Window to <apicall: Win32HDC 'GetDC' (Win32Window) module: 'user32.dll'></div><div>I cannot pass its value either...</div><div>I'm really stuck here.</div><div>Most of my FFI stuff rely on using type aliases and is currently dysfunctional, so having a basic example working might be helpful...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 22 août 2022 à 15:02, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hmm, I naivly tried (Wind32Handle allSubclassesDo: #doneCompiling) but it's not sufficient, Win32Window new still returns a Win32Handle.<br></div><div>It seems that what triggers #generateTypeAccessor is a query to (SomeExternalStructureSubclass externalType).</div><div>But if we already queried (SomeExternalStructureSubclasUpperInHierarchy externalType), then externalType will be inherited from this intermediate subclass, not from 
ExternalStructure, and thus #generateTypeAccessor won't be triggered...</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 22 août 2022 à 14:43, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div>in recent FFI, I tried to evaluate the example in Win32Window comment.</div><div>I would expect (Win32Window getFocus) to return an instance of Win32Window.</div><div>But it returns a (Small)Integer.</div><div>Using (Win32Window new value: Win32Window getFocus) as a workaround does not work either, we cannot send getDC to it, because Win32Window new returns an instance of Win32Handle, not Win32Window... Because externalType has not been (*auto)generated for subclasses of Win32Handle... Probably because they have no (MC) method definition recognized as isExternalStructureFieldDefinition...</div><div>How to make simple examples like this work?</div><div><br></div><div>Nicolas<br></div><div><br> </div></div>
</blockquote></div>
</blockquote></div>