Thanks Jon,
I see your logic but the mdlStringList_getMember() function returns a WCharCP *, which is totally valid for the first 1,000 lines when treated as a pointer to a WChar array (perhaps the 8bit is converted to WChar within the funtion) . Here's the API Doc:
If you are suggesting that its actually a pointer to a 8bit Multibyte string then would not sending that string to mdlOutput_message which is expecting WCharCP produce garbage and not a valid file name string for the first 1000 lines?
Additionally, the 32bit implementation in v8i produces the exact same corruption and the v8i API returns char** to the string (8bit). Following is the 32bit code in v8i that displays the exact same corruption and does not use WChars:
char filestr[MAXFILELENGTH]; char *str; for (i=0;i<mdlStringList_size(strListP);i++) { mdlStringList_getMember(&str, NULL, strListP, i); strcpy(filestr, str); //Msg(filestr); if (!EXIST(filestr)) { //file name is corrupt here ...
I did try to use MultiByteToWideChar with the returned pointer in CONNECT but a valid filename string was not produced.