Symantec 14541094 - pcAnywhere Host & Remote Manual

Ole automation guide
Hide thumbs Also See for 14541094 - pcAnywhere Host & Remote:
Table of Contents

Advertisement

Symantec pcAnywhere™
OLE Automation Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 14541094 - pcAnywhere Host & Remote and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Symantec 14541094 - pcAnywhere Host & Remote

  • Page 1 Symantec pcAnywhere™ OLE Automation Guide...
  • Page 2: Legal Notice

    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.
  • Page 3: Technical Support

    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.
  • Page 4: Customer Service

    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.
  • Page 5 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.
  • Page 7: Table Of Contents

    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 ..........
  • Page 8 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 ..................
  • Page 9 Contents 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);...
  • Page 10 10 Contents 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);...
  • Page 11: Using Ole Automation With Symantec Pcanywhere

    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 Where to find more information About OLE Automation...
  • Page 12: About The Pcanywhere Automation Server

    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.
  • Page 13: Before You Start

    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. “Automatically registering the remote engine”...
  • Page 14: Manually Registering The Remote Engine

    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 default Symantec pcAnywhere data directory. Accessing the pcAnywhere Automation Server You can access the pcAnywhere Automation Server using any language platform that supports OLE Automation.
  • Page 15: Accessing The Pcanywhere Automation Server With Visual C

    Using OLE Automation with Symantec pcAnywhere Before you start Enumerate the associated data object files in the current directory. Create, retrieve, or delete a data object file. After a data object is created or retrieved, you can get or set properties of the object.
  • Page 16 16 Using OLE Automation with Symantec pcAnywhere Before you start 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...
  • Page 17: Launching Host And Remote Ole Objects

    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.
  • Page 18 18 Using OLE Automation with Symantec pcAnywhere Where to find more information...
  • Page 19: Visual Basic Object Definitions

    Chapter Visual Basic object definitions This chapter includes the following topics: About Visual Basic objects CRemoteDataManager methods CRemoteData properties CRemoteDataEx object 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...
  • Page 20: Cremotedatamanager Methods

    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 “CRemoteDataManager methods” on page 20. creating, opening, modifying, saving, and deleting CRemoteData objects CRemoteData Defines the parameters for “CRemoteData...
  • Page 21: Changedirectory(Newdirectory)

    Visual Basic object definitions CRemoteDataManager methods 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 directory ChangeDirectory(NewDirectory) Changes the current directory in which pcAnywhere remote objects are stored. Table 2-3 defines the ChangeDirectory parameter.
  • Page 22: Findnext(Name)

    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 pattern is found. The full path name of the matching file is stored in Name.
  • Page 23: Retrieveobject(Name, Accessmode, Password)

    Visual Basic object definitions CRemoteDataManager methods 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.
  • Page 24: Createobject(Name)

    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.
  • Page 25: Deleteobject(Name, Password)

    Visual Basic object definitions CRemoteDataManager methods 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 be deleted Password as string Object password Table 2-18...
  • Page 26: Cremotedata Properties

    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...
  • Page 27 Visual Basic object definitions 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.
  • Page 28: Connection Type Properties

    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.
  • Page 29 Visual Basic object definitions 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 Property Return Description value String = <CRemoteData>.ConnectionTypes String Returns the connection type of the remote object.
  • Page 30: Dialing Properties

    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)
  • Page 31: Com Device Properties

    Visual Basic object definitions CRemoteData properties COM device properties Table 2-25 describes the properties and parameters that let you customize the port settings for modem and other COM-based connections. Replace the information in angle brackets with the actual values. Table 2-25 COM device properties and parameters Property Parameter Description...
  • Page 32 32 Visual Basic object definitions CRemoteData properties Table 2-25 COM device properties and parameters Property Parameter Description <CRemoteData>.ComEndedBy(String) String Sets the end 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) <CRemoteData>.ComSpeed(Long)
  • Page 33 Visual Basic object definitions CRemoteData properties Table 2-26 COM device properties and return values Property Return Description value String = <CRemoteData>.ComFlowControl String Returns the Com Flow setting of the remote object The following values are valid: <None> XONXOFF RTS/CTS Both String = <CRemoteData>.ComStartedBy String Returns the Com Start control of COM-based...
  • Page 34: Netbios Device Properties

    34 Visual Basic object definitions CRemoteData properties Table 2-26 COM device properties and return values Property Return Description value Long = <CRemoteData>.ComSpeed Long Returns the current setting of the Com Speed of the remote object The following values are valid: 1200 2400 4800...
  • Page 35: Isdn Via Capi 2.0 Device Properties

    Visual Basic object definitions CRemoteData properties ISDN via CAPI 2.0 device properties Table 2-29 defines the properties and parameters for European ISDN connections. Replace the information in angle brackets with the actual values. Table 2-29 ISDN via CAPI 2.0 properties and parameters Property Parameter Description <CRemoteData>.CapiChannelBonding(Bool)
  • Page 36: Cremotedataex Object

    36 Visual Basic object definitions CRemoteDataEx object CRemoteDataEx object The CRemoteDataEx object contains the same functionality as the CRemoteData object with some additional functionality. Table 2-31 describes the properties and parameters. Replace the information in angle brackets with the actual values. Table 2-31 CRemoteDataEx parameters Property...
  • Page 37: Visual Basic Sample Code For Remote Functionality

    Visual Basic object definitions CRemoteDataEx object Table 2-32 CRemoteDataEx properties and return values Property Return Description value Byte = <CRemoteData>.EncryptionLevel Byte Returns one of the following encryption settings: -1: None 0: pcAnywhere 1: Symmetric 2: Public key Bool = <CRemoteData>.DenyLowerEncrypt Bool Returns the value of the deny lower encryption setting.
  • Page 38 38 Visual Basic object definitions CRemoteDataEx object MsgBox (s) s = RemoteData.PhoneNumber() MsgBox (s) 'set some properties RemoteData.AreaCode = "212" RemoteData.PhoneNumber = "555-5555" 'write object to disk RemoteData.WriteObject (0) End Sub Use the FindFirst and FindNext methods to display the remote file in a directory as follows: Private Sub Command5_Click() Dim RemoteDataManager as Object...
  • Page 39: Chostdatamanager Methods

    Visual Basic object definitions CHostDataManager methods RemoteDataManager.ChangeDirectory ("C:\dev\bin.w32\data") MsgBox (RemoteDataManager.CurrentDirectory()) Set RemoteData = RemoteDataManager.CreateObject("test") RemoteData.ConnectionType = "TCP/IP" RemoteData.ComputerName = "Host1" s = RemoteData.ConnectionType MsgBox (s) s = RemoteData.ComputerName MsgBox (s) RemoteData.WriteObject (0) End Sub CHostDataManager methods The CHostDataManager methods provide the parameters and return values for accessing and controlling CHostData objects.
  • Page 40: Findnext(Name)

    40 Visual Basic object definitions CHostDataManager methods Table 2-34 FindFirst parameters Parameter Description Name as string Return buffer for the full path name of the host object file that matches the specified pattern Table 2-35 defines the return value for FindFirst. Table 2-35 FindFirst return value Return value...
  • Page 41: Retrieveobject(Name, Accessmode, Password)

    Visual Basic object definitions CHostDataManager methods RetrieveObject(Name, AccessMode, Password) Retrieves a CHostData object by file name. Table 2-38 defines the parameters for RetrieveObject. Table 2-38 RetrieveObject parameters Parameter Description Name as string The fully qualified host object file name to be loaded. AccessMode as integer Specifies how this object is to be used.
  • Page 42: Createobject(Name)

    42 Visual Basic object definitions CHostDataManager methods Table 2-41 defines the return value for RetrieveObjectEx. Table 2-41 RetrieveObjectEx return value Return value Description Object CHostDataEx object from the specified file CreateObject(Name) Creates a CHostData object and returns an LPDISPATCH pointer to it. Table 2-42 defines the parameter for CreateObject.
  • Page 43: Deleteobject(Name, Password)

    Visual Basic object definitions CHostDataManager methods DeleteObject(Name, Password) Deletes a host object file. Table 2-46 defines the parameters for DeleteObject. Table 2-46 DeleteObject parameters Parameter Description Name as string The fully qualified host object file name of the object to be deleted Password as string Object password...
  • Page 44: Chostdata Properties

    44 Visual Basic object definitions CHostData properties CHostData properties Table 2-50 describes the properties and parameters that are available for the CHostData object. Replace the information in angle brackets with the actual values. Table 2-50 CHostData properties and parameters Property Parameter Description <CHostData>.PhoneNumber(String) String...
  • Page 45 Visual Basic object definitions CHostData properties Table 2-51 describes the CHostData properties and return values. Replace the information in angle brackets with the actual values. Table 2-51 CHostData properties and return values Property Return Description value String = <CHostData>.PhoneNumber String Returns the phone number of the host computer Bool = <CHostData>.UseDialingProperties Bool...
  • Page 46: Connection Type Properties

    46 Visual Basic object definitions CHostData properties Connection type properties Table 2-52 describes the connection type properties and parameters. Replace the information in angle brackets with the actual values. Table 2-52 Connection type properties and parameters Property Parameter Description <CHostData>.ConnectionType(String) String Sets the connection type of the host.
  • Page 47 Visual Basic object definitions CHostData properties Table 2-53 describes the connection type properties and return values. Replace the information in angle brackets with the actual values. Table 2-53 Connection type properties and return values Property Return Description value String = <CHostData>.ConnectionTypes String Returns the connection type of the host object.
  • Page 48: Assignconnection(Connectiontype) Method

    48 Visual Basic object definitions CHostData properties AssignConnection(ConnectionType) method The AssignConnection(Connection Type) method places the requested connection type on the host object’s list of assigned connection types and makes it the current connection type when processing subsequent device-specific method calls. If the requested connection type is already on the list of assigned connections, the list of assigned connections does not change.
  • Page 49: Dialing Properties

    Visual Basic object definitions CHostData properties Table 2-56 defines the UnassignConnection parameter. Table 2-56 UnassignConnection parameter Parameter Description ConnectionType as string The name of a connection device type to be unassigned Table 2-57 defines the UnassignConnection return value. Table 2-57 UnassignConnection return value Return value Description...
  • Page 50: Com Device Properties

    50 Visual Basic object definitions CHostData properties Table 2-59 Properties and return values for modem dialing properties Property Return Description value String = <CHostData>.NextCountryCode String Returns the next available country code. This is called sequentially for the number of country codes that is set in <CHostData>.CountryCodes to enumerate all country codes.
  • Page 51 Visual Basic object definitions CHostData properties Table 2-60 COM device properties and parameters Property Parameter Description <CHostData>.ComStartedBy(String) String Sets the start 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...
  • Page 52 52 Visual Basic object definitions CHostData properties Table 2-61 describes the COM device properties and return values. Replace the information in angle brackets with the actual values. Table 2-61 COM device properties and return values Property Return Description value String = <CHostData>.ComParity String Returns one of the following values as the communications parity:...
  • Page 53: Netbios Device Properties

    Visual Basic object definitions CHostData properties Table 2-61 COM device properties and return values Property Return Description value Long = <CHostData>.ComSpeed Long Returns the current setting of the Com Speed of the host object The following values are valid: 1200 2400 4800 9600...
  • Page 54: Isdn Via Capi 2.0 Device Properties

    54 Visual Basic object definitions CHostData properties ISDN via CAPI 2.0 device properties Table 2-64 defines the properties and parameters for European ISDN connections. Replace the information in angle brackets with the actual values. Table 2-64 ISDN via CAPI 2.0 properties and parameters Property Parameter Description <CHostData>.CapiChannelBonding(Bool)
  • Page 55: Chostdataex Object

    Visual Basic object definitions CHostDataEx object CHostDataEx object The CHostDataEx object contains the same functionality as the CHostData object with some additional functionality. Table 2-66 describes the properties and parameters. Replace the information in angle brackets with the actual values. Table 2-66 CHostDataEx properties and parameters Property...
  • Page 56 56 Visual Basic object definitions CHostDataEx object Table 2-66 CHostDataEx properties and parameters Property Parameter Description <CHostData>.ActiveKbds(Byte) Byte Defines which mouse and keyboard will be active during the connection. The following values are valid: 0: Host and remote 1: Host 2: Remote <CHostData>.InactiveTimeout(Byte) Byte...
  • Page 57 Visual Basic object definitions CHostDataEx object Table 2-66 CHostDataEx properties and parameters Property Parameter Description <CHostData>.AuthenticationType(Byte) Byte Sets the authentication type. The following values are valid: 0: pcAnywhere 1: pcAnywhere 2: Windows 3: NT 4: pcAnywhere 5: pcAnywhere 6: ADS Active Directory Services 7: Microsoft LDAP 8: FTP 9: HTTP...
  • Page 58 58 Visual Basic object definitions CHostDataEx object Table 2-66 CHostDataEx properties and parameters Property Parameter Description <CHostData>.EndSessSecurity(Byte) Byte Sets the security options for a normal end of session. The following values are valid: 1: Log off user 2: Restart host computer 3: Lock computer <CHostData>.BlankHost(Bool) Bool...
  • Page 59 Visual Basic object definitions CHostDataEx object Table 2-67 CHostDataEx properties and return values Property Return Description value Byte = <CHostDataEx>.CryptReqLevel Byte Returns one of the following encryption settings: -1: None 0: pcAnywhere 1: Symmetric 2: Public key Bool = <CHostDataEx>.CryptRefuseLower Bool Returns the value of the deny lower encryption setting.
  • Page 60 60 Visual Basic object definitions CHostDataEx object Table 2-67 CHostDataEx properties and return values Property Return Description value Bool = <CHostDataEx>.RunAsService Bool Returns the run host as a service setting. Byte = <CHostDataEx>.ConnLostWait Byte Returns the number of minutes to wait before allowing another connection.
  • Page 61 Visual Basic object definitions CHostDataEx object Table 2-67 CHostDataEx properties and return values Property Return Description value Byte = <CHostDataEx>.ConnLostSecurity Byte Returns the numeric representation of the security level that is set for handling an abnormal end of session. The following values are valid: 1: Log off user 2: Restart host computer 3: Lock computer...
  • Page 62: Visual Basic Sample Code For Host Functionality

    62 Visual Basic object definitions CHostDataEx object Table 2-67 CHostDataEx properties and return values Property Return Description value Bool = <CHostDataEx>.AllowDriveSecurity Bool Returns whether the drive security option is enabled. Bool = <CHostDataEx>.UseDirectoryServices Bool Returns whether the directory services option is enabled.
  • Page 63: Awrem32 Functions

    Visual Basic object definitions Awrem32 functions RemoteData. HostData = "555-5555" 'write object to disk HostData.WriteObject (0) End Sub Use the FindFirst and FindNext methods to display the host file in a directory as follows: Private Sub Command5_Click() Dim HostDataManager as Object Dim HostData as Object Dim s as string Set HostDataManager = CreateObject("WINAWSVR.BEHOSTDATAMANAGER")
  • Page 64: Awdisconnect()

    64 Visual Basic object definitions Awrem32 functions Table 2-69 defines the awConnect return value. Table 2-69 awConnect return value Return value Description Boolean TRUE if command executed awDisconnect() Disconnects the host computer. Table 2-70 defines the return value. Table 2-70 awDisconnect() return value Return value Description...
  • Page 65: Filexfertohost(Hostfile, Remotefile)

    Visual Basic object definitions Awrem32 functions FileXferToHost(HostFile, RemoteFile) Copies a file from the remote computer to the host computer. The parameters can contain wildcard characters. Table 2-73 defines the FileXferToHost parameters. Table 2-73 FileXferToHost parameters Parameter Description HostFile as string Contains the fully qualified destination path and file name.
  • Page 66: Executehostfile(Filename)

    66 Visual Basic object definitions Awrem32 functions ExecuteHostFile(FileName) Executes an existing file on the host computer. This function only executes batch, command, and executable files. It does not execute files that are associated with executables. For example, this function does not open Microsoft Word if you execute a .doc file.
  • Page 67: Connectionstatus()

    Visual Basic object definitions Awrem32 functions ConnectionStatus() Returns the current status of your connection to the host computer. Table 2-80 defines the return value. Table 2-80 ConnectionStatus() return value Return value Description Short The possible values include the following: -1 = Lost connection 0 = No connection 1 = Session connected...
  • Page 68 68 Visual Basic object definitions Awrem32 functions...
  • Page 69: Visual C++ Object Definitions

    Chapter Visual C++ object definitions This chapter includes the following topics: About Visual C++ objects CRemoteDataManager methods CRemoteData object CRemoteDataEx object CHostDataManager methods CHostData object CHostDataEx object Awrem32 functions About Visual C++ 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...
  • Page 70 70 Visual C++ object definitions About Visual C++ objects The objects that are described in Table 3-1 comprise Winawsvr. Table 3-1 Winawsvr objects Object Description Reference CRemoteDataManager Provides the methods for “CRemoteDataManager methods” on page 71. creating, opening, modifying, saving, and deleting CRemoteData objects CRemoteData Defines the parameters for...
  • Page 71: Cremotedatamanager Methods

    Visual C++ object definitions CRemoteDataManager methods CRemoteDataManager methods The CRemoteDataManager methods provide the parameters and return values for accessing and controlling CRemoteData objects. BSTR CurrentDirectory(); Gets the full path name of the current directory in which pcAnywhere remote objects are stored. Table 3-2 defines the parameter.
  • Page 72: Bool Findfirst(Lpctstr Lpszpattern, Bstr Far* Pbstrfullqualname)

    72 Visual C++ object definitions CRemoteDataManager methods BOOL FindFirst(LPCTSTR lpszPattern, BSTR FAR* pbstrFullQualName); Finds the first pcAnywhere remote object file (*.chf) in the current directory, based on the specified file name pattern. Table 3-5 defines the parameters. Table 3-5 BOOL FindFirst parameters Parameter Description LPCTSTR lpszPattern...
  • Page 73: Lpdispatch Retrieveobject(Lpctstr Lpszfqname, Short Waccessmode, Lpctstr Lpszpassword)

    Visual C++ object definitions CRemoteDataManager methods Table 3-8 defines the return value. Table 3-8 BOOL FindNext return value Return value Description BOOL TRUE if another remote object file matching the pattern specified in the call to FindFirst() is found. The full path name of the matching file is stored in pbstrFullQualName.
  • Page 74: Lpdispatch Createobject(Lpctstr Lpszfqname)

    74 Visual C++ object definitions CRemoteDataManager methods Table 3-10 LPDISPATCH RetrieveObjectEx parameters Parameter Description short wAccessMode 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 LPCTSTR lpszPassword...
  • Page 75: Lpdispatch Createobjectex(Lpctstr Lpszfqname)

    Visual C++ object definitions CRemoteDataManager methods Table 3-13 defines the return value. Table 3-13 LPDISPATCH CreateObject return value Return value Description LPDISPATCH Pointer to an OLE dispatch object. The object is a CRemoteData object. For an example of how to attach this pointer to a CRemoteData object, see “Visual C++ sample code for remote functionality”...
  • Page 76: Bool Deleteobject(Lpctstr Lpszfqname, Lpctstr Lpszpassword)

    76 Visual C++ object definitions CRemoteDataManager methods BOOL DeleteObject(LPCTSTR lpszFQName, LPCTSTR lpszPassword); Deletes a remote object file. Table 3-16 defines the parameters. Table 3-16 BOOL DeleteObject parameters Parameter Description LPCTSTR lpszFQName The fully qualified remote object file name of the object to be deleted.
  • Page 77: Cremotedata Object

    Visual C++ object definitions CRemoteData object CRemoteData object Use this object to modify remote object data. Get and Set methods The following methods are used to get and set properties of the CRemoteData object. The computer name is the name of the pcAnywhere host computer to be called when the remote object is launched.
  • Page 78 78 Visual C++ object definitions CRemoteData object BSTR GetAutoLoginName(); void SetAutoLoginName(LPCTSTR lpszNewValue); The login password to be sent to the host when a connection is made. If this is left empty, the user is prompted for a password on connection. BSTR GetAutoLoginPassword();...
  • Page 79: Remote Object Detail Methods

    Visual C++ object definitions CRemoteData object COM4 Infrared ISDN via CAPI 2.0 LPT1 LPT2 LPT3 LPT4 NetBIOS DEFAULT TAPI TCP/IP The name of a TAPI device can also be used as a connection type. DEFAULT TAPI uses the first TAPI device found on the system. To use a specific TAPI device, use FirstConnectionType() / NextConnectionType() to search for available devices.
  • Page 80 80 Visual C++ object definitions CRemoteData object Space Sets the flow control level. BSTR GetComFlowControl(); void SetComFlowControl(LPCTSTR lpszNewValue); Flow control values are as follows: <None> XONXOFF RTS/CTS BOTH Sets the connection start setting. BSTR GetComStartedBy(); void SetComStartedBy(LPCTSTR lpszNewValue); Connection start values are as follows: Always connected Carrier detect (DCD) Clear to send (CTS)
  • Page 81 Visual C++ object definitions CRemoteData object Sets the connection speed. long GetComSpeed(); void SetComSpeed(long nNewValue); Connection speed values are as follows: 1200 2400 4800 9600 19200 38400 57600 115200 NetBIOS device details Sets the LAN Adapter (LANA) number to use for this connection. short GetLanaNumber();...
  • Page 82: Remote Object Methods

    82 Visual C++ object definitions CRemoteData object Remote object methods The following are the normal methods of the remote object (they are not used to get and set properties): short ConnectionTypes(); BSTR FirstConnectionType(); and BSTR NextConnectionType(); BOOL FindConnectionType(LPCTSTR lpszConnectionType); short CountryCodes(); BSTR FirstCountryCode();...
  • Page 83 Visual C++ object definitions CRemoteData object BOOL FindConnectionType(LPCTSTR lpszConnectionType); Returns TRUE if the connection type that is passed in exists on the computer. Table 3-22 defines the parameter. Table 3-22 BOOL FindConnectionType parameter Parameter Description LPCTSTR lpszConnectionType The name of a connection device type Table 3-23 defines the return value.
  • Page 84 84 Visual C++ object definitions CRemoteData object BOOL ReadObject(LPCTSTR lpszPassword); Reads the object data from the remote object file. Table 3-26 defines the parameter. Table 3-26 BOOL ReadObject parameter Parameter Description LPCTSTR lpszPassword The object password Table 3-27 defines the return value. Table 3-27 BOOL ReadObject return value Return value...
  • Page 85: Cremotedataex Object

    Visual C++ object definitions CRemoteDataEx object CRemoteDataEx object The CRemoteDataEx object contains the same functionality as the CRemoteData object with the following additional Get and Set methods: BSTR GetPrivateKey(); //Returns the PrivateKey information void SetPrivateKey(LPCTSTR lpszNewValue); BSTR GetCertificationName(); //Returns the Certification Name void SetCertificationName(LPCTSTR lpszNewValue);...
  • Page 86: Chostdatamanager Methods

    86 Visual C++ object definitions CHostDataManager methods // And launch it if (remoteData.Launch()) bReturn = TRUE; // Release the remote object. remoteData.ReleaseDispatch(); remoteDM.ReleaseDispatch( _T( “WINAWSVR.RemoteDataManager”) ); return bReturn; CHostDataManager methods The CHostDataManager methods provide the parameters and return values for accessing and controlling CHostData objects.
  • Page 87: Bool Findfirst(Lpctstr Lpszpattern, Bstr Far* Pbstrfullqualname)

    Visual C++ object definitions CHostDataManager methods Table 3-32 defines the return value. Table 3-32 BOOL ChangeDirectory return value Return value Description BOOL TRUE if successful BOOL FindFirst(LPCTSTR lpszPattern, BSTR FAR* pbstrFullQualName); Finds the first pcAnywhere host object file (*.bhf) in the current directory, based on the specified file name pattern.
  • Page 88: Lpdispatch Retrieveobject(Lpctstr Lpszfqname, Short Waccessmode, Lpctstr Lpszpassword)

    88 Visual C++ object definitions CHostDataManager methods Table 3-35 defines the parameter. Table 3-35 BOOL FindNext parameter Parameter Description BSTR FAR * pbstrFullQualName Return buffer for the full path name of the host object file that matches the pattern specified in the original call to FindFirst() Table 3-36 defines the return value.
  • Page 89: Lpdispatch Retrieveobjectex(Lpctstr Lpszfqname, Short Waccessmode, Lpctstr Lpszpassword)

    Visual C++ object definitions CHostDataManager methods Table 3-38 defines the return value. Table 3-38 LPDISPATCH RetrieveObject return value Return value Description LPDISPATCH Pointer to an OLE dispatch object. The object is a CHostData object. For an example of how to attach this pointer to a CHostData object, see “Visual C++ sample code for host functionality”...
  • Page 90: Lpdispatch Createobject(Lpctstr Lpszname)

    90 Visual C++ object definitions CHostDataManager methods LPDISPATCH CreateObject(LPCTSTR lpszName); Creates a CHostData object and returns an LPDISPATCH pointer to it. Table 3-41 defines the parameter. Table 3-41 LPDISPATCH CreateObject parameter Parameter Description LPCTSTR lpszFQName The fully qualified host object file name for the new object Table 3-42 defines the return value.
  • Page 91: Bool Deleteobject(Lpctstr Lpszfqname, Lpctstr Lpszpassword)

    Visual C++ object definitions CHostDataManager methods BOOL DeleteObject(LPCTSTR lpszFQName, LPCTSTR lpszPassword); Deletes a host object file. Table 3-45 defines the parameters. Table 3-45 BOOL DeleteObject parameters Parameter Description LPCTSTR lpszFQName The fully qualified host object file name of the object to be deleted.
  • Page 92: Chostdata Object

    92 Visual C++ object definitions CHostData object CHostData object Use this object to modify host object data. Get and Set methods The following methods are used to get and set properties of the CHostData object. The phone number is the number to dial to establish a modem connection to a pcAnywhere remote computer.
  • Page 93: Host Object Detail Methods

    Visual C++ object definitions CHostData object The name of the record file for sessions using this object. BSTR GetRecordFile(); void SetRecordFile(LPCTSTR lpszNewValue); Host object Detail methods When a host object is assigned a connection type, the device details are set to valid default values.
  • Page 94 94 Visual C++ object definitions CHostData object NetBIOS TCP/IP LPT1 LPT2 LPT3 LPT4 ISDN via CAPI 2.0 Infrared DEFAULT TAPI The name of a TAPI device can also be used as a connection type. DEFAULT TAPI uses the first TAPI device found in the system. To use a specific TAPI device, use FirstConnectionType() and NextConnectionType() to search for available devices.
  • Page 95 Visual C++ object definitions CHostData object RTS/CTS BOTH The following code sets the connection start values: BSTR GetComStartedBy(); void SetComStartedBy(LPCTSTR lpszNewValue); Connection start values are as follows: Always connected Carrier detect (DCD) Clear to send (CTS) Data set ready (DSR) Ring indicator (RI) Receive 2 <CR>'s Modem response...
  • Page 96 96 Visual C++ object definitions CHostData object 9600 19200 38400 57600 115200 NetBIOS device details Sets the LAN Adapter (LANA) number to use for this connection. short GetLanaNumber();void SetLanaNumber(short nNewValue); NASI/NCSI device details Sets the user name for the NASI server. BSTR GetNasiUserName();...
  • Page 97: Host Object Methods

    Visual C++ object definitions CHostData object void SetNasiSelectOnConnect(BOOL bNewValue); ISDN via CAPI 2.0 device details Activates channel bonding (uses two ISDN channels for one connection) if TRUE. BOOL GetCapiChannelBonding(); void SetCapiChannelBonding(BOOL bNewValue); Sets any additional CAPI extensions that are needed for communications. BSTR GetCapiExtensions();...
  • Page 98 98 Visual C++ object definitions CHostData object BSTR FirstConnectionType(); and BSTR NextConnectionType(); FirstConnectionType() and NextConnectionType() are used to iterate through the available connection types. The functions return a BSTR, which is the name of an available connection type. You can use these returned connection types with the SetConnectionType() function.
  • Page 99 Visual C++ object definitions CHostData object short AssignedConnections() Returns the number of assigned connection types. Table 3-54 defines the return value. Table 3-54 short AssignedConnections() return value Return value Description Short The number of assigned connection types on this computer BSTR FirstAssignedConnection();...
  • Page 100 100 Visual C++ object definitions CHostData object Table 3-57 defines the return value. Table 3-57 BOOL FindAssignedConnection return value Return value Description BOOL TRUE if this device type is currently assigned short CountryCodes(); Returns the number of country codes available. Table 3-58 defines the return value.
  • Page 101: Chostdataex Object

    Visual C++ object definitions CHostDataEx object Table 3-61 defines the return value. Table 3-61 BOOL ReadObject return value Return value Description BOOL TRUE if object is successfully read BOOL WriteObject(LPCTSTR lpszPassword); Writes the object data out to the host object file. Table 3-62 defines the parameter.
  • Page 102 102 Visual C++ object definitions CHostDataEx object BOOL GetConfirmDeny(); void SetConfirmDeny(BOOL bNewValue); BOOL GetPwCaseSensitive(); void SetPwCaseSensitive(BOOL bNewValue); short GetPwAttempts(); void SetPwAttempts(short nNewValue); short GetPwTimeout(); void SetPwTimeout(short nNewValue); short GetActiveKbds(); void SetActiveKbds(short nNewValue); //Sets ActiveKbds short GetInactiveTimeout(); void SetInactiveTimeout(short nNewValue); short GetCryptReqLevel(); void SetCryptReqLevel(short nNewValue);...
  • Page 103: Visual C++ Sample Code For Host Functionality

    Visual C++ object definitions CHostDataEx object void SetEnableEndSessSecurity(BOOL bNewValue); short GetEndSessSecurity(); void SetEndSessSecurity(short nNewValue); BSTR GetCryptPrivateKey(); void SetCryptPrivateKey(LPCTSTR lpszNewValue); BSTR GetCryptCommonName(); void SetCryptCommonName(LPCTSTR lpszNewValue); BOOL GetBlankHost(); void SetBlankHost(BOOL bNewValue); BOOL GetAllowRemoteMouse(); void SetAllowRemoteMouse(BOOL bNewValue); short GetRebootOnDisconnect(); void SetRebootOnDisconnect(short nNewValue); BOOL GetPasswordAfterDisc(); void SetPasswordAfterDisc(BOOL bNewValue);...
  • Page 104: Awrem32 Functions

    104 Visual C++ object definitions Awrem32 functions // Now, set the required properties hostData.SetConnectionType("TCP/IP"); // Save the object data if (hostData.WriteObject(0)) // And launch it if (hostData.Launch()) bReturn = TRUE; // Release the Host object. hostData.ReleaseDispatch(); return (bReturn); Awrem32 functions The Awrem32 functions provide the parameters and return values for handling connections between a host and remote computer.
  • Page 105: Boolean Awdisconnect()

    Visual C++ object definitions Awrem32 functions boolean awDisconnect(); Disconnects the host computer. Table 3-66 defines the return value. Table 3-66 boolean awDisconnect(); return value Return value Description Boolean After calling this function, the calling program must delete the object (C++ - delete IAwrem32X*, VB – set ObjectName = Nothing;).
  • Page 106: Boolean Createfolderonhost(Bstr Foldername)

    106 Visual C++ object definitions Awrem32 functions Table 3-69 defines the parameters. Table 3-69 boolean FileXferToHost parameters Parameter Description HostFile as string Contains the fully qualified destination path and file name. RemoteFile as string Contains the fully qualified path and file name to be copied from the remote computer.
  • Page 107: Bstr Geterror()

    Visual C++ object definitions Awrem32 functions Table 3-73 defines the parameter. Table 3-73 boolean ExecuteHostFile parameter Parameter Description FileName as string Contains the fully qualified path to the file on the host computer Table 3-74 defines the return value. Table 3-74 boolean ExecuteHostFile return value Return value Description...
  • Page 108 108 Visual C++ object definitions Awrem32 functions...
  • Page 109 Index connections (continued) returning errors 107 API libraries 16 returning status 67, 107 automation controllers starting 43, 63, 76, 104 about Visual Basic 14 country codes about Visual C++ 15 on host 100 automation server. See pcAnywhere Automation on remote 83 Server CRemoteData Awrem32...
  • Page 110 110 Index host objects parity 31, 50, 79, 94 creating 42, 90 passwords deleting 43, 91 on host objects 100 device details 93 on remote objects 84 dialing properties 49 pcAnywhere Automation Server directories 39, 86 about 12 finding 40-42, 87-89 accessing with Visual Basic 14 methods 97 accessing with Visual C++ 15...
  • Page 111 Index Visual Basic (continued) CRemoteDataManager object 20 Visual C++ accessing pcAnywhere Automation Server 15 Awrem32 functions 104 CHostData object 92 CHostDataEx object 101 CHostDataManager object 86 code samples 85, 103 CRemoteData object 77 CRemoteDataEx object 85 CRemoteDataManager object 71 importing classes 16 including Winawsvr.h 17 Winawsvr executable 14...
  • Page 112 112 Index...

This manual is also suitable for:

PcanywherePcanywhere - v 12.0 automation guide

Table of Contents