associate string in dll
-
my dll code:
void Init()
{
...
CreateThread(NULL, 0, Fun, this, 0, &dw);
...
}DWORD WINAPI Fun(LPVOID lParam)
{
int i = 0;while(1)
{
CString cstr;
cstr = "abc"; // all rightwhile(i++>10)
{
CString cstr2;
cstr2 = "eee"; // runtime error!
}
}}
but if I change while(i++>10) to while(i++>2) CString cstr2 = "eee"; was all right.
-
my dll code:
void Init()
{
...
CreateThread(NULL, 0, Fun, this, 0, &dw);
...
}DWORD WINAPI Fun(LPVOID lParam)
{
int i = 0;while(1)
{
CString cstr;
cstr = "abc"; // all rightwhile(i++>10)
{
CString cstr2;
cstr2 = "eee"; // runtime error!
}
}}
but if I change while(i++>10) to while(i++>2) CString cstr2 = "eee"; was all right.
What was the exact error message? Why don't you use the debugger? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]