No error in C++ Builder when attempting to bind to - WeOnlyDo Discussion board

No error in C++ Builder when attempting to bind to (wodSSHServer)

by David Lucas, Thursday, September 08, 2005, 13:01 (4458 days ago)

Hi,

I don't receive an error when I call Start() on wodSSHD while the port is set to one that is already in use. Instead it just carries on regardless as if nothing is wrong.

Any ideas on what I can do to remedy this?


Regards,

David Lucas

Re: No error in C++ Builder when attempting to bin

by wodSupport, Thursday, September 08, 2005, 13:36 (4458 days ago) @ David Lucas

David,

I just tried, and you're right.

But wodSSHServer does return error through IErrorInfo interface, just as any other ActiveX component. I debugged it, and it is fired properly.

Let me see why BCB doesn't catch it.

Re: No error in C++ Builder when attempting to bin

by wodSupport, Thursday, September 08, 2005, 13:52 (4458 days ago) @ wodSupport

David,

ok, I don't know why BCB wrapper (when wodSSHServer is imported into BCB) doesn't catch errors, but if you start the server like this: [code]VARIANT var;
var.vt = VT_ERROR;
HRESULT hr;
hr = wodSSHD1->ControlInterface->Start(var);[/code] you will notice error is returned.

Can you try it that way?

Re: No error in C++ Builder when attempting to bin

by David Lucas, Thursday, September 08, 2005, 15:04 (4458 days ago) @ wodSupport

Thanks for the speedy response, that's fixed it!

The code you supplied above didn't compile right off, but a minor alteration fixed it and now I get an error code returned.

VARIANT var;
var.vt = VT_ERROR;
HRESULT hr;
hr = Server->GetDefaultInterface()->Start(var);


Thanks again.


David Lucas