In the program, the auxiliary thread calls the main thread of the IHTMLDocument2 object, then the inside of the access to one of the IHTMLElement content, such as: PEle - & gt; Get_innerText (& amp; BSTR); There was a memory access conflict error! But there is no problem in the main thread can get page tag value, can also give page label assignment,
CodePudding user response:
Trouble you see what the problem is caused by??????? Thank you very much!
CodePudding user response:
The child thread do not operate the UI
CodePudding user response:
My thread is a serial port to receive the thread, will take the data displayed in a web page, give the page label assignment is an error, how to avoid this problem??
CodePudding user response:
Across threads window operation, the need to pass a handle to the window, it is not can pass a pointer to the way you think is wrong, should be a secondary thread hair message, the main thread to accept the message, and then deal with interface problem