Retrieving a string from a c file

Miscellaneous Forums/Win32 Discussion/Retrieving a string from a c file

Hi teamonkey,

To do it with a function the way you want you do this:

code.c
char *myFunction(  ) {
    return "this";
}

code.bmx
Import "code.c"

Extern

Function myFunction$z(  )

End Extern

Then just call the function to get the string..

DebugLog myFunction(  )

I don't really know why it works ok with functions but not variables.. I'll have to look into it a bit more!

Regards,
Chris