Passing a string to a BlitzMax dll?

BlitzMax Forums/BlitzMax Programming/Passing a string to a BlitzMax dll?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have determined that the MemFree in the above example will crash BlitzMax. You should not free the byte ptr that gets passed to the dll!

Function PrintText(htext:Byte Ptr)
	text$=String.fromcstring(htext)
	Print text
EndFunction