COMException Error Codes - WeOnlyDo Discussion board

COMException Error Codes (wodFTPServer)

by thehin, Tuesday, August 19, 2008, 23:19 (5941 days ago)

I received a COMException when attempting to call Start on the wodFTPCom COM object. I was expecting an exception to be thrown since I already had a server running on the same port as I was attempting to start the wodFTP Server on. I got the exception, however the error code for the exception turned out to be -2146818240 with the message saying The specified address is already in use. The message is correct, however the error code is unknown. According to the documentation, the error code should be 10048. Can you please tell me if I am doing anything wrong. I am using the wodFTPServer COM component via Visual Studio .NET 2008 and C#.

Thanks

Re: COMException Error Codes

by wodDamir, Wednesday, August 20, 2008, 00:09 (5941 days ago) @ thehin

Hi,

Actually, in order to convert this error into the one provided by us, you should take that number (-2146818240), and convert it to HEX. Then take the last 4 digits (2740), and convert them back to Decimal. That should give you 10048.

I honestly can't tell you why this happens in C#, but for some reason those errors are converted to it's own format.

Hope this helps.

Regards,
Damba

Re: COMException Error Codes

by thehin, Wednesday, August 20, 2008, 22:17 (5940 days ago) @ wodDamir

Thanks. That seemed to work out just fine.