Hi,
> I don’t know if there is support for that (I don’t have the time to
check it in detail now).
> But, as a workaround, you may try
>
> - return a void*
>
> myFunction
> ^self ffiCall: #(void* myFunction ( void ) )
>
> - and then do the transformation yourself using
Win32WideString>>#fromHandle:
I checked, Win32WideString class>>#asExternalTypeOn: is defined, and it
creates FFIExternalObjectType(Win32WideString) nicely with
^self ffiCall: #(Win32WideString myFunction ( void ) )
I also tried the other approach:
^self ffiCall: #(void* myFunction ( void ) )
and the transformation Win32WideString>>#fromHandle
Interestingly, in both cases I get
however I cannot pinpoint the reason for this.
> What you are discovering here would be very useful as a
section/chapter in
> the uFFI booklet.
Thanks for the invitation, yes, it would be nice to participate, I'll
try to prepare something when I get to the bottom of the challenge :-)
Thanks and best wishes,
Tomaz