Error "is not a valid Win32 application"

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

doiley
User
Posts: 6
Joined: Thu May 07, 2009 2:44 am

Error "is not a valid Win32 application"

Post by doiley »

Hi there,

I'm currently trying to get the 64-bit pdf viewer working. I'm using VS2008 C#.

I'm running Windows 7 x64, i previously had the "Self-Registration failed" error message but read the post here: https://forum.pdf-xchange.com/ ... 067#p34067 which solved that.

Now i get the following error when the designer calls "((System.ComponentModel.ISupportInitialize)(this.pdfViewer)).EndInit();" :

"is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"The exception is of type "BadImageFormatException"

Can someone point me in the right direction please.

Thanks,

EDIT: Also note that I have tried just using it in a brand new application without any other controls on the form.

Dale.
doiley
User
Posts: 6
Joined: Thu May 07, 2009 2:44 am

Re: Error "is not a valid Win32 application"

Post by doiley »

Hi,

I've actually solved this myself.

It had nothing to do with the dll being used. It had to do with the target CPU.

The whole project was for x86 only but because the project output was set to Any CPU it actually tried to run as 64-bit and would fail.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Error "is not a valid Win32 application"

Post by John - Tracker Supp »

Excellent Dale - pleased all is well.

Please do come back if you need further help.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com