Archived

This forum has been archived. Please start a new discussion on GitHub.

Wrap ICE in a win32 dll problem

I write two C/S testing program, the server application receive the client's output string, and display on the screen. Slice may defined as:
void printMsg(string msg);

I wrap ICE client facilities in a Visual C++ win32 dll, and when the client application calling printMsg, sometime, it failed.

printMsg("this is a test"); //always ok
std::string strbuf;
read_file("text.txt", strbuf); //read content of "text.txt" to strbuf
printMsg(strbuf); //always ok

strbuf="this is another test";
printMsg(strbuf); //always failed

Why? I'm so confused.

Comments