No error in C++ Builder when attempting to bind to (wodSSHServer)
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
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
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
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