View Full Version : mscomm object error

January 27, 2004, 22:23:47
I have built a project using VC++ 6.0 as a dialog-based application. I have followed the instructions in the First-steps and played the video on the dialog window. However, when I have included an Mscomm object (to use for serial port communication) into the dialog from control palette of the dialog editor, the dialog window is not opened anymore. I mean there is no compilation error, but you click the .exe and nothing happens. I suspect that this Mscomm is an ActiveX control and you say in the First-steps that uncheck the "ActiveX control" box. Is this the source of error? If yes, how can i overcome this problem? If no, what is the problem and the possible solution? Could you please help me? Thank you in advance.

Stefan Geissler
January 28, 2004, 09:40:38
If the classlib is used together with an 3rd party ActiveX Control like the calendar control, the application will not start and the log shows a RPC_E_CHANGED_`MOD`E ($80010106) error.

There is a workaround available. Insert in one of the cpp files (i.e the app file) following lines of code:

struct static_init
static_init() { CoUninitialize(); OleInitialize( 0 ); }

#pragma init_seg( user )
static_init sys_init;

This is all to to.