It compiles without any problems, but when I press send I get an exeption on line 579:
Code: Select all
int hr = NetLib.NXC_Mail_Init(out mail, m_nTypeEmail, ref smtp);
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
When I build the project for x86 platform
Unable to load DLL 'netlib40': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I made sure that the netlib40.DLL was in the correct build locations, and why it could not load it beats me.
I tried with both the \bin\ and \bin.x64\ version of the netlib40.DLL
As a test I tried to add the .dll under References but it remarked upon it as not valid assembly/Com.
As a final test I just started your own CS_NetMail.exe from \bin\ and to my surprise I got an exception identical to the Any CPU exception above.
Al this was done on a x64 Windows 7 installation, and build with Visual Studio 2008.
The regular NetMail.exe did work.