14 Using OLE Automation with Symantec pcAnywhere
Before you start
Accessing the pcAnywhere Automation Server
You can access the pcAnywhere Automation Server using any language
platform that supports OLE Automation. The two most popular language
platforms that support OLE Automation are Visual Basic and Visual C++.
The coding principles for these two platforms are similar, although in the Visual
Basic environment, much of the low-level work is performed behind the scenes
by the Visual Basic run-time system.
Accessing the pcAnywhere Automation Server with Visual Basic
The Visual Basic programming language has built-in support to interact with
OLE Automation servers, such as the pcAnywhere Automation Server. You
create a Standard Exe project, and then enter code in each method to access the
pcAnywhere Automation Server. Visual Basic takes the high-level method calls
in the source files and expands them internally into the corresponding low-level
OLE Automation method calls.
See
“Visual Basic object definitions”
on page 19.
To access the pcAnywhere Automation Server with Visual Basic
1
Add a pair of Object variables for each pcAnywhere object that you want to
access.
For example, when working with remote objects, DIM a
RemoteDataManager and a RemoteDataObject as Object.
2
Use the RemoteDataManager to attach to the remote object’s data manager.
For example, call the CreateObject method with
WINAWSVR.REMOTEDATAMANAGER as a parameter.
Visual Basic uses the textual parameter to locate the manager’s identifier in
the registry and returns the interface to that manager.
3
Once there is a valid data manager object, use it to do any of the following:
■
Determine the current directory.
■
Change to another directory.
■
Enumerate the associated data object files in the current directory.
■
Create, retrieve, or delete a data object file.
4
After a data object is created or retrieved, you can get or set properties of the
object.
The Visual Basic syntax does not use a property’s name to differentiate
between getting and setting its value. Instead, the property’s position in
relation to the assignment operator determines whether the underlying
method call is a Get or a Set.
Содержание PCANYWHERE - OLE AUTOMATION GUIDE V12.1
Страница 1: ...Symantec pcAnywhere OLE Automation Guide ...
Страница 6: ......
Страница 18: ...18 Using OLE Automation with Symantec pcAnywhere Where to find more information ...
Страница 68: ...68 Visual Basic object definitions Awrem32 functions ...
Страница 108: ...108 Visual C object definitions Awrem32 functions ...
Страница 112: ...112 Index ...