When you write the MFC program assert (iswindow (ptemp-> m_hwnd), an error is returned.

Source: Internet
Author: User

A protocol forwarding service was created in the past two days, but it was not expected to be difficult: the following error was reported during debugging:

Debug assertion failed
F:/SP/vctools/vc7libs/ship/atlmfc/src/mfc/occcont. cpp (950)
950 rowsCodeYes: assert (iswindow (ptemp-> m_hwnd ));

There was no f disk on the hard disk, So I went wrong to the f disk. At first, I used the wrong keyword search on Google and scanned a lot of English websites. I didn't see it for a long time. I thought it was a problem with the Runtime Library, I am using vs2005 SP1, So I re-installed Vs and didn't install the SP1 Patch. I still had the same error. I had no choice but to change a keyword search and finally found a clue on the Chinese csdn website, it seems that the ActiveX control is not registered because of thisProgramIt was written by someone else. It was previously an ActiveX Control compiled under vc6. Now it is transplanted to vs2005, causing ActiveX to need to be re-compiled. It is estimated that the CLSID number is different. I also blame myself for not carefully reading the output directory during debugging. There is a prompt indicating that the CLSID number is unknown. Then I searched this CLSID number and found it was originally a serial port ActiveX control, I know that the dialog box program has a serial port ActiveX. Copy the control to C/Windows/system32 and enter regsvr32 mscomm32.ocx in the command line. Re-compile, OK!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.