So, here's your disclaimer: I'm an idiot, have absolutely no programming experience with DLLs, consider them black vodoo magic vastly beyond my abilities, and should probably not answer.


But did you know about _chr?

Quote:

_chr(STRING* string);

Converts a STRING to a null-terminated character array; sometimes useful for functions called from external languages.

Parameters:
string - STRING* or char* pointer to be converted.

Returns:
char* - pointer to the char array contained in the STRING*.

Speed:
Fast

Remarks:
This function automatically detects whether its argument is a STRING* or a char*; the char* string must be null-terminated and contain at least 3 characters.

Example:
my_dll_function(_chr(pMyString));


(for completeness' sake, there's also _str, which turns a char*-string to a STRING*-string)


Again, I'm not building on any kind of experience here, so apologies if this doesn't help at all. It did kinda fit the question, though laugh

Last edited by Error014; 12/16/12 12:38. Reason: corrected tags

Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!