ahh,its so bad a week,i can't get the way. Plz,someone help .
i create a simple object using atl(vs2005).code like:
DWORD WINAPI IPEventProc( LPVOID lpParameter)
{
OVERLAPPED overlap;
DWORD ret;
HANDLE handle;
handle=NULL;
overlap.hEvent = WSACreateEvent();
ret = NotifyAddrChange(&handle, &overlap);
if(WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0 )
{
Fire_IPChange(L"darling , i'm coming...");
}
}
StartNotifyAddrChange(VARIANT_BOOL* bSucc)
{
...
CreateThread(NULL,0,IPEventProc,0,CREATE_SUSPENDED,&tid);
SetThreadPriority(tHandle,THREAD_PRIORITY_IDLE);
ResumeThread(tHandle);
...
}
when i use this object in c#,it has this problem:
void ipobj_IPChange(string para)
{
MessageBox.Show(s);
textBox14.Text = "change";
}
when ip changed ,the first line can run correctly. but the second line runs nothing ,just nothing happend ,why ?
when only the first line ,it's ok!
when only the second line ,it's not work.
Please,give me some advice.