[Gambas-user] Development Version

Scott, Vince Vince.Scott at ...1171...
Mon Apr 24 22:11:07 CEST 2006


I am using the Extern ability of the development version to access C
libraries. I am having an issue figuring out how to pass a char* or to
get a string from a C function. Has anyone used this feature and do you
know the syntax to make it work?

// C Side of things


int foo(char* p_str)
{
   sprintf(p_str, "%s\n", "test");

   return sizeof(p_str);
}

char* foo2()
{
   char str[6];

    sprintf(p_str, "%s\n", "test");

   return p_str;
}


How do I call these from Gambas to get the string returned? Everything I
have tried crash the app.


Thanks,
Vince








This communication is confidential and may be legally privileged.  If you are not the intended recipient, (i) please do not read or disclose to others, (ii) please notify the sender by reply mail, and (iii) please delete this communication from your system.  Failure to follow this process may be unlawful.  Thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060424/b03daf2f/attachment.html>


More information about the User mailing list