[Gambas-user] Get last errno from external function call

vuott at tutanota.com vuott at tutanota.com
Thu Oct 6 01:30:28 CEST 2022


Out of curiosity, maybe you could also try "System.GetExternSymbol ()":

   Dim p As Pointer

   p = System.GetExternSymbol("libgpiod", "errno")

   Print Int@(p)




5 ott 2022, 20:36 da benoit.minisini at gambas-basic.org:

> Le 05/10/2022 à 04:29, Matheus Castello a écrit :
>
>> Hi guys,
>>
>> I'm new to Gambas3, I'm trying to use it for embedded devices and I'm doing some external function calls. There is some way in Gambas3 to get, or Gambas runtime stores, the last errno from a external function call?
>>
>> I tried to get it directly from libc `__errno_location` but surely the runtime must be making other calls that are overwriting the errno.
>>
>> Thanks in advance,
>> Matheus Castello
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> The 'System.Error' property returns the value of errno.
>
> Regards,
>
> -- 
> Benoît Minisini.
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221006/482e920e/attachment-0001.htm>


More information about the User mailing list