Symantec 14541094 OLE Automation Guide

Symantec 14541094 - pcAnywhere Host & Remote Manual

Symantec 14541094 manual content summary:

  • Symantec 14541094 | OLE Automation Guide - Page 1
    Symantec pcAnywhere™ OLE Automation Guide
  • Symantec 14541094 | OLE Automation Guide - Page 2
    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
  • Symantec 14541094 | OLE Automation Guide - Page 3
    Support group works with Product Engineering and Symantec Security Response to provide alerting services Support program ■ Advanced features, including Technical Account Support Customers with a current maintenance agreement may access Technical Support Support. Before contacting Technical Support,
  • Symantec 14541094 | OLE Automation Guide - Page 4
    gateway, and IP address information ■ Problem description: ■ Error messages and log files ■ Troubleshooting that was performed before contacting Symantec ent/enterprise.html Select your country or language under Global Support. Customer Service is available to assist with the following types of
  • Symantec 14541094 | OLE Automation Guide - Page 5
    Issues that are related to CD-ROMs or manuals Maintenance agreement resources If you want to contact Security Services These services remove the burden of managing and monitoring security devices and events, ensuring rapid response to real threats. Consulting services Symantec Consulting Services
  • Symantec 14541094 | OLE Automation Guide - Page 6
  • Symantec 14541094 | OLE Automation Guide - Page 7
    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
  • Symantec 14541094 | OLE Automation Guide - 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
  • Symantec 14541094 | OLE Automation Guide - Page 9
    Contents 9 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
  • Symantec 14541094 | OLE Automation Guide - Page 10
    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
  • Symantec 14541094 | OLE Automation Guide - Page 11
    ■ 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
  • Symantec 14541094 | OLE Automation Guide - Page 12
    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 or archive purposes ■ Automatically add a name to or remove a name from the allowed callers list on every pcAnywhere host on your
  • Symantec 14541094 | OLE Automation Guide - Page 13
    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 14. Automatically registering the remote engine Before you
  • Symantec 14541094 | OLE Automation Guide - Page 14
    you are running the external application, you must register the GUIDs manually by running the pcAnywhere Automation Server executable file (Winawsvr.exe). with Visual Basic The Visual Basic programming language has built-in support to interact with OLE Automation servers, such as the pcAnywhere
  • Symantec 14541094 | OLE Automation Guide - Page 15
    Using OLE Automation with Symantec pcAnywhere 15 Before you start ■ 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
  • Symantec 14541094 | OLE Automation Guide - Page 16
    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
  • Symantec 14541094 | OLE Automation Guide - Page 17
    Using OLE Automation with Symantec pcAnywhere 17 Where to find more information 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 ■
  • Symantec 14541094 | OLE Automation Guide - Page 18
    18 Using OLE Automation with Symantec pcAnywhere Where to find more information
  • Symantec 14541094 | OLE Automation Guide - Page 19
    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
  • Symantec 14541094 | OLE Automation Guide - Page 20
    See "Awrem32 functions" on page 63. Some functions are no longer supported. However, object definitions are provided for use with earlier versions of pcAnywhere be set but not retrieved. This is for security purposes. CRemoteDataManager methods The CRemoteDataManager methods provide the parameters
  • Symantec 14541094 | OLE Automation Guide - Page 21
    Visual Basic object definitions 21 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
  • Symantec 14541094 | OLE Automation Guide - Page 22
    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
  • Symantec 14541094 | OLE Automation Guide - Page 23
    Visual Basic object definitions 23 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 Name as string AccessMode as integer Password as
  • Symantec 14541094 | OLE Automation Guide - Page 24
    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
  • Symantec 14541094 | OLE Automation Guide - Page 25
    Visual Basic object definitions 25 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 Password as string The fully qualified remote
  • Symantec 14541094 | OLE Automation Guide - Page 26
    more information about using domain logins, see "CRemoteDataEx object" on page 36. 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. Sets the
  • Symantec 14541094 | OLE Automation Guide - Page 27
    Visual Basic object definitions 27 CRemoteData properties Table 2-19 Property .RecordFile(String) .RecordSession(Bool) .ReadObject(String) .WriteObject(String) CRemoteData properties and parameters Parameter Description String Bool String
  • Symantec 14541094 | OLE Automation Guide - Page 28
    28 Visual Basic object definitions CRemoteData properties Property Table 2-20 Bool = .RecordSession CRemoteData properties and return values Return value Description Bool Returns the value of the session recording setting Connection type properties Table 2-21 defines the
  • Symantec 14541094 | OLE Automation Guide - Page 29
    Visual Basic object definitions 29 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 String = .ConnectionTypes
  • Symantec 14541094 | OLE Automation Guide - Page 30
    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
  • Symantec 14541094 | OLE Automation Guide - Page 31
    Visual Basic object definitions 31 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
  • Symantec 14541094 | OLE Automation Guide - Page 32
    32 Visual Basic object definitions CRemoteData properties Table 2-25 Property .ComEndedBy(String) .ComSpeed(Long) COM device properties and parameters Parameter Description String Sets the end setting of COM-based connection types The following values are valid: ■
  • Symantec 14541094 | OLE Automation Guide - Page 33
    Visual Basic object definitions 33 CRemoteData properties Table 2-26 COM device properties and return values Property String = .ComFlowControl String = .ComStartedBy String = .ComEndedBy Return value String String String Description Returns the Com Flow
  • Symantec 14541094 | OLE Automation Guide - Page 34
    34 Visual Basic object definitions CRemoteData properties Property Table 2-26 Long = .ComSpeed COM device properties and return values Return value Long Description Returns the current setting of the Com Speed of the remote object The following values are valid: ■ 110 ■ 300 ■ 600
  • Symantec 14541094 | OLE Automation Guide - Page 35
    Visual Basic object definitions 35 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
  • Symantec 14541094 | OLE Automation Guide - Page 36
    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
  • Symantec 14541094 | OLE Automation Guide - Page 37
    Visual Basic object definitions 37 CRemoteDataEx object Table 2-32 CRemoteDataEx properties and return values Property Return value Description Byte = .EncryptionLevel Byte Bool = .DenyLowerEncrypt Bool String = .AutoDomain String Returns one of the
  • Symantec 14541094 | OLE Automation Guide - 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
  • Symantec 14541094 | OLE Automation Guide - Page 39
    Visual Basic object definitions 39 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 =
  • Symantec 14541094 | OLE Automation Guide - Page 40
    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
  • Symantec 14541094 | OLE Automation Guide - Page 41
    Visual Basic object definitions 41 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 Name as string AccessMode as integer Password
  • Symantec 14541094 | OLE Automation Guide - Page 42
    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
  • Symantec 14541094 | OLE Automation Guide - Page 43
    Visual Basic object definitions 43 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 Password as string The fully qualified host object
  • Symantec 14541094 | OLE Automation Guide - Page 44
    wait between redial attempts. Sets the password on the host 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. Sets
  • Symantec 14541094 | OLE Automation Guide - Page 45
    Visual Basic object definitions 45 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 value Description String = .
  • Symantec 14541094 | OLE Automation Guide - Page 46
    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 .
  • Symantec 14541094 | OLE Automation Guide - Page 47
    Visual Basic object definitions 47 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 String = .ConnectionTypes
  • Symantec 14541094 | OLE Automation Guide - Page 48
    assigned connection count is already at the maximum allowed level. A pcAnywhere host object can support up to two assigned connection types. The AssignConnection method returns FALSE if it detects an type that is passed in is successfully removed from the list of assigned connection types.
  • Symantec 14541094 | OLE Automation Guide - Page 49
    Visual Basic object definitions 49 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
  • Symantec 14541094 | OLE Automation Guide - Page 50
    50 Visual Basic object definitions CHostData properties Table 2-59 Properties and return values for modem dialing properties Property Return value Description String = .NextCountryCode String Returns the next available country code. This is called sequentially for the number of
  • Symantec 14541094 | OLE Automation Guide - Page 51
    Visual Basic object definitions 51 CHostData properties Table 2-60 Property .ComStartedBy(String) .ComEndedBy(String) .ComSpeed(Long) COM device properties and parameters Parameter Description String Sets the start setting of COM-based connection types The
  • Symantec 14541094 | OLE Automation Guide - 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 String = .ComParity String = <
  • Symantec 14541094 | OLE Automation Guide - Page 53
    Visual Basic object definitions 53 CHostData properties Property Table 2-61 Long = .ComSpeed COM device properties and return values Return value Long Description Returns the current setting of the Com Speed of the host object The following values are valid: ■ 110 ■ 300 ■ 600 ■ 1200
  • Symantec 14541094 | OLE Automation Guide - Page 54
    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
  • Symantec 14541094 | OLE Automation Guide - Page 55
    Visual Basic object definitions 55 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
  • Symantec 14541094 | OLE Automation Guide - Page 56
    Bool Sets the run minimized host startup option. Bool Enables the host to run as a service. Byte Sets the number of minutes to wait before allowing another caller to connect. Bool : Cancel host Bool Activates or deactivates the end of session security options for sessions that end abnormally.
  • Symantec 14541094 | OLE Automation Guide - Page 57
    2: Windows ■ 3: NT ■ 4: pcAnywhere ■ 5: pcAnywhere ■ 6: ADS Active Directory Services ■ 7: Microsoft LDAP ■ 8: FTP ■ 9: HTTP ■ 10: HTTPS ■ 11: (for example, the authentication type is not available). Byte Sets the security options for handling an abnormal end of session. The following values are
  • Symantec 14541094 | OLE Automation Guide - Page 58
    Sets screen blanking on the host computer. Some video cards do not support this option. Bool Disables the use of the mouse on the security options. This setting is valid only on NTFS file systems. Bool Enables the use of directory services for authentication. String Sets the directory services
  • Symantec 14541094 | OLE Automation Guide - Page 59
    Visual Basic object definitions 59 CHostDataEx object Table 2-67 CHostDataEx properties and return values Property Byte = .CryptReqLevel Return value Byte Bool = .CryptRefuseLower String = .CallersPath Bool = .ConfirmConnect Byte = <
  • Symantec 14541094 | OLE Automation Guide - Page 60
    Byte Bool Bool Byte Description Returns the run host as a service setting. Returns the number of minutes to wait before allowing another are valid: ■ FALSE: Wait ■ TRUE: Cancel host Returns the value of the security option that is set for handling an abnormal end of session. Returns the number
  • Symantec 14541094 | OLE Automation Guide - Page 61
    . The following values are valid: ■ FALSE: Wait for next connection ■ TRUE: Cancel host Returns whether the end of session security options are enabled for a normal end of session. Returns the security option that is set for a normal end of session. The following values are valid: ■ 1: Log off user
  • Symantec 14541094 | OLE Automation Guide - Page 62
    >.UseDirectoryServices Bool String = .DirectoryServiceEntry String Returns whether the drive security option is enabled. Returns whether the directory services option is enabled. Returns the directory service settings. Visual Basic sample code for host functionality The following
  • Symantec 14541094 | OLE Automation Guide - Page 63
    Visual Basic object definitions 63 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
  • Symantec 14541094 | OLE Automation Guide - Page 64
    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
  • Symantec 14541094 | OLE Automation Guide - Page 65
    Visual Basic object definitions 65 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
  • Symantec 14541094 | OLE Automation Guide - Page 66
    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
  • Symantec 14541094 | OLE Automation Guide - Page 67
    Visual Basic object definitions 67 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 Short Description The possible values include the following:
  • Symantec 14541094 | OLE Automation Guide - Page 68
    68 Visual Basic object definitions Awrem32 functions
  • Symantec 14541094 | OLE Automation Guide - Page 69
    ■ 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
  • Symantec 14541094 | OLE Automation Guide - Page 70
    control and file transfer sessions. See "Awrem32 functions" on page 104. Some functions are no longer supported. However, object definitions are provided for use with earlier versions. For functions that require passwords, password values can be set but not retrieved. This is for security purposes.
  • Symantec 14541094 | OLE Automation Guide - Page 71
    Visual C++ object definitions 71 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
  • Symantec 14541094 | OLE Automation Guide - Page 72
    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
  • Symantec 14541094 | OLE Automation Guide - Page 73
    Visual C++ object definitions 73 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
  • Symantec 14541094 | OLE Automation Guide - Page 74
    74 Visual C++ object definitions CRemoteDataManager methods Table 3-10 LPDISPATCH RetrieveObjectEx parameters Parameter Description short wAccessMode LPCTSTR lpszPassword Specifies how this object is to be used. This relates to the password protection. The options are as follows: ■ 0 = Not
  • Symantec 14541094 | OLE Automation Guide - Page 75
    Visual C++ object definitions 75 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
  • Symantec 14541094 | OLE Automation Guide - Page 76
    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 LPCTSTR lpszPassword The
  • Symantec 14541094 | OLE Automation Guide - Page 77
    Visual C++ object definitions 77 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
  • Symantec 14541094 | OLE Automation Guide - 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(); void
  • Symantec 14541094 | OLE Automation Guide - Page 79
    Visual C++ object definitions 79 CRemoteData object ■ COM4 ■ Infrared ■ ISDN via CAPI 2.0 ■ LPT1 ■ LPT2 ■ LPT3 ■ LPT4 ■ NetBIOS ■ SPX ■ 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
  • Symantec 14541094 | OLE Automation Guide - 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: ■ ■ XONXOFF ■ RTS/CTS ■ BOTH Sets the connection start setting. BSTR GetComStartedBy(); void
  • Symantec 14541094 | OLE Automation Guide - Page 81
    Visual C++ object definitions 81 CRemoteData object Sets the connection speed. long GetComSpeed(); void SetComSpeed(long nNewValue); Connection speed values are as follows: ■ 110 ■ 300 ■ 600 ■ 1200 ■ 2400 ■ 4800 ■ 9600 ■ 19200 ■ 38400 ■ 57600 ■ 115200 NetBIOS device details Sets the LAN Adapter (
  • Symantec 14541094 | OLE Automation Guide - Page 82
    the SetConnectionType() function. Table 3-21 defines the return value. Table 3-21 BSTR FirstConnectionType(); and BSTR NextConnectionType(); return value Return value BSTR Description The name of a supported connection device type
  • Symantec 14541094 | OLE Automation Guide - Page 83
    Visual C++ object definitions 83 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
  • Symantec 14541094 | OLE Automation Guide - 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
  • Symantec 14541094 | OLE Automation Guide - Page 85
    Visual C++ object definitions 85 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
  • Symantec 14541094 | OLE Automation Guide - Page 86
    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
  • Symantec 14541094 | OLE Automation Guide - Page 87
    Visual C++ object definitions 87 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
  • Symantec 14541094 | OLE Automation Guide - Page 88
    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
  • Symantec 14541094 | OLE Automation Guide - Page 89
    Visual C++ object definitions 89 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
  • Symantec 14541094 | OLE Automation Guide - Page 90
    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
  • Symantec 14541094 | OLE Automation Guide - Page 91
    Visual C++ object definitions 91 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 LPCTSTR lpszPassword The
  • Symantec 14541094 | OLE Automation Guide - Page 92
    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
  • Symantec 14541094 | OLE Automation Guide - Page 93
    does not exist on the computer or the current assigned connection count is already at the maximum allowed level. A pcAnywhere host object can support up to two assigned connection types. The AssignConnection method returns FALSE if it detects an attempt to exceed this limit. The following connection
  • Symantec 14541094 | OLE Automation Guide - Page 94
    94 Visual C++ object definitions CHostData object ■ SPX ■ 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
  • Symantec 14541094 | OLE Automation Guide - Page 95
    Visual C++ object definitions 95 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
  • Symantec 14541094 | OLE Automation Guide - Page 96
    ); Specifies the NASI server to use. BOOL NasiServer(); BSTR GetNasiServerName(); void SetNasiServerName(LPCTSTR lpszNewValue); Specifies the NASI Service to use. BOOL NasiService(); BSTR GetNasiServiceName(); void SetNasiServiceName(LPCTSTR lpszNewValue); Specifies the NASI Port to use. BOOL
  • Symantec 14541094 | OLE Automation Guide - Page 97
    Visual C++ object definitions 97 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
  • Symantec 14541094 | OLE Automation Guide - Page 98
    the return value. Table 3-50 BSTR FirstConnectionType(); and BSTR NextConnectionType(); return value Return value BSTR Description The name of a supported connection device type BOOL FindConnectionType(LPCTSTR lpszConnectionType); Returns TRUE if the connection type that is passed in exists on
  • Symantec 14541094 | OLE Automation Guide - Page 99
    value. Table 3-55 BSTR FirstAssignedConnection(); and BSTR NextAssignedConnection(); return value Return value Description BSTR The name of a supported connection device type BOOL FindAssignedConnection (LPCTSTR lpszConnectionType); Returns TRUE if the connection type that is passed in is
  • Symantec 14541094 | OLE Automation Guide - 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.
  • Symantec 14541094 | OLE Automation Guide - Page 101
    Visual C++ object definitions 101 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.
  • Symantec 14541094 | OLE Automation Guide - 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);
  • Symantec 14541094 | OLE Automation Guide - Page 103
    Visual C++ object definitions 103 CHostDataEx object void SetEnableEndSessSecurity(BOOL bNewValue); short GetEndSessSecurity(); void SetEndSessSecurity(short nNewValue); BSTR GetCryptPrivateKey(); void SetCryptPrivateKey(LPCTSTR lpszNewValue); BSTR GetCryptCommonName(); void SetCryptCommonName(
  • Symantec 14541094 | OLE Automation Guide - Page 104
    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();
  • Symantec 14541094 | OLE Automation Guide - Page 105
    Visual C++ object definitions 105 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
  • Symantec 14541094 | OLE Automation Guide - Page 106
    106 Visual C++ object definitions Awrem32 functions Table 3-69 defines the parameters. Table 3-69 boolean FileXferToHost parameters Parameter Description HostFile as string RemoteFile as string Contains the fully qualified destination path and file name. Contains the fully qualified path and
  • Symantec 14541094 | OLE Automation Guide - Page 107
    Visual C++ object definitions 107 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
  • Symantec 14541094 | OLE Automation Guide - Page 108
    108 Visual C++ object definitions Awrem32 functions
  • Symantec 14541094 | OLE Automation Guide - Page 109
    host 64, 105 to host 65, 105 files, running on host 66, 106 flow control 31, 50, 79, 94 folders, creating on host 65, 106 G GUIDs 13
  • Symantec 14541094 | OLE Automation Guide - Page 110
    Server about 12 accessing with Visual Basic 14 accessing with Visual C++ 15 example uses 12 registering GUIDs 13 type libraries 16 R remote engine automatically registering 13 manually registering 14 remote objects creating 74 deleting 25, 76 device details 79 dialing properties 30 directories 20
  • Symantec 14541094 | OLE Automation Guide - Page 111
    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
  • Symantec 14541094 | OLE Automation Guide - Page 112
    112 Index
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112

Symantec pcAnywhere™
OLE Automation Guide