Passing /n in a String to C

BlitzMax Forums/BlitzMax Programming/Passing /n in a String to C

Gabriel(Posted 2006) [#1]
I can't seem to find a way to pass a string with a /n newline in it to c. The function I'm calling ( in a DLL ) is definitely set to use /n as a newline, but I can't get it there. Any ideas?


Byteemoz(Posted 2006) [#2]
You mean something like that?
Import pub.win32

Global MyDLL=LoadLibraryA( "mylib" ) ' load "mylib.dll" 	
	
Global MyStringFunc(str$z)=getprocaddress(MyDLL,"my_string_func")

MyStringFunc "Line1~nLine2~nLine3~nLine4"
(from: http://chris-camacho.com/index.php?option=com_content&task=view&id=16&Itemid=28 )

--Byteemoz


Gabriel(Posted 2006) [#3]
Oooooh.. yep, ~n does it just great. Thanks man.