Programming Guide



sm_com_result

Gets the error code returned by the last call to a COM component

int sm_com_result(void);

Environment

Windows, Web

Scope

Client

Returns

Description

sm_com_result returns the result from the last call to an sm_com routine. Only the result of the last call is recorded; subsequent calls will overwrite this value.

The HRESULT values are only available on Windows platforms and are determined by the OLE specifications and the COM component author. For values, refer to winerror.h and the documentation for the COM component.

Since an error handler will only be fired on negative exception codes, use this function to retrieve positive exceptions.

Example

#include <smuprapi.h>
{
id = sm_prop_id("spinner");
sm_obj_set_property(id, "Value", "40");
errcode = sm_com_result();
}