Symantec pcAnywhere - 12.1 User Manual

Symantec pcAnywhere™ OLE Automation Guide

Symantec pcAnywhere™ OLE Automation Guide
The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.
Documentation version 12.1
Legal Notice
Copyright © 2007 Symantec Corporation.
Federal acquisitions: Commercial Software - Government Users Subject to Standard License Terms and Conditions.
Symantec, the Symantec Logo, and pcAnywhere are trademarks or registered trademarks of Symantec Corporation in the United States and certain other countries. Other names may be trademarks of their respective owners. Microsoft, Windows, Windows NT, MS-DOS, and the Windows logo are registered trademarks or trademarks of Microsoft Corporation. Additional company and product names may be trademarks or registered trademarks of the individual companies and are respectfully acknowledged.
The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any.
THIS DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON­INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID, SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
Symantec Corporation 20330 Stevens Creek Blvd. Cupertino, CA 95014 USA
http://www.symantec.com
Printed in the United States of America. 10987654321

Technical Support

Symantec Technical Support maintains support centers globally. Technical Support’s primary role is to respond to specific queries about product feature and function, installation, and configuration. The Technical Support group also authors content for our online Knowledge Base. The Technical Support group works collaboratively with the other functional areas within Symantec to answer your questions in a timely fashion. For example, the Technical Support group works with Product Engineering and Symantec Security Response to provide alerting services and virus definition updates.
Symantec’s maintenance offerings include the following:
A range of support options that give you the flexibility to select the right
Telephone and Web-based support that provides rapid response and up-to-
Upgrade insurance that delivers automatic software upgrade protection
Global support that is available 24 hours a day, 7 days a week worldwide.
Advanced features, including Technical Account Management
For information about Symantec’s Maintenance Programs, you can visit our Web site at the following URL:
www.symantec.com/techsupp/ent/enterprise.html
amount of service for any size organization
the-minute information
Support is provided in a variety of languages for those customers that are enrolled in the Platinum Support program
Select your country or language under Global Support. The specific features that are available may vary based on the level of maintenance that was purchased and the specific product that you use.
Contacting Technical Support
Customers with a current maintenance agreement may access Technical Support information at the following URL:
www.symantec.com/techsupp/ent/enterprise.html
Select your region or language under Global Support.
Before contacting Technical Support, make sure you have satisfied the system requirements that are listed in your product documentation. Also, you should be at the computer on which the problem occurred, in case it is necessary to recreate the problem.
When you contact Technical Support, please have the following information available:
Product release level
Hardware information
Available memory, disk space, NIC information
Operating system
Version and patch level
Network topology
Router, gateway, and IP address information
Problem description:
Error messages and log files
Troubleshooting that was performed before contacting Symantec
Recent software configuration changes and network changes
Licensing and registration
If your Symantec product requires registration or a license key, access our technical support Web page at the following URL:
www.symantec.com/techsupp/ent/enterprise.html.
Select your region or language under Global Support, and then select the Licensing and Registration page.
Customer service
Customer service information is available at the following URL:
www.symantec.com/techsupp/ent/enterprise.html
Select your country or language under Global Support.
Customer Service is available to assist with the following types of issues:
Questions regarding product licensing or serialization
Product registration updates such as address or name changes
General product information (features, language availability, local dealers)
Latest information about product updates and upgrades
Information about upgrade insurance and maintenance contracts
Information about Symantec Value License Program
Advice about Symantec's technical support options
Nontechnical presales questions
Issues that are related to CD-ROMs or manuals
Maintenance agreement resources
If you want to contact Symantec regarding an existing maintenance agreement, please contact the maintenance agreement administration team for your region as follows:
Asia-Pacific and Japan: contractsadmin@symantec.com
Europe, Middle-East, and Africa: semea@symantec.com
North America and Latin America: supportsolutions@symantec.com
Additional enterprise services
Symantec offers a comprehensive set of services that allow you to maximize your investment in Symantec products and to develop your knowledge, expertise, and global insight, which enable you to manage your business risks proactively. Additional services that are available include the following:
Symantec Early Warning Solutions
Managed Security Services
Consulting services Symantec Consulting Services provide on-site technical
Educational Services These services provide a full array of technical training,
These solutions provide early warning of cyber attacks, comprehensive threat analysis, and countermeasures to prevent attacks before they occur.
These services remove the burden of managing and monitoring security devices and events, ensuring rapid response to real threats.
expertise from Symantec and its trusted partners. Symantec Consulting Services offer a variety of prepackaged and customizable options that include assessment, design, implementation, monitoring and management capabilities, each focused on establishing and maintaining the integrity and availability of your IT resources.
security education, security certification, and awareness communication programs.
To access more information about Enterprise Services, please visit our Web site at the following URL:
www.symantec.com
Select your country or language from the site index.

Contents

Chapter 1 Using OLE Automation with Symantec pcAnywhere
About OLE Automation ....................................................................................... 11
About the pcAnywhere Automation Server ....................................................12
What you can do with the pcAnywhere Automation Server ........................12
Before you start ....................................................................................................13
Automatically registering the remote engine .........................................13
Manually registering the remote engine ..................................................14
Accessing the pcAnywhere Automation Server ..................................... 14
Accessing the pcAnywhere Automation Server with Visual Basic ......14
Accessing the pcAnywhere Automation Server with Visual C++ ........15
Launching host and remote OLE objects .................................................. 17
Where to find more information .......................................................................17
Chapter 2 Visual Basic object definitions
About Visual Basic objects ..................................................................................19
CRemoteDataManager methods ........................................................................20
CurrentDirectory() .......................................................................................20
ChangeDirectory(NewDirectory) ...............................................................21
FindFirst(Pattern, Name string) ................................................................ 21
FindNext(Name) ...........................................................................................22
RetrieveObject(Name, AccessMode, Password) ......................................23
RetrieveObjectEx(Name, AccessMode, Password) .................................. 23
CreateObject(Name) .....................................................................................24
CreateObjectEx(Name) ................................................................................24
DeleteObject(Name, Password) ..................................................................25
CRemoteData properties ....................................................................................26
Connection type properties ........................................................................28
Dialing properties ........................................................................................30
COM device properties ................................................................................31
NetBIOS device properties .........................................................................34
ISDN via CAPI 2.0 device properties .........................................................35
CRemoteDataEx object ........................................................................................36
Visual Basic sample code for remote functionality ................................ 37
8 Contents
CHostDataManager methods .............................................................................39
CurrentDirectory() .......................................................................................39
FindFirst(Pattern, Name string) ................................................................ 39
FindNext(Name) ...........................................................................................40
RetrieveObject(Name, AccessMode, Password) ......................................41
RetrieveObjectEx(Name, AccessMode, Password) .................................. 41
CreateObject(Name) .....................................................................................42
CreateObjectEx(Name) ................................................................................42
DeleteObject(Name, Password) .................................................................. 43
Launch(Name) .............................................................................................. 43
CHostData properties ..........................................................................................44
Connection type properties ........................................................................ 46
AssignConnection(ConnectionType) method ..........................................48
UnassignConnection(ConnectionType) method ..................................... 48
Dialing properties ........................................................................................49
COM device properties ................................................................................50
NetBIOS device properties .........................................................................53
ISDN via CAPI 2.0 device properties ......................................................... 54
CHostDataEx object .............................................................................................55
Visual Basic sample code for host functionality ..................................... 62
Awrem32 functions ............................................................................................. 63
awConnect(FileName) .................................................................................63
awDisconnect() .............................................................................................64
FileXferFromHost(HostFile, RemoteFile) ................................................64
FileXferToHost(HostFile, RemoteFile) ..................................................... 65
CreateFolderOnHost(FolderName) ...........................................................65
ExecuteHostFile(FileName) ........................................................................66
GetError() ......................................................................................................66
ConnectionStatus() ......................................................................................67
Chapter 3 Visual C++ object definitions
About Visual C++ objects .................................................................................... 69
CRemoteDataManager methods ........................................................................71
BSTR CurrentDirectory(); ...........................................................................71
BOOL ChangeDirectory(LPCTSTR lpszNewDirectory); .........................71
BOOL FindFirst(LPCTSTR lpszPattern, BSTR FAR*
pbstrFullQualName); ...........................................................................72
BOOL FindNext(BSTR FAR* pbstrFullQualName); .................................72
LPDISPATCH RetrieveObject(LPCTSTR lpszFQName, short
wAccessMode, LPCTSTR lpszPassword); ......................................... 73
LPDISPATCH RetrieveObjectEx(LPCTSTR lpszFQName, short
wAccessMode, LPCTSTR lpszPassword); ......................................... 73
LPDISPATCH CreateObject(LPCTSTR lpszFQName); ............................74
LPDISPATCH CreateObjectEx(LPCTSTR lpszFQName); ........................ 75
BOOL DeleteObject(LPCTSTR lpszFQName, LPCTSTR
lpszPassword); ......................................................................................76
BOOL Launch(LPCTSTR lpszFQName); ....................................................76
CRemoteData object ............................................................................................77
Get and Set methods ...................................................................................77
Remote object Detail methods ................................................................... 79
Remote object methods ...............................................................................82
CRemoteDataEx object ........................................................................................85
Visual C++ sample code for remote functionality .................................. 85
CHostDataManager methods .............................................................................86
BSTR CurrentDirectory(); ...........................................................................86
BOOL ChangeDirectory(LPCTSTR lpszNewDirectory); .........................86
BOOL FindFirst(LPCTSTR lpszPattern, BSTR FAR*
pbstrFullQualName); ...........................................................................87
BOOL FindNext(BSTR FAR* pbstrFullQualName); .................................87
LPDISPATCH RetrieveObject(LPCTSTR lpszFQName, short
wAccessMode, LPCTSTR lpszPassword); ......................................... 88
LPDISPATCH RetrieveObjectEx(LPCTSTR lpszFQName, short
wAccessMode, LPCTSTR lpszPassword); ......................................... 89
LPDISPATCH CreateObject(LPCTSTR lpszName); .................................90
LPDISPATCH CreateObjectEx(LPCTSTR lpszName); ............................. 90
BOOL DeleteObject(LPCTSTR lpszFQName, LPCTSTR
lpszPassword); ......................................................................................91
BOOL Launch(LPCTSTR lpszFQName); ....................................................91
CHostData object ................................................................................................. 92
Get and Set methods ...................................................................................92
Host object Detail methods ........................................................................ 93
Host object methods ....................................................................................97
9Contents
10 Contents
Index
CHostDataEx object ...........................................................................................101
Visual C++ sample code for host functionality .....................................103
Awrem32 functions ...........................................................................................104
boolean awConnect(BSTR FileName); ....................................................104
boolean awDisconnect(); ...........................................................................105
boolean FileXferFromHost(BSTR HostFile, BSTR RemoteFile); ......... 105
boolean FileXferToHost(BSTR HostFile, BSTR RemoteFile); .............. 105
boolean CreateFolderOnHost(BSTR FolderName); ...............................106
boolean ExecuteHostFile(BSTR FileName); ........................................... 106
BSTR GetError(); ........................................................................................107
short ConnectionStatus(); .........................................................................107
Chapter

Using OLE Automation with Symantec pcAnywhere

This chapter includes the following topics:
About OLE Automation
About the pcAnywhere Automation Server
1
What you can do with the pcAnywhere Automation Server
Before you start
Where to find more information

About OLE Automation

OLE Automation is a technology that lets you create an external application or other development tool (such as a script or macro) that can control and automate any exposed function within an application.
OLE Automation consists of the following components:
OLE Automation server: An application or software component that exposes
its functionality so that it can be accessed or controlled by other applications or development tools
The pcAnywhere Automation Server is an example of an OLE Automation server.
See “About the pcAnywhere Automation Server” on page 12.
12 Using OLE Automation with Symantec pcAnywhere

About the pcAnywhere Automation Server

OLE Automation controller: An application or development tool that
accesses and controls the components that have been exposed by the OLE Automation server
You can use any programming language that supports OLE Automation. The two most common programming languages are Microsoft Visual Basic and Microsoft Visual C++.
An external application accesses an OLE Automation server by connecting to the server and then requesting access to one or more of its published interfaces. An interface is an entry point that allows access to one or more related methods or properties. After an application obtains an interface to the server, it can then call any internal interface method as though it were part of the external application.
About the pcAnywhere Automation Server
The pcAnywhere Automation Server lets external applications manage pcAnywhere remote and host files to automate remote control and file transfer tasks. The pcAnywhere Automation Server functions as a programmable replacement for the Symantec pcAnywhere user interface and mirrors much of its default behavior.
For example, when you create a host object in pcAnywhere, the first available modem TAPI device is assigned by default. Similarly, when you create a host object using the pcAnywhere Automation Server and then enumerate through the list of assigned connections, the first available modem TAPI device is already assigned.

What you can do with the pcAnywhere Automation Server

The pcAnywhere Automation Server lets you automate a variety of administrative and productivity tasks. For example, you can do the following:
Automatically distribute and install software updates on multiple
computers across your network
Schedule automatic file transfers between computers for audit or archive
purposes
This document contains several examples, written in both Visual Basic and Visual C++, to illustrate how to connect to and use the pcAnywhere Automation Server.
See “Visual Basic object definitions” on page 19.
See “Visual C++ object definitions” on page 69.

Before you start

During a connection to the pcAnywhere Automation Server and its interfaces, identifier parameters, known as globally unique identifiers (GUIDs), are passed to the automation library API functions. A separate GUID is assigned to the pcAnywhere Automation Server and to each exposed interface. These GUIDs must be present in the system registry to connect an external application to the pcAnywhere Automation Server and its interfaces.
You can register the GUID entries automatically if you are running the external application on a computer on which Symantec pcAnywhere is installed. Otherwise, you must register the GUID entries manually.
See “Automatically registering the remote engine” on page 13.
See “Manually registering the remote engine” on page 13.

Automatically registering the remote engine

Before you connect to another computer for the first time using your OLE client, you must self-register the remote engine. You can do this automatically when you start a remote object in Symantec pcAnywhere.
Before you start
13Using OLE Automation with Symantec pcAnywhere
To automatically register the remote engine
1 To open Symantec pcAnywhere, do one of the following:
On the desktop, double-click the Symantec pcAnywhere program icon.
On the Windows taskbar, click Start > Program s > Symantec
pcAnywhere.
2 In the pcAnywhere Manager window, click Remotes.
3 Double-click a remote connection item.
This process registers the remote engine. You do not need to complete the connection.

Manually registering the remote engine

If pcAnywhere is not installed on the computer on which you are running the external application, you must register the GUIDs manually by running the pcAnywhere Automation Server executable file (Winawsvr.exe). You only need to run the executable file once to add the GUIDs to the registry. The Winawsvr.exe file is located in the installation directory.
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.
Before you start
The following examples demonstrate a Get and a Set:
To get an object’s phone number value, place the property name to the
right of the assignment operator.
For example, s = RemoteData.PhoneNumber(), where s is a string
variable.
To set the phone number, place the property name to the left of the
assignment operator.
For example, RemoteData.PhoneNumber = “555-1212”

Accessing the pcAnywhere Automation Server with Visual C++

The pcAnywhere Automation Server uses type libraries to expose information about its interfaces and methods to automation clients that are written in Visual C++. These type libraries use Microsoft Foundation Classes (MFC), which can be imported into your application using the Visual C++ ClassWizard.
The data manager classes that are provided in the type libraries provide the functionality that is needed to obtain an interface to the pcAnywhere Automation Server and perform high-level operations on the interface’s associated object type.
Use the data manager object to do the following:
Determine or change the current directory.
15Using OLE Automation with Symantec pcAnywhere
Enumerate through the list of data object files in the current directory.
Create, retrieve, or delete a named object.
Once created or retrieved, an object uses the associated data object class to examine or modify any of its exposed properties. Most of these properties are exposed through a pair of methods that begin with the word Get or Set. For example, a user calls the GetPhoneNumber method to examine the object’s current phone number property and calls SetPhoneNumber to set it.
See “Visual C++ object definitions” on page 69.
Importing and viewing classes
The pcAnywhere Automation Server uses the following type libraries:
Winawsvr.tlb: Provides the information needed to connect to the
pcAnywhere Automation Server and access its interfaces
Awrem32.tlb: Provides the information needed to control pcAnywhere
connections
16 Using OLE Automation with Symantec pcAnywhere
Before you start
Import and view classes
The following procedures explain how to import the class definitions from the pcAnywhere Automation Server type libraries into your MFC application and then view the classes that have been added to your application.
To import classes
1 In Visual C++, create an MFC application.
2 On the View menu, click Class Wizard.
3 In the Class Wizard dialog box, click Add Class, and then click From a type
library.
4 Double-click winawsvr.tlb.
5 In the Confirm Classes dialog box, click OK to import all class definitions.
6 In the Class Wizard dialog box, click Add Class, and then click From a type
library.
7 Double-click awrem32.tlb.
8 In the Confirm Classes dialog box, click OK to import all class definitions.
9 In the Class Wizard dialog box, click OK to complete the import process.
The classes are added to the application. These classes let you manipulate objects and manage connections.
Importing the class definitions from the type libraries also adds support files to the application. These files contain the class definitions and implementation source code for the pcAnywhere Automation Server.
See “Viewing the class definitions and implementation files” on page 16.
To view the added classes
1 In Visual C++, open your MFC application.
2 In the Workspace window, click the ClassView tab.
Viewing the class definitions and implementation files
When you import the pcAnywhere Automation Server type libraries into your application, the following files are added:
Winawsvr.h
Winawsvr.cpp
Awrem32.h
Awrem32.cpp
These files contain the class definitions and implementation source code for the pcAnywhere Automation Server. You do not need to edit these files; however, each application source file that contains calls to the pcAnywhere Automation Server methods must include Winawsvr.h.
To view the class definitions and implementation files
1 In Visual C++, open your MFC application.
2 In the Workspace window, click the FileView tab.

Launching host and remote OLE objects

Symantec pcAnywhere requires that you store all host and remote objects in the default data directory. Before you launch a host or remote object that you created using OLE, ensure that the object is located in the pcAnywhere default data directory. The default directory is the All Users folder in Windows XP, and is the ProgramData folder in Vista.

Where to find more information

For more information about OLE automation, see the following references:
Box, Don. 1998. Essential COM. Reading, Mass.: Addison-Wesley.
Where to find more information
17Using OLE Automation with Symantec pcAnywhere
Horton, Ivor. 1997. Beginning MFC Programming. Birmingham, UK.: Wrox
Press.
Rogerson, Dale. 1997. Inside COM. Redmond, Wash.: Microsoft Press.
Templeman, Julian. 1997. Beginning MFC COM Programming. Birmingham,
UK.: Wrox Press.
18 Using OLE Automation with Symantec pcAnywhere
Where to find more information
Chapter

Visual Basic object definitions

This chapter includes the following topics:
About Visual Basic objects
CRemoteDataManager methods
CRemoteData properties
CRemoteDataEx object
2
CHostDataManager methods
CHostData properties
CHostDataEx object
Awrem32 functions

About Visual Basic objects

The pcAnywhere Automation Server provides the following components to support OLE Automation:
Winawsvr: Provides the information needed to connect to the pcAnywhere
Automation Server and access its interfaces
Awrem32: Provides the information needed to control pcAnywhere
connections
20 Visual Basic object definitions

CRemoteDataManager methods

Table 2-1 describes the objects that comprise Winawsvr.
Table 2-1 Winawsvr objects
Object Description Reference
CRemoteDataManager Provides the methods for
creating, opening, modifying, saving, and deleting CRemoteData objects
CRemoteData Defines the parameters for
accessing and controlling pcAnywhere remote functionality
CHostDataManager Provides the methods for
creating, opening, modifying, saving, and deleting CHostData objects
CHostData Defines the parameters for
accessing and controlling pcAnywhere host functionality
See “CRemoteDataManager
methods” on page 20.
See “CRemoteData
properties” on page 26.
See “CRemoteDataEx
object” on page 36.
See “CHostDataManager
methods” on page 39.
See “CHostData properties” on page 44.
See “CHostDataEx object” on page 55.
Awrem32 has one object, which consists of eight interfaces to support remote control and file transfer sessions.
See “Awrem32 functions” on page 63.
Some functions are no longer supported. However, object definitions are provided for use with earlier versions of pcAnywhere.
For functions that require passwords, password values can be set but not retrieved. This is for security purposes.
CRemoteDataManager methods
The CRemoteDataManager methods provide the parameters and return values for accessing and controlling CRemoteData objects.

CurrentDirectory()

Returns the full path name of the current directory in which pcAnywhere remote objects are stored.
Table 2-2 defines the CurrentDirectory() return value.
Table 2-2 CurrentDirectory() return value
Return value Description
String The full path name of the current pcAnywhere data

ChangeDirectory(NewDirectory)

Changes the current directory in which pcAnywhere remote objects are stored.
Table 2-3 defines the ChangeDirectory parameter.
Table 2-3 ChangeDirectory parameter
Parameter Description
NewDirectory Name of an existing directory
Table 2-4 defines the ChangeDirectory return value.
Table 2-4 ChangeDirectory return value
CRemoteDataManager methods
21Visual Basic object definitions
directory
Return value Description
Boolean TRUE if successful

FindFirst(Pattern, Name string)

Finds the first pcAnywhere remote object file (*.chf) in the current directory, based on the specified file name pattern.
Table 2-5 defines the FindFirst parameters.
Table 2-5 FindFirst parameters
Parameter Description
Pattern as string File name pattern to filter object files (an asterisk [*] finds
Name as string Return buffer for the full path name of the remote object
all files in the current directory)
file that matches the specified pattern
22 Visual Basic object definitions
CRemoteDataManager methods
Table 2-6 defines the FindFirst return value.
Table 2-6 FindFirst return value
Return value Description
Boolean TRUE if a remote object file that matches the specified

FindNext(Name)

After FindFirst() has been successfully called to get the name of a remote object file in the current directory, FindNext() can be called to find the next file that matches the pattern, if any.
Table 2-7 defines the FindNext parameter.
Table 2-7 FindNext parameter
Parameter Description
Name as string Return buffer for the full path name of the remote object
pattern is found. The full path name of the matching file is stored in Name.
file that matches the pattern that is specified in the original call to FindFirst()
Table 2-8 defines the FindNext return value.
Table 2-8 FindNext return value
Return value Description
Boolean TRUE if another remote object file that matches the
pattern that is specified in the call to FindFirst() is found. The full path name of the matching file is stored in Name.

RetrieveObject(Name, AccessMode, Password)

Retrieves a CRemoteData object by file name.
Table 2-9 defines the RetrieveObject parameters.
Table 2-9 RetrieveObject parameters
Parameter Description
Name as string The fully qualified remote object file name to be loaded.
AccessMode as integer Specifies how this object is to be used. This relates to the
password protection. The options are as follows:
0 = Not specified
1 = View only
2 = View and Modify
3 = Execute
Password as string Object password. May be NULL.
Table 2-10 defines the RetrieveObject return value.
Table 2-10 RetrieveObject return value
CRemoteDataManager methods
23Visual Basic object definitions
Return value Description
Object CRemoteData object from the specified file

RetrieveObjectEx(Name, AccessMode, Password)

Retrieves a CRemoteDataEx object by file name.
Table 2-11 defines the RetrieveObjectEx parameters.
Table 2-11 RetrieveObjectEx parameters
Parameter Description
Name as string The fully qualified remote object file name to be loaded.
AccessMode as integer Specifies how this object is to be used. This relates to the
password protection. The options are as follows:
0 = Not specified
1 = View only
2 = View and Modify
3 = Execute
Password as string Object password. May be NULL.
24 Visual Basic object definitions
CRemoteDataManager methods
Table 2-12 defines the RetrieveObjectEx return value.
Table 2-12 RetrieveObjectEx return value
Return value Description
Object CRemoteDataEx object from the specified file

CreateObject(Name)

Creates a CRemoteData object and returns an LPDISPATCH pointer to it.
Table 2-13 defines the CreateObject parameter.
Table 2-13 CreateObject parameter
Parameter Description
Name as string The fully qualified remote object file name for the new
Table 2-14 defines the CreateObject return value.
Table 2-14 CreateObject return value
object
Return value Description
Object CRemoteData

CreateObjectEx(Name)

Creates a CRemoteDataEx object and returns an LPDISPATCH pointer to it.
Table 2-15 defines the CreateObjectEx parameter.
Table 2-15 CreateObjectEx parameter
Parameter Description
Name as string The fully qualified remote object file name for the new
Table 2-16 defines the CreateObjectEx return value.
Table 2-16 CreateObjectEx return value
Return value Description
Object CRemoteDataEx
object

DeleteObject(Name, Password)

Deletes a remote object file.
Table 2-17 defines the DeleteObject parameters.
Table 2-17 DeleteObject parameters
Parameter Description
Name as string The fully qualified remote object file name of the object to
Password as string Object password
Table 2-18 defines the DeleteObject return value.
Table 2-18 DeleteObject return value
Return value Description
Boolean TRUE if object is deleted
CRemoteDataManager methods
25Visual Basic object definitions
be deleted
26 Visual Basic object definitions

CRemoteData properties

CRemoteData properties
Table 2-19 defines the properties and parameters that are available for the
CRemoteData object. Replace the information in angle brackets with the actual values.
Table 2-19 CRemoteData properties and parameters
Property Parameter Description
<CRemoteData>.ComputerName(String) String Sets the computer name or IP address of the host
computer.
<CRemoteData>.PhoneNumber(String) String Sets the phone number of the host computer.
<CRemoteData>.UseDialingProperties(Bool) Bool Sets the system dialing properties.
<CRemoteData>.RedialCount(Integer) Integer Sets the number of redial attempts before
cancelling the call.
<CRemoteData>.RedialDelay(Integer) Integer Sets the number of seconds to wait between redial
attempts.
<CRemoteData>.AutoLoginName(String) String Sets the name of the user for automatic login.
For more information about using domain logins, see “CRemoteDataEx object” on page 36.
<CRemoteData>.AutoLoginPassword(String) String Sets the password for automatic logins in the
remote object.
For security reasons, the pcAnywhere Automation Server does not provide the ability to read the password value. A password value is not returned.
<CRemoteData>.Password(String) String Sets the password on the remote object for use with
the ExecuteProtection, ReadProtection, and WriteProtection settings.
For security reasons, the pcAnywhere Automation Server does not provide the ability to read the password value. A password value is not returned.
<CRemoteData>.ExecuteProtection(Bool) Bool Sets the requirement of a password to execute the
object. Set by Password.
<CRemoteData>.ReadProtection(Bool) Bool Sets the requirement of a password to view the
properties of the remote object. Set by Password.
<CRemoteData>.WriteProtection(Bool) Bool Sets the requirement of a password to save changes
to the remote object. Set by Password.
<CRemoteData>.LogSession(Bool) Bool Activates and deactivates session logging.
CRemoteData properties
Table 2-19 CRemoteData properties and parameters
Property Parameter Description
<CRemoteData>.RecordFile(String) String Sets the fully qualified path and name to the
location of the file that records the active session.
<CRemoteData>.RecordSession(Bool) Bool Activates and deactivates automatic session
recording.
<CRemoteData>.ReadObject(String) String Sets the password of the object. Use this property
to refresh the local data copy of the remote object.
<CRemoteData>.WriteObject(String) String Sets the password of the object. Use this property
to create the remote object or to write changes that you have made to the remote object.
Table 2-20 defines the properties and return values for CRemoteData. Replace
the information in angle brackets with the actual values.
Table 2-20 CRemoteData properties and return values
27Visual Basic object definitions
Property Return
Description
value
String = <CRemoteData>.ComputerName String Returns the computer name or IP address of the
host computer
String = <CRemoteData>.PhoneNumber String Returns the phone number of the host computer
Bool = <CRemoteData>.UseDialingProperties Bool Returns the system dialing properties that are set
in the remote object
Integer = <CRemoteData>.RedialCount Integer Returns the number of redial attempts that is set in
the remote object
Integer = <CRemoteData>.RedialDelay Integer Returns the number of seconds between redial
attempts
String = <CRemoteData>.AutoLoginName String Returns the login name that is used for automatic
logins
Bool = <CRemoteData>.ExecuteProtection Bool Returns the value of the ExecuteProtection setting
Bool = <CRemoteData>.ReadProtection Bool Returns the value of the ReadProtection setting
Bool = <CRemoteData>.WriteProtection Bool Returns the value of the WriteProtection setting
Bool = <CRemoteData>.LogSession Bool Returns TRUE if session logging is enabled
String = <CRemoteData>.RecordFile String Returns the fully qualified path and name of the
session recording file
28 Visual Basic object definitions
CRemoteData properties
Table 2-20 CRemoteData properties and return values
Property Return
Description
value
Bool = <CRemoteData>.RecordSession Bool Returns the value of the session recording setting

Connection type properties

Table 2-21 defines the connection type properties and parameters. Replace the
information in angle brackets with the actual values.
Table 2-21 Connection type properties and parameters
Property Parameter Description
<CRemoteData>.ConnectionType(String) String Sets the connection type of the remote. The value
that is passed in must be a valid connection type as defined by the FirstConnectionType() and NextConnectionType() functions.
The following are examples of valid connection types:
COM1
COM2
COM3
COM4
LPT1
LPT2
LPT3
LPT4
TCP/IP
SPX
NetBIOS
Infrared
ISDN via CAPI 2.0
Modem name (as it appears on the computer)
CRemoteData properties
Table 2-22 defines the connection type properties and return values. Replace the
information in angle brackets with the actual values.
Table 2-22 Connection type properties and return values
29Visual Basic object definitions
Property Return
Description
value
String = <CRemoteData>.ConnectionTypes String Returns the connection type of the
remote object.
Integer = <CRemoteData>.ConnectionType Integer Returns the number of available
connection types.
The following are examples of valid connection types:
COM1
COM2
COM3
COM4
LPT1
LPT2
LPT3
LPT4
TCP/IP
SPX
NetBIOS
Infrared
ISDN via CAPI 2.0
Modem name (as it appears on the
computer)
String = <CRemoteData>.FirstConnectionType String Returns the first available connection
type.
String = <CRemoteData>.NextConnectionType String Returns the next available connection
type. This is called sequentially for the number of connection types that is set in <CRemoteData>.ConnectionType to enumerate all connection types.
Bool = <CRemoteData>.FindConnectionType(ConnectionType)
Bool Returns TRUE if the named connection
type is found in the list of available connection types.
30 Visual Basic object definitions
CRemoteData properties

Dialing properties

Table 2-23 defines the properties and parameters for setting the dialing
properties for modem connections. Replace the information in angle brackets with the actual values.
Table 2-23 Properties and parameters for dialing properties
Property Parameter Description
<CRemoteData>.AreaCode(String) String Sets the area code dialing properties for modem
connections
<CRemoteData>.CountryCode(String) String Sets the country code dialing properties for
modem connections
Table 2-24 defines the properties and return values for modem dialing
properties. Replace the information in angle brackets with the actual values.
Table 2-24 Properties and return values for dialing properties
Property Return
Description
value
String = <CRemoteData>.AreaCode String Returns the area code dialing properties.
String = <CRemoteData>.CountryCode String Returns the dialing properties country code.
Integer = <CRemoteData>.CountryCodes Integer Returns the number of available country codes.
String = <CRemoteData>.FirstCountryCode String Returns the first available country code that is
listed in the operating system.
String = <CRemoteData>.NextCountryCode String Returns the next available country code. This is
called sequentially for the number of country codes that is set in <CRemoteData.CountryCodes> to enumerate all country codes.
Loading...
+ 82 hidden pages