Page 1 of 1

BadImageFormatException in constructor

Posted: Mon Sep 17, 2007 5:22 am
by Alexander
Hi,

I have an exception "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)" in this code:

Code: Select all

  this.fl = new f_in_box__lib.f_in_box__control();

Exception call stack:
at f_in_box__lib.f_in_box__wrapper.FPC_LoadRegisteredOCX()
at f_in_box__lib.AxCode..ctor()
at f_in_box__lib.f_in_box__control..ctor()
at MyClass.InitializeComponents

This error have appeared after migration to XP x64, I have not such problems when I was under Win2k.

Please, help me with solution...

Thanks in advice,
Alexander.

Re: BadImageFormatException in constructor

Posted: Mon Sep 17, 2007 7:42 am
by Softanics
Thank you for your question.

Set the target platform as x32 and rebuild your project .

Posted: Tue Sep 18, 2007 5:34 am
by Alexander
Thanks, it works :)