[Gambas-user] Working with .so library

Admin admin at allunix.ru
Wed Jun 26 07:46:03 CEST 2019


26.06.2019 9:06, Cedron Dawg пишет:
> I have to say you are giving off somewhat of a petulant vibe.

Oh, sorry about that, I honestly had no intention to. I really 
appreciate all the help.

>
> One of the techniques I have used is a Alloc with plenty of space to spare.  In most cases, the function call like yours also has an argument for the maximum number of bytes the function will return, so you can usually use that for the minimum size.  Then you can use the Sting@ function to pull the string value out of the allocated memory.  Then you use the Free function to release the allocated memory.
>
> For fixed length strings in a structure, I have used a Byte array of the specified size and then the .ToString() method to get the string out of that.
>
> I've only really dealt with pure ASCII strings, but I think UTF-8 will also work with these.

Thanks for the idea, I'll give it a try! Like I said, that's a minor 
issue for me, it's almost always possible to just get an integer value 
of a message (i.e. a error number, not an ectual error description) and 
just parse it from a text base I already have. But huge thanks for the tip.



> Ced
>
> ----- Original Message -----
> From: "Admin" <admin at allunix.ru>
> To: "user" <user at lists.gambas-basic.org>
> Sent: Tuesday, June 25, 2019 9:13:27 PM
> Subject: Re: [Gambas-user] Working with .so library
>
> So, I guess that's a no. It's kinda sad, but ok, minor issue.
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>



More information about the User mailing list