[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pointers problem
[Thread Prev] | [Thread Next]
- Subject: Re: pointers problem
- From: Lee <t.lee.davidson@xxxxxxxxx>
- Date: Thu, 15 Oct 2026 19:01:18 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 10/15/26 11:03 AM, valaquarus wrote:
Something is wrong here but I don't know what as I don't understand that much about pointers. Sometime it goes to a segmentation error.
<snip the code> Just FYI, it might be more helpful if you would provide a project archive instead of expecting people to copy and paste. Where is the documentation for libqrencode to be found? Why is "As Integer" in "Private Extern QRcode_free(qrcode As Pointer) 'As Integer" commented out?You create a new structure with "Dim stQr As New QRcode", then set it to Null, then assign the pointer returned from the Extern function to it. Why? If the QRcode_encodeString function returns a struct, then you should probably do: Private Extern QRcode_encodeString(sText As String, iVersion As Integer, iLevel As Integer, iHint As Integer, iCasesensitive As Integer) As QRcode
It has been a while since I worked with an external library function that returns a pointer to a struct, so I welcome being corrected on that.
-- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
| pointers problem | valaquarus <valaquarus@xxxxxxxxx> |