<div dir="ltr"><div>..and here too:</div><div><a href="https://www.gambas-it.org/wiki/index.php?title=Guide_della_comunit%C3%A0#Puntatori">https://www.gambas-it.org/wiki/index.php?title=Guide_della_comunit%C3%A0#Puntatori</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 26 lug 2019 alle ore 10:50 Gianluigi <<a href="mailto:bagonergi@gmail.com">bagonergi@gmail.com</a>> ha scritto:<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>Take a look here:<br></div><div><a href="http://www.gambas-it.org/smf/index.php?topic=7165.msg46326#msg46326" target="_blank">http://www.gambas-it.org/smf/index.php?topic=7165.msg46326#msg46326</a></div><div><br></div><div>Regards</div><div>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 26 lug 2019 alle ore 02:58 Admin <<a href="mailto:admin@allunix.ru" target="_blank">admin@allunix.ru</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">BTW, can Gambas point to an array? I mean, there's datatype in C called <br>
bytearray, and some of my .so library's procedures return or request a <br>
bytearray variable. Gambas can declare a Byte[] but can't VarPtr to it. <br>
So that's a no, right? Just making sure, it's not that important, but <br>
maybe there's a way?<br>
<br>
26.06.2019 8:13, Admin пишет:<br>
> So, I guess that's a no. It's kinda sad, but ok, minor issue.<br>
><br>
> 25.06.2019 15:21, Admin пишет:<br>
>> Ok, this question I have for a very long time now:<br>
>> Sometimes I need to recieve a string variable from a library.<br>
>> Usually it asks me to provide a pointer to a string where it would <br>
>> store it's output.<br>
>> Problem is output is usually in WCHAR_T, while the string is always <br>
>> in UTF-8.<br>
>> When I provide my strings to a library - it's not a problem, i just <br>
>> use Conv(MyString, "UTF-8", "WCHAR_T") and it's all ok.<br>
>> But when I recieve a string from a library I rearly even know the <br>
>> lenght of the output I expect. But even if I do, that would be a <br>
>> lenght of a WCAHR_T string, and the size of UTF string would be <br>
>> defferent.<br>
>> So in most cases if I recieve a string like this:<br>
>><br>
>> libfptr_get_param_str(fptr, LIBFPTR_PARAM_MODEL_NAME, <br>
>> VarPtr(KKMmodel), stringsize)<br>
>><br>
>> and then try to<br>
>><br>
>> message(Conv(KKMmodel, "WCHAR_T", "UTF-8"))<br>
>><br>
>> I will get a "bad string conversion".<br>
>><br>
>> And I think it's totally fair, because, ok, I know that the string <br>
>> will be 18 chars long, but if I make KKMmodel declared as String and <br>
>> 18 chars long - is it even relevant?  It would be 18 UTF8 chars long, <br>
>> which has nothing to do with the lenght of WCHAR_T string.<br>
>><br>
>> So, is there a way to correctly recieve WCHAR_T strings through <br>
>> pointers in Gambas?<br>
>><br>
>> 25.06.2019 15:07, Tobias Boege пишет:<br>
>>> On Tue, 25 Jun 2019, David Silverwood via User wrote:<br>
>>>>> On Tuesday, June 25, 2019, 09:54:07 AM GMT+2, Benoît Minisini <br>
>>>>> <<a href="mailto:g4mba5@gmail.com" target="_blank">g4mba5@gmail.com</a>> wrote:<br>
>>>>>     Le 25/06/2019 à 05:56, Admin a écrit :<br>
>>>>>> Ok, answering my own question, it's easier then I thought. Gambas<br>
>>>>>> actually allows the same enum declaration as C does, I mean I can <br>
>>>>>> use<br>
>>>>>> multiple strings despite it's never mentioned in documentation. <br>
>>>>>> So it's<br>
>>>>>> basically .h file copy-paste process, nothing more.<br>
>>>>>><br>
>>>>> What is not mentioned in <a href="http://gambaswiki.org/lang/enumdecl" rel="noreferrer" target="_blank">http://gambaswiki.org/lang/enumdecl</a> ?<br>
>>>>   i get a 404 error when trying to access that page?<br>
>>> There's always a /wiki after the .org, which Benoît forgot.<br>
>>><br>
>><br>
>><br>
>> ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
>><br>
>><br>
>><br>
><br>
><br>
> ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
><br>
><br>
><br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>
</blockquote></div>