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.
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.
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.
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 ..........
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...
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.
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”...
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.
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...
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...
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...
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.
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.
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.
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.
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...
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.
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.
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)
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...
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...
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)
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...
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...
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.
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...
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.
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.
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...
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...
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.
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.
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...
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:...
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...
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)
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...
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")
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.
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.
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...
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...
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.
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...
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.
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...
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”...
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.
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();...
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();...
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...
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);...
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.
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.
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.
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”...
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.
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.
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.
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();...
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.
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);...
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.
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;).
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.
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...
Need help?
Do you have a question about the 14541094 - pcAnywhere Host & Remote and is the answer not in the manual?
Questions and answers