No BSD License  

Highlights from
atlSocket

from atlSocket by David Ganor
A TCP/IP client-side socket entity implemented as an ActiveX DLL.

tcp_geterror(tcp_client_h)
function error_str = tcp_geterror(tcp_client_h)
%
% TCP_GETERROR returns a string, containg the last error
% description, from the TCP ActiveX object.
%
%   error_str = tcp_geterror(tcp_client_h)
%

% Author:       David Ganor, WAVION Ltd.
% Last Update:  09/2003
% Revisions:
%   1. Created.

%% Checking input arguments
if (nargin ~= 1)
    error('Wrong number of input arguments');
end
if ~isobject(tcp_client_h)
    error('Input argument must be a handle to an ActiveX object');
end
if isempty(tcp_client_h)
    error('Input argument cannot be empty');
end

error_str = invoke(tcp_client_h, 'getlasterror');

Contact us at files@mathworks.com