次の方法で共有


_SetObjectProperty( ) API Library Routine

Sets a property for an object.

int _SetObjectProperty(Value FAR *objct, char FAR *prop, Value FAR *val,
   int fAdd)

Remarks

The first parameter *objct is an object reference; the second parameter *prop is the name of the property to set; the third parameter *val is the new property value.

The last parameter fAdd is either 0 or a non-zero value that specifies if the property is added to the object if the property does not exist. If fAdd is a non-zero value and property you specify does not exist for the object, the property is added to the object as a user-defined property, and contains the property value you specify with *val. If fAdd is 0 and the property you specify does not exist for the object, the property isn't added to the object.

_SetObjectProperty( ) returns 0 if it is successful; otherwise, the negative value of the corresponding Visual FoxPro error code is returned.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.

See Also

_GetObjectProperty( ) API Library Routine | Accessing the Visual FoxPro API | Object Property | ReadObject Property