well erm not to put a chrimp in your plans but; why exactly are you trying to make functions that already exist in DarkBASIC and DarkBASIC Enhanced?
well anyways why not simply delete what you allocate in the DLL_PROCESS_DETACH?
also you a Pointer based string like LPSTR; this is the common meathod for passing strings back'n'forth in languages as your simply passing the pointer address not the actual memory allocation.
typedef struct TCHAR {
*TCHAR NextChr;
unsigned short Chr;
} TCHAR, *LPTCHR;
LPTCHR *myString;
this way you can them simply create the string on the fly;
DWORD function ReverseString( LPSTR StringIn )
{
*myString = (LPTCHR) StringIn;
int size = SizeOf(myString);
unsigned short ReverseString[size];
for((int)i=0; i>=size; i++)
{
for((int)j=size; i<=0; i--)
{
ReverseString[j]=myString[i];
}
}
return (DWORD) (myString = *ReverseString[]);
}
or ya know something like that