Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
Function
The function OpenObject opens an object for the user process. Each change of a value or status of opened object will be sent by the process D2000 Server process to the user process, which can process the value using the function NewValueProc.
Declaration
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
APIRET OpenObject(const char *name, BasObjInfoPtr data) |
Parameters
The parameter name defines the name of opened object and the structure data will contain returned information on the opened object. The item data.Id defines an a unique object identifier, which can be used later in the function NewValueProc to detect the object name and in the function CloseObject used to close defined object.
Return code
| Code | Description |
|---|---|
| API_OK | Object opened correctly. |
| API_ObjNotExist | Required object doesn't exist. |
| API_TimeoutError | Object was not opened in the given time. |
| API_ParamError | The value of the parameter data is null. |