Programming Guide |
Gets the value of a property from a service component or ActiveX control
char *sm_obj_get_property(int obj_id, char *prop);
obj_id
- An integer handle that identifies the component whose property you want to get. Object handles are returned by sm_obj_create for service components, sm_prop_id for ActiveX controls and by sm_obj_call.
- .
prop
- The designated property. For indexed properties, use brackets to specify the occurrence.
COM, EJB, Java
Client
- · The property's current value, returned as a string.
- · A null string if an error occurred. For the error code from COM components, call sm_com_result. Error codes are defined in
winerror.h
.
sm_obj_get_property
retrieves property values from a service component or ActiveX control.Properties can be determined through the AxView utility for COM components, the Properties window for ActiveX controls, or the Component Interface window for service components.
#include <smuprapi.h>
{
id = sm_prop_id("spinner");
value = sm_obj_get_property(id, "prop");
}// For an indexed property:
{
id = sm_prop_id("spinner");
value = sm_obj_get_property(id, "prop[5]");
}