the 'string' passed from the script to the dll is widechars
code:
void DLL_EXPORT ConectionLog(WCHAR* sometext)
{
MessageBoxW(0, sometext, sometext, 0);
}
code:
to convert from unicode to ansi
void DLL_EXPORT SomeFunction(WCHAR* sometext)
{
int a = SysStringLen(sometext)+1;
char *ansistr = (char*)malloc ;
;
WideCharToMultiByte(CP_ACP,
                        0,
                        sometext,
                        -1,
                        ansistr,
                        a,
                        NULL,
                        NULL);
//...use the strings, then free their memory:
//delete[] ansistr;
MessageBox(0, ansistr, "hello", 0);
free(ansistr);
}