<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000">Well I did find an example, An I guess it's so simple.......<br><br>thanks all.<br><br><div id="f5eda3cc-6016-4a73-8ad1-84632f761d74" data-marker="">Thank You<br>Brian G</div><br><hr id="zwchr" data-marker=""><div data-marker=""><b>From: </b>"Brian" <brian@westwoodsvcs.com><br><b>To: </b>"Gambas mailing list" <user@lists.gambas-basic.org><br><b>Sent: </b>Saturday, March 14, 2020 11:14:39 AM<br><b>Subject: </b>[Gambas-user] Trouble passing struct to my clib<br></div><br><div data-marker=""><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>I am trying to pass a structure to my clib</div><br><div>Reading the documentation, struct is like a global class but an embedded struct is like an unpacked c struct access via a virtual object.</div><br><div>You can create embedded structure arrays where the data is created directly in the array, statically</div><br><div> My understanding then is as follows</div><br><div>struct xx</div><div> a as integer</div><div>end struct</div><br><div>dim y[1] as xx should create an array where the structure is embedded already allocated. Correct?</div><br><div>but y[0].a = 1 yields an error I must do y[0] = new xx ... ummm maybe I don't understand embedded correctly</div><div> as the doc says that Gambas creates a virtual object to work with the data.</div><br><div>Then I am having a problem understanding how to actually pass the address of y[0] or y for that matter to my c function</div><br><div>I would love if someone could point me in the correct direction. Please</div><br><br><div>Thank You<br>Brian G</div></div><br><br>----[ http://gambaswiki.org/wiki/doc/netiquette ]----<br></div></div></body></html>