0

My Application does not allow Interop.CDO to download a file from FTP server, what can I need to do to resolve this issue?

Error message :

Could not load file or assembly 'Interop.CDO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Была сделана попытка загрузить программу, имеющую неверный формат.

Here's the English equivalent of the error:

An attempt was made to load a program with an incorrect format.

Mselmi Ali
  • 327
  • 1
  • 4
  • 7

1 Answers1

1

Can you check it's not a 32/64 bit issue? The underlying COM CDO dll is probably only supporting 32-bit processes. Your program maybe compiled as "x64" or as "Any CPU", but running on a 64-bit Windows.

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
  • Compile your program with X86. See here: http://stackoverflow.com/questions/5229768/c-compiling-for-32-64-bit-or-for-any-cpu – Simon Mourier May 27 '11 at 16:26
  • the problem that my application should run in 64 bit mode – Mselmi Ali May 27 '11 at 16:42
  • there are any other solution to send mail either CDO ? – Mselmi Ali May 27 '11 at 16:43
  • To download a file using FTP? or to send email? – Simon Mourier May 27 '11 at 17:24
  • @Msemlmi - I asked because in the question you say to send a file using FTP. Anyway, you can send email using http://msdn.microsoft.com/fr-fr/library/system.net.mail.smtpclient.aspx, otherwise, if you want CDO-like stuff, Outlook Redemption supports 32 and 64 bit processes: http://www.dimastr.com/redemption/ – Simon Mourier May 27 '11 at 21:01