View Full Version : Problem with Library Initialisation

September 18, 2008, 12:40:22

This is Anjaneya Prasad N.
I am very new to MFC.
I am trying to build an application using Image Sourcing Control 3.0(Trial Version).

The imaging devices i have are : DFx21BF04 type.

I am getting the following Warnings when i run the application.

Warning: OleInitialize returned scode = RPC_E_CHANGED_MODE ($80010106).
Warning: CreateDlgControls failed during dialog init.
and the Dialog is not yet all appearing.

I haven't used the OleInitialization. But my application is showing this warning.

Can you help me..??
Thanks in advance.

Anjaneya Prasad N

Stefan Geissler
September 18, 2008, 13:34:54
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_MODE ($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.

P.S. If you got a strange SPAM mail from the forum, please excuse. I deleted it and banned the user, who posted it.

September 18, 2008, 14:07:13
Thank you very much for your reply.
My problem solved.
I am using 3rd Party ActiveX control in my application.

Can you please tell me(or else any other directive) why this happened?

Thanks and Regards,
Anjaneya Prasad N.

Stefan Geissler
September 18, 2008, 14:11:39
Hello Anjaneya,

The problem is the initialization of COM in the application. My programmers explained this to me, but I must surrender, it is a little bit too weird to me.