Symantec pcAnywhere - 12.5 User Manual

OLE Automation Guide

OLE Automation Guide
Legal Notice
Copyright © 2008 Symantec Corporation. All rights reserved.
Symantec, the Symantec Logoare trademarks or registered trademarks of Symantec Corporation orits affiliatesin theU.S. andother countries.Other namesmay betrademarks of their respective owners.
This Symantec product may contain third party software for which Symantec is required to provide attribution to the third party (Third Party Programs). Some of the Third Party Programs areavailable under open source or free softwarelicenses. TheLicense Agreement accompanying the Software does not alter any rights or obligations you may have under those opensource or free software licenses.Please see the Third PartyLegal Notice Appendix to this Documentation or TPIP ReadMe File accompanying this Symantec product for more information on the Third Party Programs.
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.
THE DOCUMENTATIONIS PROVIDED"AS IS" ANDALL EXPRESSOR 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 LEGALLYINVALID. SYMANTEC CORPORATIONSHALL NOTBE LIABLE FORINCIDENTAL 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.
The LicensedSoftware and Documentation are deemed to becommercial computersoftware as definedin FAR 12.212 and subjectto restricted rights as definedin FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in Commercial Computer Software or Commercial Computer Software Documentation", as applicable, and any successor regulations. Any use, modification, reproduction release, performance, displayor disclosure of the LicensedSoftware and Documentation by theU.S. Government shall be solely in accordance with the terms of this Agreement.
Symantec Corporation 20330 Stevens Creek Blvd. Cupertino, CA 95014
http://www.symantec.com
Printed in the United States of America.
10 9 8 7 6 5 4 3 2 1

Technical Support

Symantec Technical Support maintains support centers globally. Technical Supports primary role is to respond to specific queries about product features and functionality.The Technical Support group also creates content forour online Knowledge Base. The Technical Support group works collaboratively with the other functional areas within Symantec to answer your questions in a timely fashion. Forexample, the Technical Support groupworks withProduct Engineering and SymantecSecurity Response to provide alerting services and virusdefinition updates.
Symantecs maintenance offerings include the following:
A range of support options that give you the flexibility to select the right
amount of service for any size organization
Telephone and Web-based support that provides rapid response and
up-to-the-minute information
Upgrade assurance that delivers automatic software upgrade protection
Global support that is available 24 hours a day, 7 days a week
Advanced features, including Account Management Services
For information about Symantecs Maintenance Programs, you can visit our Web site at the following URL:
www.symantec.com/techsupp/
Contacting Technical Support
Customers with a current maintenance agreement may access Technical Support information at the following URL:
www.symantec.com/techsupp/
Before contacting Technical Support, make sure you have satisfied the system requirements that are listed in your product documentation. Also, you should be at thecomputer onwhich theproblem occurred,in caseit is necessary to replicate the problem.
When you contact Technical Support, please have the following information available:
Product release level
Hardware information
Available memory, disk space, and 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 yourSymantec product requires registration ora license key,access our technical support Web page at the following URL:
www.symantec.com/techsupp/
Customer service
Customer service information is available at the following URL:
www.symantec.com/techsupp/
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 assurance and maintenance contracts
Information about the Symantec Buying Programs
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:
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.
Enterprise services that are available include the following:
contractsadmin@symantec.comAsia-Pacific and Japan
semea@symantec.comEurope, Middle-East, and Africa
supportsolutions@symantec.comNorth America and Latin America
Symantec EarlyWarning Solutions
Managed Security Services
Consulting Services
Educational Services
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.
These solutions provide early warning of cyber attacks, comprehensive threat analysis, and countermeasures to prevent attacks before they occur.
These servicesremove the burden of managingand monitoringsecurity devices and events, ensuring rapid response to real threats.
Symantec Consulting Services provide on-site technical expertise from Symantec andits trusted partners. Symantec ConsultingServices offera variety of prepackaged and customizable options that include assessment, design, implementation, monitoring,and managementcapabilities. Each is focused on establishing andmaintaining the integrity and availabilityof your IT resources.
Educational Services provide a full array of technical training, security education, security certification, and awareness communication programs.

Contents

Technical Support ............ . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ....... 4
Chapter 1 Using OLE Automation with Symantec
pcAnywhere . . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . 9
About OLE Automation .............. . . . . . . . ................ . . . . . . . ................ . . . . . . . 9
About the pcAnywhere Automation Server ........... . . . . . . . ............... . . . . . . 10
What you can do with the pcAnywhere Automation Server . . . . .............. 10
Before you start . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . 11
Automatically registering the remote engine .............. . . . . . . . .......... 11
Manually registering the remote engine ..... . . . . . . . ................ . . . . . . . .. 11
Accessing the pcAnywhere Automation Server ............. . . . . . . . ........ 12
Accessing the pcAnywhere Automation Server with Visual
Basic ............. . . . . . . . . ............... . . . . . . . ................ . . . . . . . ............ 12
Accessing the pcAnywhere Automation Server with Visual
C++ . . . . . . . . ............... . . . . . . . . ............... . . . . . . . ................ . . . . . . . ... 13
Launching host and remote OLE objects ............. . . . . . . . ............... . . 15
Where to find more information . ............... . . . . . . . . ............... . . . . . . . . ...... 15
Chapter 2 Visual Basic object definitions ..... . . . . . . . ................ . . . . . . . ...... 17
About Visual Basic objects . . . . . ............... . . . . . . . . ............... . . . . . . . . .......... 17
CRemoteDataManager methods . . . . . . . . ................ . . . . . . . ................ . . . . . . . 18
CRemoteData properties ..... . . . . . . . ................ . . . . . . . ................ . . . . . . . ...... 21
Connection type properties ............ . . . . . . . . ............... . . . . . . . . ........... 23
Dialing properties .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ........ 25
COM device properties .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . .. 26
NetBIOS device properties ......... . . . . . . . . ............... . . . . . . . ................ 29
ISDN via CAPI 2.0 device properties ........... . . . . . . . ............... . . . . . . . . .. 30
CRemoteDataEx object ............ . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . 31
Visual Basic sample code for remote functionality . . . ............... . . . . . . 32
CHostDataManager methods . . . . . . ............... . . . . . . . . ............... . . . . . . . . ...... 34
CHostData properties . . . . . ............... . . . . . . . . ............... . . . . . . . . ............... . 36
Connection type properties ............ . . . . . . . . ............... . . . . . . . . ........... 38
AssignConnection(ConnectionType) method ................ . . . . . . . ........ 41
UnassignConnection(ConnectionType) method .... . . . . . . . . ............... . 41
Dialing properties .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ........ 42
Contents8
COM device properties .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . .. 42
NetBIOS device properties ......... . . . . . . . . ............... . . . . . . . ................ 45
ISDN via CAPI 2.0 device properties ........... . . . . . . . ............... . . . . . . . . .. 46
CHostDataEx object .......... . . . . . . . ................ . . . . . . . ................ . . . . . . . ....... 47
Visual Basic sample code for host functionality ............ . . . . . . . . ....... 54
Awrem32 functions . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . 55
Chapter 3 Visual C++ object definitions ........ . . . . . . . ................ . . . . . . . ..... 59
About Visual C++ objects . . . . ............... . . . . . . . ................ . . . . . . . .............. 59
CRemoteDataManager methods . . . . . . . . ................ . . . . . . . ................ . . . . . . . 60
CRemoteData object ................ . . . . . . . ................ . . . . . . . ................ . . . . . . . 63
Get and Set methods .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ..... 63
Remote object Detail methods . . . . . . . ................ . . . . . . . ................ . . . . 66
Remote object methods ...... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . 68
CRemoteDataEx object ............ . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . 70
Visual C++ sample code for remote functionality ......... . . . . . . . . ........ 70
CHostDataManager methods . . . . . . ............... . . . . . . . . ............... . . . . . . . . ...... 71
CHostData object .............. . . . . . . . ................ . . . . . . . ............... . . . . . . . . ...... 75
Get and Set methods .... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ..... 75
Host object Detail methods . . . . . ............... . . . . . . . . ............... . . . . . . . . ... 76
Host object methods .... . . . . . . . ................ . . . . . . . ................ . . . . . . . ...... 80
CHostDataEx object .......... . . . . . . . ................ . . . . . . . ................ . . . . . . . ....... 82
Visual C++ sample code for host functionality ......... . . . . . . . ............. 84
Awrem32 functions . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . 85
Index ......... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . . ............... . . . . . . . ................ . . . . . . . ........ 89
Chapter

Using OLE Automation with Symantec pcAnywhere

This chapter includes the following topics:
About OLE Automation
About the pcAnywhere Automation Server
What you can do with the pcAnywhere Automation Server
Before you start
1
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.
Using OLE Automation with Symantec pcAnywhere
10

About the pcAnywhere Automation Server

OLE Automation controller
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.
An application or development tool that accesses and controls the components that have been exposed by the OLE Automation server
You canuse any programming language that supports OLE Automation. The two most common programming languages are Microsoft Visual Basic and Microsoft Visual C++.
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 TAPIdevice is assigned by default. Similarly, when youcreate a host object using the pcAnywhere Automation Server and then enumerate through the list of assignedconnections, the first available modem TAPI device isalready assigned.

What you can do with the pcAnywhere Automation Server

The pcAnywhereAutomation Server lets you automatea variety of administrative and productivity tasks.
You can use the pcAnywhere Automation Server to 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
Automatically add a name to or remove a name from the allowed callers list
on every pcAnywhere host on your network
This documentcontains severalexamples, writtenin both Visual Basic and Visual C++, to illustrate how to connect to and use the pcAnywhere Automation Server.
See “About Visual Basic objects” on page 17.
See “About Visual C++ objects” on page 59.

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 AutomationServer and to each exposedinterface. 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 ona computer on which SymantecpcAnywhere is installed. Otherwise, you must register the GUID entries manually.
See “Automatically registering the remote engine” on page 11.
See “Manually registering the remote engine” on page 11.
Before you start
11Using OLE Automation with Symantec pcAnywhere

Automatically registering the remote engine

Before you connect to another computer for the first time using your OLE client, you mustself-register theremote engine. You can dothis automatically when you start a remote object in Symantec pcAnywhere.
To automatically register the remote engine
To open Symantec pcAnywhere, do one of the following:
1
On the desktop, double-click the Symantec pcAnywhere program icon.
On theWindows taskbar, click Start> Programs >Symantec pcAnywhere.
In the pcAnywhere Manager window, click Remotes.
2
Double-click a remote connection item.
3
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
Using OLE Automation with Symantec pcAnywhere
12
Before you start
pcAnywhere Automation Server executable file (Winawsvr.exe). You only need to runthe executable file once to add the GUIDsto the registry. The Winawsvr.exe file is located in the installation directory.

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 VisualBasic programminglanguage has built-in support to interact withOLE 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.
To access the pcAnywhere Automation Server with Visual Basic
Add a pair of Object variables for each pcAnywhere object that you want to
1
access.
For example,when working with remote objects, DIM aRemoteDataManager and a RemoteDataObject as Object.
Use the RemoteDataManager to attach to the remote objects data manager.
2
For example, call the CreateObject method with WINAWSVR.REMOTEDATAMANAGER as a parameter.
Visual Basic uses the textual parameter to locate the managers identifier in the registry and returns the interface to that manager.
Once there is a valid data manager object, use it to do any of the following:
3
Determine the current directory.
Change to another directory.
Enumerate the associated data object files in the current directory.
Before you start
Create, retrieve, or delete a data object file.
After a data object is created or retrieved, you can get or set properties of the
4
object.
The Visual Basic syntax does not use a propertys name to differentiate
between getting and setting its value. Instead, the propertys position in
relation to the assignment operator determines whether the underlying
method call is a Get or a Set.
The following examples demonstrate a Get and a Set:
To get an objects phone number value, place the property name to the
right of the assignment operator. For example,s = RemoteData.PhoneNumber(), where s is a stringvariable.
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 thatis neededto obtainan interfaceto the pcAnywhere Automation Server and perform high-level operations on the interfaces associated object type.
Use the data manager object to do the following:
Determine or change the current directory.
13Using 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 createdor retrieved, an object uses the associated dataobject 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 objects current phone number property and calls SetPhoneNumber to set it.
Importing and viewing classes
The pcAnywhere Automation Server uses the following type libraries:
Using OLE Automation with Symantec pcAnywhere
14
Before you start
Winawsvr.tlb
The following procedures explain how to import the class definitions from the pcAnywhere AutomationServer type libraries into yourMFC application and then view the classes that have been added to your application.
To import classes
In Visual C++, create an MFC application.
1
On the View menu, click Class Wizard.
2
In the Class Wizard dialog box, click Add Class, and then click From a type
3
library.
Double-click winawsvr.tlb.
4
In the Confirm Classes dialog box, click OK to import all class definitions.
5
In the Class Wizard dialog box, click Add Class, and then click From a type
6
library.
Double-click awrem32.tlb.
7
In the Confirm Classes dialog box, click OK to import all class definitions.
8
In the Class Wizard dialog box, click OK to complete the import process.
9
The classes are added to the application. These classes let you manipulate objects and manage connections.
Importing the class definitions fromthe type libraries also adds support files to theapplication. These files contain theclass definitions andimplementation source code for the pcAnywhere Automation Server.
See “Viewing the class definitions and implementation files” on page 14.
To view the added classes
Provides the information needed to connect to the pcAnywhere Automation Server and access its interfaces
Provides the information needed to controlpcAnywhere connectionsAwrem32.tlb
In Visual C++, open your MFC application.
1
In the Workspace window, click the ClassView tab.
2
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
In Visual C++, open your MFC application.
1
In the Workspace window, click the FileView tab.
2

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 orremote 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

15Using OLE Automation with Symantec pcAnywhere
Where to find more information
For more information about OLE automation, see the following references:
Box, Don. 1998. Essential COM. Reading, Mass.: Addison-Wesley.
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.
Using OLE Automation with Symantec pcAnywhere
16
Where to find more information

Visual Basic object definitions

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

About Visual Basic objects

The pcAnywhereAutomation Server provides the following components tosupport OLE Automation:
Winawsvr
Table 2-1 describes the objects that comprise Winawsvr.
Provides the information needed to connect to the pcAnywhere Automation Server and access its interfaces
Provides the information needed to controlpcAnywhere connectionsAwrem32
Visual Basic object definitions
18

CRemoteDataManager methods

CRemoteDataManager
CRemoteData
CHostDataManager
CHostData
Table 2-1
Winawsvr objects
ReferenceDescriptionObject
Provides themethods forcreating, opening, modifying, saving, and deleting CRemoteData objects
Defines the parameters for accessing and controlling pcAnywhere remote functionality
Provides themethods forcreating, opening, modifying, saving,and deleting CHostData objects
Defines the parameters for accessing and controlling pcAnywherehost functionality
See “CRemoteDataManager methods” on page 18.
See “CRemoteData properties” on page 21.
See “CRemoteDataEx object” on page 31.
See “CHostDataManager methods” on page 34.
See “CHostData properties” on page 36.
See “CHostDataEx object” on page 47.
Awrem32 has one object, which consists of eight interfaces to support remote control and file transfer sessions.
See “Awrem32 functions” on page 55.
Some functionsare no longer supported. However, object definitions areprovided for use with earlier versions of pcAnywhere.
For functionsthat require passwords, password values can be setbut not retrieved. This is for security purposes.
CRemoteDataManager methods
The CRemoteDataManager methods provide the parameters and return values for accessing and controlling CRemoteData objects.
Table 2-2
CRemoteDataManager method
ChangeDirectory(NewDirectory)
CRemoteDataManager methods
value
Return Value = StringCurrentDirectory()
Parameter = NewDirectory
DescriptionParameter or return
Returns the full path name of the current directory in which pcAnywhere remote objects are stored
Changes the current directory in which pcAnywhere remote objects are stored
CRemoteDataManager methods
19Visual Basic object definitions
Table 2-2
CRemoteDataManager methods (continued)
CRemoteDataManager method
FindFirst(Pattern)
FindFirst(Name string)
FindNext(Name)
RetrieveObject(Name)
value
Parameter =Pattern as string
Parameter = Name as string
Parameter = Name as string
Return value= BooleanFindNext(Name)
Parameter = Name as string
DescriptionParameter or return
Finds the first pcAnywhere remote object file (*.chf) in the current directory; file name pattern filters based on the specified file name pattern (an asterisk [*] findsall files in the current directory)
Return bufferfor the full path name of the remote object file (*chf) that matches the specified pattern
Return bufferfor the full path name of the remote object file that matches thepattern that is specified in the original call to FindFirst()
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
The fullyqualified remote object file name to be loaded
RetrieveObject(AccessMode)
RetrieveObject(Password)
RetrieveObjectEx(Name)
Parameter = AccessMode as integer
as string
Parameter = Name as string
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
Object password. May be NULLParameter = Password
The fullyqualified remote object file name to be loaded
Visual Basic object definitions
20
CRemoteDataManager methods
Table 2-2
CRemoteDataManager methods (continued)
CRemoteDataManager method
RetrieveObjectEx(AccessMode)
RetrieveObjectEx(Password)
CreateObject(Name)
value
Parameter = AccessMode as integer
as string
Return value = ObjectRetrieveObjectEx
Parameter = Name as string
DescriptionParameter or return
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
Object password. May be NULLParameter = Password
CRemoteDataEx object from the specified file
Creates a CRemoteData object and returns an LPDISPATCH pointer to it. The parameter is the fully qualified remote object file name for the new object
CRemoteDataReturn value = ObjectCreateObject
CreateObjectEx(Name)
DeleteObject(Name)
DeleteObject(Password)
Parameter = Name as string
Parameter = Name as string
as string
Creates a CRemoteDataEx object and returns an LPDISPATCH pointer to it. The parameter is the fully qualified remote object file name for the new object
CRemoteDataExReturn value = ObjectCreateObjectEx
The fullyqualified remote object file name of the object to be deleted
Object passwordParameter = Password
TRUE if object is deletedReturn value= BooleanDeleteObject

CRemoteData properties

The properties and parameters that are available for the CRemoteData object are shown as follows.
In Table 2-3, replace the information in angle brackets with the actual values.
CRemoteData properties
21Visual Basic object definitions
Table 2-3
CRemoteData properties and parameters
DescriptionParameterProperty
String<CRemoteData>.ComputerName(String)
Integer<CRemoteData>.RedialCount(Integer)
Integer<CRemoteData>.RedialDelay(Integer)
String<CRemoteData>.AutoLoginName(String)
String<CRemoteData>.AutoLoginPassword(String)
Sets the computer name or IP address of the host computer.
Sets the phone number of the host computer.String<CRemoteData>.PhoneNumber(String)
Sets the system dialing properties.Bool<CRemoteData>.UseDialingProperties(Bool)
Sets the number of redial attempts before cancelling the call.
Sets the number of seconds to wait between redial attempts.
Sets the name of the user for automatic login.
For more information about using domain logins:
See “CRemoteDataEx object” on page 31.
Sets the password for automatic logins in the remote object.
For security reasons, the pcAnywhere Automation Serverdoes not provide the ability to read the password value. A password value is not returned.
String<CRemoteData>.Password(String)
Bool<CRemoteData>.ExecuteProtection(Bool)
Sets thepassword onthe remoteobject foruse with the ExecuteProtection, ReadProtection, and WriteProtection settings.
For security reasons, the pcAnywhere Automation Serverdoes not provide the ability to read the password value. A password value is not returned.
Sets the requirement of apassword to execute the object. Set by Password.
Visual Basic object definitions
22
CRemoteData properties
Table 2-3
CRemoteData properties and parameters (continued)
DescriptionParameterProperty
Bool<CRemoteData>.ReadProtection(Bool)
Bool<CRemoteData>.WriteProtection(Bool)
String<CRemoteData>.RecordFile(String)
Bool<CRemoteData>.RecordSession(Bool)
String<CRemoteData>.ReadObject(String)
String<CRemoteData>.WriteObject(String)
Sets therequirement of a password toview the properties of the remote object. Set by Password.
Sets the requirement of a password to save changes tothe remote object. Set byPassword.
Activates and deactivates session logging.Bool<CRemoteData>.LogSession(Bool)
Sets the fully qualified path and name to the location of the file that records the active session.
Activates and deactivates automatic session recording.
Sets the password of the object. Use this property to refresh the local data copy of the remote object.
Sets the password of the object. Use this property tocreate the remote object orto write changes that you have made to the remote object.
The properties and return values for CRemoteData are shown in the following table.
In Table 2-4, replace the information in angle brackets with the actual values.
Table 2-4
CRemoteData properties and return values
DescriptionReturn valueProperty
StringString = <CRemoteData>.ComputerName
StringString = <CRemoteData>.PhoneNumber
BoolBool = <CRemoteData>.UseDialingProperties
IntegerInteger = <CRemoteData>.RedialCount
Returns the computer name or IP address of the host computer
Returns the phone number of the host computer
Returns thesystem dialingproperties thatare set in the remote object
Returns the number of redial attempts that is set in the remote object
CRemoteData properties
23Visual Basic object definitions
Table 2-4

Connection type properties

CRemoteData properties and return values (continued)
DescriptionReturn valueProperty
IntegerInteger = <CRemoteData>.RedialDelay
StringString = <CRemoteData>.AutoLoginName
BoolBool = <CRemoteData>.ExecuteProtection
BoolBool = <CRemoteData>.ReadProtection
BoolBool = <CRemoteData>.WriteProtection
StringString = <CRemoteData>.RecordFile
BoolBool = <CRemoteData>.RecordSession
Returns thenumber of seconds between redial attempts
Returns the login name that is used for automatic logins
Returns the value of the ExecuteProtection setting
Returns the value of the ReadProtection setting
Returns the value of the WriteProtection setting
Returns TRUE if session logging is enabledBoolBool = <CRemoteData>.LogSession
Returns the fully qualified path and name of the session recording file
Returns the value of the session recording setting
The following table defines the connection type properties and parameters.
In Table 2-5, replace the information in angle brackets with the actual values.
Visual Basic object definitions
24
CRemoteData properties
Table 2-5
Connection type properties and parameters
DescriptionParameterProperty
String<CRemoteData>.ConnectionType(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 followingare examples of valid connection types:
COM1
COM2
COM3
COM4
TCP/IP
SPX
NetBIOS
ISDN via CAPI 2.0
Modem name (as it appears on the
computer)
The following table defines the connection type properties and return values.
In Table 2-6, replace the information in angle brackets with the actual values.
Table 2-6
Connection type properties and return values
DescriptionReturn valueProperty
StringString = <CRemoteData>.ConnectionTypes
Returns the connection type of the remote object.
CRemoteData properties
25Visual Basic object definitions
Table 2-6
Connection type properties and return values (continued)
DescriptionReturn valueProperty
IntegerInteger = <CRemoteData>.ConnectionType
StringString = <CRemoteData>.NextConnectionType
Returns the number of available connection types.
The followingare examples of valid connection types:
COM1
COM2
COM3
COM4
TCP/IP
SPX
NetBIOS
ISDN via CAPI 2.0
Modem name (as it appears on the
computer)
Returns the first available connection type.StringString = <CRemoteData>.FirstConnectionType
Returns the next available connection type. This is called sequentially for the number of connection types that is set in <CRemoteData>.ConnectionType toenumerate all connection types.
<CRemoteData>.FindConnectionType(ConnectionType)

Dialing properties

The following table defines the properties and parameters for setting the dialing properties for modem connections.
In Table 2-7, replace the information in angle brackets with the actual values.
Table 2-7
Properties and parameters for dialing properties
BoolBool =
Returns TRUE if the named connection type is found in the list of available connection types.
DescriptionParameterProperty
String<CRemoteData>.AreaCode(String)
Sets the area code dialing properties for modem connections
Visual Basic object definitions
26
CRemoteData properties
Table 2-7
Properties and parameters for dialing properties (continued)
DescriptionParameterProperty
String<CRemoteData>.CountryCode(String)
Sets the country code dialing properties for modem connections
The following table defines the properties and return values for modem dialing properties.
In Table 2-8, replace the information in angle brackets with the actual values.
Table 2-8
Properties and return values for dialing properties
DescriptionReturn valueProperty
Returns the area code dialing properties.StringString = <CRemoteData>.AreaCode
Returns the dialing properties country code.StringString = <CRemoteData>.CountryCode
Returns thenumber of available country codes.IntegerInteger = <CRemoteData>.CountryCodes
StringString = <CRemoteData>.FirstCountryCode
StringString = <CRemoteData>.NextCountryCode
Returns the first available country code that is listed in the operating system.
Returns the next available country code. This is calledsequentially for the number ofcountry codes that is set in <CRemoteData.CountryCodes> to enumerate all country codes.

COM device properties

The followingtable describes the properties andparameters that let you customize the port settings for modem and other COM-based connections.
In Table 2-9, replace the information in angle brackets with the actual values.
CRemoteData properties
27Visual Basic object definitions
Table 2-9
COM device properties and parameters
DescriptionParameterProperty
String<CRemoteData>.ComParity(String)
String<CRemoteData>.ComFlowControl(String)
String<CRemoteData>.ComStartedBy(String)
Sets the communications parity
The following values are valid:
<None>
Odd
Even
Mark
Space
Sets theflow control of COM-based connection types
The following values are valid:
<None>
XONXOFF
RTS/CTS
Both
Sets thestart setting of COM-based connection types
The following values are valid:
Always connected
Carrier detect (DCD)
Clear to send (CTS)
Data set ready (DSR)
Ring indicator (RI)
Receive 2 <CR>s
Modem response
String<CRemoteData>.ComEndedBy(String)
Sets the endsetting of COM-based connection types
The following values are valid:
Always connected
Carrier detect (DCD)
Clear to send (CTS)
Data set ready (DSR)
Ring indicator (RI)
Visual Basic object definitions
28
CRemoteData properties
Table 2-9
COM device properties and parameters (continued)
DescriptionParameterProperty
Long<CRemoteData>.ComSpeed(Long)
Contains the maximum COM speed setting
The following values are valid:
110
300
600
1200
2400
4800
9600
38400
57600
115200
The following table describes the COM device properties and return values.
In Table 2-10, replace the information in angle brackets with the actual values.
Table 2-10
COM device properties and return values
DescriptionReturn valueProperty
StringString = <CRemoteData>.ComParity
Returns one of the following values for communications parity:
<None>
Odd
Even
Mark
Space
StringString = <CRemoteData>.ComFlowControl
Returns the Com Flow setting of the remote object
The following values are valid:
<None>
XONXOFF
RTS/CTS
Both
Loading...
+ 63 hidden pages