D2000 VBApi - Opening and closing an object of the D2000 system

Before working with any object, it is necessary to open it. Opening the object is provided by the procedure VBApiOpenObject.


Declaration
Declare Sub VBApiOpenObject Lib "vbapi.dll" Alias "_OpenObject@8" (ByRef name As String, ByRef ok As Long)
Parameters
nameName of object to be opened.
okReturn value - call successful.
Return value
Value of the parameter ok.

Return valueDescription
0Object opened.
1Object does not exist.
2No logged on user.
3Unexpected internal error.
4Incorrect parameters.
Description
When the particular object is opened for the first time, the physical communication of the interface with the process Server is processed. During another (duplicate) openings, the internal opening counter is incremented. Other openings, therefore, are processed immediately.


Closing the object is allowed by the procedure VBApiCloseObject. It decrements the internal counter. After the object is closed finally (for duplicate openings), it provides the physical closing the object.


Declaration
Declare Sub VBApiCloseObject Lib "vbapi.dll" Alias "_CloseObject@4" (ByRef name As String)
Parameters
nameobject name

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .