background image

Description

Parameter or
return value

Method

Writes the object data out to the host
object file

The parameter is the object password

The return value is TRUE if object is
successfully written

Parameter =
LPCTSTR
lpszPassword

Return value =
BOOL

BOOL
WriteObject(LPCTSTR
lpszPassword);

CHostDataEx object

The CHostDataEx object contains the same functionality as the CHostData object
with the following additional Get and Set methods:

BOOL GetReadProtection();

void SetReadProtection(BOOL bNewValue);

BOOL GetWriteProtection();

void SetWriteProtection(BOOL bNewValue);

BSTR GetPassword(); //Returns "NOT IMPLEMENTED"

void SetPassword(LPCTSTR lpszNewValue);

BSTR GetCallersPath();

void SetCallersPath(LPCTSTR lpszNewValue);

BOOL GetConfirmConnect();

void SetConfirmConnect(BOOL bNewValue);

short GetConfirmTimeout();

void SetConfirmTimeout(short nNewValue);

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);

BOOL GetCryptRefuseLower();

void SetCryptRefuseLower(BOOL bNewValue);

Visual C++ object definitions

CHostDataEx object

82

Summary of Contents for OLE Automation

Page 1: ...OLE Automation Guide ...

Page 2: ... may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors if any THEDOCUMENTATIONISPROVIDED ASIS ANDALLEXPRESSORIMPLIEDCONDITIONS REPRESENTATIONS AND WARRANTIES INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT ARE DISCLAIMED EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE...

Page 3: ...Symantec Corporation 20330 Stevens Creek Blvd Cupertino CA 95014 http www symantec com Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ...

Page 4: ...hat provides rapid response and up to the minute information Upgrade assurance that delivers automatic software upgrade protection Global support that is available 24 hours a day 7 days a week Advanced features including Account Management Services For information about Symantec s Maintenance Programs you can visit our Web site at the following URL www symantec com techsupp Contacting Technical Su...

Page 5: ...e Customer service information is available at the following URL www symantec com techsupp Customer Service is available to assist with the following types of issues Questions regarding product licensing or serialization Product registration updates such as address or name changes General product information features language availability local dealers Latest information about product updates and ...

Page 6: ...d countermeasures to prevent attacks before they occur Symantec Early Warning Solutions These services remove the burden of managing and monitoring security devices and events ensuring rapid response to real threats Managed Security Services Symantec Consulting Services provide on site technical expertise from Symantec and its trusted partners Symantec Consulting Services offer a variety of prepac...

Page 7: ...on Server with Visual C 13 Launching host and remote OLE objects 15 Where to find more information 15 Chapter 2 Visual Basic object definitions 17 About Visual Basic objects 17 CRemoteDataManager methods 18 CRemoteData properties 21 Connection type properties 23 Dialing properties 25 COM device properties 26 NetBIOS device properties 29 ISDN via CAPI 2 0 device properties 30 CRemoteDataEx object 3...

Page 8: ...jects 59 CRemoteDataManager methods 60 CRemoteData object 63 Get and Set methods 63 Remote object Detail methods 66 Remote object methods 68 CRemoteDataEx object 70 Visual C sample code for remote functionality 70 CHostDataManager methods 71 CHostData object 75 Get and Set methods 75 Host object Detail methods 76 Host object methods 80 CHostDataEx object 82 Visual C sample code for host functional...

Page 9: ... technology that lets you create an external application or other development tool such as a script or macro that can control and automate any exposed function within an application OLE Automation consists of the following components An application or software component that exposes its functionality so that it can be accessed or controlled by other applications or development tools The pcAnywhere...

Page 10: ...le transfer tasks The pcAnywhere Automation Server functions as a programmable replacement for the Symantec pcAnywhere user interface and mirrors much of its default behavior For example when you create a host object in pcAnywhere the first available modem TAPI device is assigned by default Similarly when you create a host object using the pcAnywhere Automation Server and then enumerate through th...

Page 11: ...egister the GUID entries manually See Automatically registering the remote engine on page 11 See Manually registering the remote engine on page 11 Automatically registering the remote engine Before you connect to another computer for the first time using your OLE client you must self register the remote engine You can do this automatically when you start a remote object in Symantec pcAnywhere To a...

Page 12: ...d Exe project and then enter code in each method to access the pcAnywhere Automation Server Visual Basic takes the high level method calls in the source files and expands them internally into the corresponding low level OLE Automation method calls To access the pcAnywhere Automation Server with Visual Basic 1 Add a pair of Object variables for each pcAnywhere object that you want to access For exa...

Page 13: ...e written in Visual C These type libraries use Microsoft Foundation Classes MFC which can be imported into your application using the Visual C ClassWizard The data manager classes that are provided in the type libraries provide the functionality that is needed to obtain an interface to the pcAnywhere Automation Server and perform high level operations on the interface s associated object type Use ...

Page 14: ...k From a type library 7 Double click awrem32 tlb 8 In the Confirm Classes dialog box click OK to import all class definitions 9 In the Class Wizard dialog box click OK to complete the import process The classes are added to the application These classes let you manipulate objects and manage connections Importing the class definitions from the type libraries also adds support files to the applicati...

Page 15: ...nd remote objects in the default data directory Before you launch a host or remote object that you created using OLE ensure that the object is located in the pcAnywhere default data directory The default directory is the All Users folder in Windows XP and is the ProgramData folder in Vista Where to find more information For more information about OLE automation see the following references Box Don...

Page 16: ...Using OLE Automation with Symantec pcAnywhere Where to find more information 16 ...

Page 17: ...rties CHostDataEx object Awrem32 functions About Visual Basic objects The pcAnywhere Automation Server provides the following components to support OLE Automation Provides the information needed to connect to the pcAnywhere Automation Server and access its interfaces Winawsvr Provides the information needed to control pcAnywhere connections Awrem32 Table 2 1 describes the objects that comprise Win...

Page 18: ...ts of eight interfaces to support remote control and file transfer sessions See Awrem32 functions on page 55 Some functions are no longer supported However object definitions are provided for use with earlier versions of pcAnywhere For functions that require passwords password values can be set but not retrieved This is for security purposes CRemoteDataManager methods The CRemoteDataManager method...

Page 19: ...l to FindFirst Parameter Name as string FindNext Name TRUE if another remote object file that matches the pattern that is specified in the call to FindFirst is found The full path name of the matching file is stored in Name Return value Boolean FindNext Name The fully qualified remote object file name to be loaded Parameter Name as string RetrieveObject Name Specifies how this object is to be used...

Page 20: ...n LPDISPATCH pointer to it The parameter is the fully qualified remote object file name for the new object Parameter Name as string CreateObject Name CRemoteData Return value Object CreateObject Creates a CRemoteDataEx object and returns an LPDISPATCH pointer to it The parameter is the fully qualified remote object file name for the new object Parameter Name as string CreateObjectEx Name CRemoteDa...

Page 21: ...teData RedialDelay Integer Sets the name of the user for automatic login For more information about using domain logins See CRemoteDataEx object on page 31 String CRemoteData AutoLoginName String Sets the password for automatic logins in the remote object For security reasons the pcAnywhere Automation Server does not provide the ability to read the password value A password value is not returned S...

Page 22: ...emote object String CRemoteData ReadObject String Sets the password of the object Use this property to create the remote object or to write changes that you have made to the remote object String CRemoteData WriteObject String The properties and return values for CRemoteData are shown in the following table In Table 2 4 replace the information in angle brackets with the actual values Table 2 4 CRem...

Page 23: ...l Bool CRemoteData ReadProtection Returns the value of the WriteProtection setting Bool Bool CRemoteData WriteProtection Returns TRUE if session logging is enabled Bool Bool CRemoteData LogSession Returns the fully qualified path and name of the session recording file String String CRemoteData RecordFile Returns the value of the session recording setting Bool Bool CRemoteData RecordSession Connect...

Page 24: ...M3 COM4 TCP IP SPX NetBIOS ISDN via CAPI 2 0 Modem name as it appears on the computer String CRemoteData ConnectionType String The following table defines the connection type properties and return values In Table 2 6 replace the information in angle brackets with the actual values Table 2 6 Connection type properties and return values Description Return value Property Returns the connection type o...

Page 25: ...on types that is set in CRemoteData ConnectionTypetoenumerate all connection types String String CRemoteData NextConnectionType Returns TRUE if the named connection type is found in the list of available connection types Bool Bool CRemoteData FindConnectionType ConnectionType Dialing properties The following table defines the properties and parameters for setting the dialing properties for modem c...

Page 26: ...country code String String CRemoteData CountryCode Returns the number of available country codes Integer Integer CRemoteData CountryCodes Returns the first available country code that is listed in the operating system String String CRemoteData FirstCountryCode Returns the next available country code This is called sequentially for the number of country codes that is set in CRemoteData CountryCodes...

Page 27: ...omFlowControl 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 Modem response String CRemoteData ComStartedBy String Sets the end setting of COM based connection types The following values are valid Always connected Carrier detect DCD Clear to send CTS...

Page 28: ...turn values In Table 2 10 replace the information in angle brackets with the actual values Table 2 10 COM device properties and return values Description Return value Property Returns one of the following values for communications parity None Odd Even Mark Space String String CRemoteData ComParity Returns the Com Flow setting of the remote object The following values are valid None XONXOFF RTS CTS...

Page 29: ...the Com End control 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 String String CRemoteData ComEndedBy Returns the current setting of the Com Speed of the remote object The following values are valid 110 300 600 1200 2400 4800 9600 38400 57600 115200 Long Long CRemoteData ComSpeed NetBIOS devi...

Page 30: ...erties and parameters for European ISDN connections In Table 2 13 replace the information in angle brackets with the actual values Table 2 13 ISDN via CAPI 2 0 properties and parameters Description Parameter Property Activates or deactivates channel bonding for ISDN CAPI devices Bool CRemoteData CapiChannelBonding Bool Sets any additional CAPI extensions that are needed for communications String C...

Page 31: ...to use String CRemoteData PrivateKey String Sets the common name of the private key to use String CRemoteData CertificateName String Sets the encryption level The following values are valid 1 None 0 pcAnywhere 1 Symmetric 2 Public key Byte CRemoteData EncryptionLevel Byte Defines whether the remote computer allows a connection to a host computer that uses a lower level of encryption Bool CRemoteDa...

Page 32: ... domain name setting for automatic logins This option is used with NT authentication and Windows authentication String String CRemoteData AutoDomain Visual Basic sample code for remote functionality The following Visual Basic sample code retrieves a remote data object and modifies its properties Private Sub Command1_Click Dim RemoteDataManager as Object Dim RemoteData as Object Dim s as string Cre...

Page 33: ...emoteData 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 Dim RemoteData as Object Dim s as string Set RemoteDataManager CreateObject WINAWSVR REMOTEDATAMANAGER RemoteDataManager ChangeDirectory C dev bin w32 data RemoteDataManager FindFirst s MsgBox s RemoteDataManager Find...

Page 34: ...ox 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 Description Parameter or return value CHostDataManager method The full path name of the current pcAnywhere data directory in which pcAnywhere host objects are stored Return value Strin...

Page 35: ... be loaded Parameter Name as string RetrieveObject Name 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 Parameter AccessMode as integer RetrieveObject AccessMode Object password May be NULL Parameter Password as string RetrieveObject Password CHostData object from the specified file R...

Page 36: ...he new object Parameter Name as string CreateObjectEx Name CHostDataEx Return value Object CreateObjectEx The fully qualified host object file name of the object to be deleted Parameter Name as string DeleteObject Name Object password Parameter Password as string DeleteObject Password TRUE if object is deleted Return value Boolean DeleteObject Launches a host object file which opens the pcAnywhere...

Page 37: ...uirement of a password to execute the object Set by Password Bool CHostData ExecuteProtection Bool Sets the requirement of a password to view the properties of the host object Set by Password Bool CHostData ReadProtection Bool Sets the requirement of a password to save changes to the host object Set by Password Bool CHostData WriteProtection Bool Activates and deactivates session logging Bool CHos...

Page 38: ...s Integer Integer CHostData RedialDelay Returns the value of the ExecuteProtection setting Bool Bool CHostData ExecuteProtection Returns the value of the ReadProtection setting Bool Bool CHostData ReadProtection Returns the value of the Write Protection setting Bool Bool CHostData WriteProtection Returns TRUE if session logging is enabled Bool Bool CHostData LogSession Returns the fully qualified ...

Page 39: ...Type String Sets the connection type that is defined in the string to active status String CHostData AssignConnection String Sets the connection type that is defined in the string to inactive status String CHostData UnassignConnection String The following table describes the connection type properties and return values In Table 2 20 replace the information in angle brackets with the actual values ...

Page 40: ...ctionTypes to enumerate all connection types String String CHostData NextConnectionType Returns TRUE if the named connection type is found in the list of available connection types Bool Bool CHostData FindConnectionType ConnectionType Returns the maximum number of connection types that can be active on this host Integer Integer CHostData MaxAssignedConnections Returns the first assigned active con...

Page 41: ...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 table defines the AssignConnection parameter Description Parameter The name of a connection device type to be assigned ConnectionTy...

Page 42: ... 22 replace the information in angle brackets with the actual values Table 2 22 Properties and return values for modem dialing properties Description Return value Property Returns the area code String String CHostData AreaCode Returns the country code String String CHostData CountryCode Returns the number of available country codes Integer Integer CHostData CountryCodes Returns the first available...

Page 43: ...e XONXOFF RTS CTS Both String CHostData ComFlowControl 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 Modem response String CHostData ComStartedBy String Sets the end setting of COM based connection types The following values are valid Always connect...

Page 44: ...turn values In Table 2 24 replace the information in angle brackets with the actual values Table 2 24 COM device properties and return values Description Return value Property Returns one of the following values as the communications parity None Odd Even Mark Space String String CHostData ComParity Returns the Com Flow setting of the host object The following values are valid None XONXOFF RTS CTS ...

Page 45: ...rns the Com End control 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 String String CHostData ComEndedBy Returns the current setting of the Com Speed of the host object The following values are valid 110 300 600 1200 2400 4800 9600 38400 57600 115200 Long Long CHostData ComSpeed NetBIOS device...

Page 46: ...ice properties The following table defines the properties and parameters for European ISDN connections In Table 2 27 replace the information in angle brackets with the actual values Table 2 27 ISDN via CAPI 2 0 properties and parameters Description Parameter Property Activates or deactivates channel bonding for ISDN CAPI devices Bool CHostData CapiChannelBonding Bool Sets any additional CAPI exten...

Page 47: ...ainer to use String CHostData CryptPrivateKey String Sets the common name of the private key to use String CHostData CryptCommonName String Sets the encryption level The following values are valid 1 None 0 pcAnywhere 1 Symmetric 2 Public key Byte CHostData CryptReqLevel Byte Defines whether the host computer accepts connections from a remote computer that uses a lower level of encryption Bool CHos...

Page 48: ...tion The following values are valid 0 Host and remote 1 Host 2 Remote Byte CHostData ActiveKbds Byte Sets the number of minutes in which the keyboard and mouse can be inactive before the connection is ended Byte CHostData InactiveTimeout Byte Sets the lock host computer upon startup setting Bool CHostData LockSystemWhileWait Bool Sets the run minimized host startup option Bool CHostData MinimizeOn...

Page 49: ... value is set or if the set value is not valid for example the authentication type is not available Byte CHostData AuthenticationType Byte Sets the security options for handling an abnormal end of session The following values are valid 1 Log off user 2 Restart host computer 3 Lock computer Byte CHostData ConnLostSecurity Byte Sets the number of seconds to wait before the host modem calls back the ...

Page 50: ... after the session ends Bool CHostData PasswordAfterDisc Bool Logs failed password attempts Bool CHostData LogFailures Bool Enables drive security options This setting is valid only on NTFS file systems Bool CHostData AllowDriveSecurity Bool Enables the use of directory services for authentication Bool CHostData UseDirectoryServices Bool Sets the directory services settings String CHostData Direct...

Page 51: ... value of the disconnect if timeout setting Bool Bool CHostDataEx ConfirmDeny Returns the value of the make passwords case sensitive setting Bool Bool CHostDataEx PwCaseSensitive Returns the value of the limit login attempts per call setting Byte Byte CHostDataEx PwAttempts Returns the value of the limit time to complete login setting in minutes Byte Byte CHostDataEx PwTimeout Returns the active k...

Page 52: ...id FALSE Wait TRUE Cancel host Bool Bool CHostDataEx ConnLostHostOpts Returns the value of the security option that is set for handling an abnormal end of session Bool Bool CHostDataEx ConnLostWait Returns the number reference of 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...

Page 53: ...ther the end of session security options are enabled for a normal end of session Bool Bool CHostDataEx EnableEndSessSecurity Returns the security option that is set for a normal end of session The following values are valid 1 Log off user 2 Restart host computer 3 Lock computer Byte Byte CHostDataEx EndSessSecurity Returns the screen blanking option that is set Bool Bool CHostDataEx BlankHost Retu...

Page 54: ...e retrieves a host data object and modifies its properties Private Sub Command1_Click Dim HostDataManager as Object Dim HostData as Object Dim s as string Create CHostDataManager object Set HostDataManager CreateObject WINAWSVR BEHOSTDATAMANAGER display and change current directory s HostDataManager CurrentDirectory MsgBox s HostDataManager ChangeDirectory C dev bin w32 data s HostDataManager Curr...

Page 55: ...aManager ChangeDirectory C dev bin w32 data HostDataManager FindFirst s MsgBox s HostDataManager FindNext s MsgBox s End Sub Awrem32 functions The Awrem32 functions provide the parameters and return values for handling connections between the host and remote computers Description Parameter or return value Awrem32 function The fully qualified chf file name that contains information about the host c...

Page 56: ...lified destination path and file name Parameter HostFile as string FileXferToHost HostFile Contains the fully qualified path and file name to be copied from the remote computer The HostFile and RemoteFile strings do not have to be identical Parameter RemoteFile as string FileXferToHost RemoteFile Contains the drive and path to create the folder on the host computer Parmeter FolderName as string Cr...

Page 57: ...urns the last error generated in Awrem32 Return value String GetError Returns the current status of your connection to the host computer The possible values include the following 1 Lost connection 0 No connection 1 Session connected Return value Short ConnectionStatus 57 Visual Basic object definitions Awrem32 functions ...

Page 58: ...Visual Basic object definitions Awrem32 functions 58 ...

Page 59: ...tDataEx object Awrem32 functions About Visual C objects The pcAnywhere Automation Server provides the following components to support OLE Automation Provides the information needed to connect to the pcAnywhere Automation Server and access its interfaces Winawsvr Provides the information needed to control pcAnywhere connections Awrem32 The objects that are described in Table 3 1 comprise Winawsvr 3...

Page 60: ... remote control and file transfer sessions See Awrem32 functions on page 85 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 CRemoteDataManager methods The CRemoteDataManager methods provide the parameters and return values for ...

Page 61: ...file that matches the pattern if any Return value is 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 Parameter BSTR FAR pbstrFullQualName Return value BOOL BOOL FindNext BSTR FAR pbstrFullQualName Retrieves a CRemoteData object by file name Parameter is the fully qualified rem...

Page 62: ...be NULL Parameter LPCTSTR lpszPassword LPDISPATCH RetrieveObjectEx LPCTSTR lpszPassword Pointer to an OLE dispatch object The object is a CRemoteDataEx object See Visual C sample code for remote functionality Return value LPDISPATCH LPDISPATCH RetrieveObjectEx Creates a CRemoteData object and returns an LPDISPATC pointer to it Parameter is the fully qualified remote object file name for the new ob...

Page 63: ...ect LPCTSTR lpszFQName Object password May be NULL Parameter LPCTSTR lpszPassword BOOLDeleteObject LPCTSTR lpszPassword TRUE if object is deleted BOOL BOOL DeleteObject Launches a remote object file which opens the pcAnywhere remote terminal window Parameter is the fully qualified remote object file of object to be launched Return value is TRUE if object is successfully launched Parameter LPCTSTR ...

Page 64: ...re to be used this is the country code of the number to be called BSTR GetCountryCode void SetCountryCode LPCTSTR lpszNewValue The number of times to retry dialing this number if the call fails short GetRedialCount void SetRedialCount short nNewValue The time to wait in seconds between redial attempts short GetRedialDelay void SetRedialDelay short nNewValue The login name to be sent to the host wh...

Page 65: ...teProtection void SetWriteProtection BOOL bNewValue Controls whether sessions using this object are logged BOOL GetLogSession void SetLogSession BOOL bNewValue Controls whether sessions using this object are recorded from the beginning BOOL GetRecordSession void SetRecordSession BOOL bNewValue The name of the record file for sessions using this object BSTR GetRecordFile void SetRecordFile LPCTSTR ...

Page 66: ...t to valid default values The following connection types have advanced configuration options that can be set in your application COM devices NetBIOS devices ISDN via CAPI 2 0 European ISDN only devices COM device details Sets the communications parity level BSTR GetComParity void SetComParity LPCTSTR lpszNewValue Communications parity values are as follows None Odd Even Mark Space Sets the flow co...

Page 67: ... indicator RI Receive 2 CR s Modem response Sets the connection end values BSTR GetComEndedBy void SetComEndedBy LPCTSTR lpszNewValue Connection end values are as follows Always connected Carrier detect DCD Clear to send CTS Data set ready DSR Ring indicator RI Sets the connection speed long GetComSpeed void SetComSpeed long nNewValue Connection speed values are as follows 110 300 600 67 Visual C ...

Page 68: ...nding void SetCapiChannelBonding BOOL bNewValue Sets any additional CAPI extensions that are needed for communications BSTR GetCapiExtensions void SetCapiExtensions LPCTSTR lpszNewValue Remote object methods The following table describes the normal methods of the remote object they are not used to get and set properties Description Parameter or return value Method The number of connection types av...

Page 69: ...ilable Return value Short short CountryCodes FirstCountryCode and NextCountryCode are used to iterate through the available country codes These functions return a BSTR which is the name of an available country code You can use these returned values with the SetCountryCode function The return value is the first or next country code string Return value BSTR BSTR FirstCountryCode and BSTR NextCountry...

Page 70: ...ain Returns the AutoDomain value void SetAutoDomain LPCTSTR lpszNewValue Visual C sample code for remote functionality The following sample C function creates a remote object sets its connection type to TCP IP sets the computer name to the TCP IP address passed into the function and then launches the remote object BOOL LaunchTCPRemote LPCTSTR lpszAddress BOOL bReturn FALSE CRemoteDataManager remot...

Page 71: ...es for accessing and controlling CHostData objects Description Parameter or return value Method Returns the full path name of the current directory in which pcAnywhere host objects are stored Return value BSTR BSTR CurrentDirectory Changes the current directory in which pcAnywhere host objects are stored The parameter is name of an existing directory The return value is TRUE if successful Paramete...

Page 72: ...bstrFullQualName Parameter BSTR FAR pbstrFullQualName BOOL FindFirst BSTR FAR pbstrFullQualName After FindFirst has been successfully called to get the name of a host object file in the current directory FindNext can be called to find the next file that matches the pattern if any The parameter is the return buffer for the full path name of the host object file that matches the pattern specified in...

Page 73: ...ieves a CHostDataEx object by file name The parameter is the fully qualified host object file name to be loaded Parameter LPCTSTR lpszFQName LPDISPATCH RetrieveObjectEx LPCTSTR lpszFQName 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 Parameter short wAccessMode LPDISPATCH RetrieveOb...

Page 74: ...taEx object See Visual C sample code for host functionality Parameter LPCTSTR lpszFQName Return value LPDISPATCH LPDISPATCH CreateObjectEx LPCTSTR lpszName Deletes a host object file The parameter is the fully qualified host object file name of the object to be deleted Parameter LPCTSTR lpszFQName BOOL DeleteObject LPCTSTR lpszFQName Object password May be NULL Parameter LPCTSTR lpszPassword BOOL ...

Page 75: ...ue If dialing properties are to be used this is the area code of the number to be called BSTR GetAreaCode void SetAreaCode LPCTSTR lpszNewValue If dialing properties are to be used this is the country code of the number to be called BSTR GetCountryCode void SetCountryCode LPCTSTR lpszNewValue The number of times to retry dialing this number if the call fails short GetRedialCount void SetRedialCoun...

Page 76: ...ion LPCTSTR lpszNewValue If the requested connection type is already on the list of assigned connections the list of assigned connections does not change Only the current connection type is changed to the requested type It is normal to call the AssignConnection method on the same object multiple times in the course of getting and setting connection specific values AssignConnection returns TRUE if ...

Page 77: ...ion type the remaining assigned connection if any becomes the current connection type for subsequent device specific method calls BOOL UnassignConnection LPCTSTR lpszNewValue The following code sets the communications parity levels BSTR GetComParity void SetComParity LPCTSTR lpszNewValue Communication parity values are as follows None Odd Even Mark Space The following code sets the flow control le...

Page 78: ...2 CR s Modem response The following code sets the connection end values BSTR GetComEndedBy void SetComEndedBy LPCTSTR lpszNewValue Connection end values are as follows Always connected Carrier detect DCD Clear to send CTS Data set ready DSR Ring indicator RI The following code sets the connection speed long GetComSpeed void SetComSpeed long nNewValue Connection speed values are as follows 110 300 ...

Page 79: ...etNasiPassword void SetNasiPassword LPCTSTR lpszNewValue Sets the NASI session name BSTR GetNasiSessionName void SetNasiSessionName LPCTSTR lpszNewValue BOOL GetNasiSessionNameAvailable void SetNasiSessionNameAvailable BOOL bNewValue Specifies the NASI server to use BOOL NasiServer BSTR GetNasiServerName void SetNasiServerName LPCTSTR lpszNewValue Specifies the NASI Service to use BOOL NasiService...

Page 80: ... Parameter or return value Method Returns the number of connection types available on this computer Return value Short short ConnectionTypes 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 81: ... of a connection device type The return value is TRUE if this device type is currently assigned Parameter LPCTSTR lpszConnectionTyp Return value BOOL BOOL FindAssignedConnection LPCTSTR lpszConnectionType Returns the number of country codes available Return value Short short CountryCodes FirstCountryCode and NextCountryCode are used to iterate through the list of available country codes The functi...

Page 82: ... NOT IMPLEMENTED void SetPassword LPCTSTR lpszNewValue BSTR GetCallersPath void SetCallersPath LPCTSTR lpszNewValue BOOL GetConfirmConnect void SetConfirmConnect BOOL bNewValue short GetConfirmTimeout void SetConfirmTimeout short nNewValue BOOL GetConfirmDeny void SetConfirmDeny BOOL bNewValue BOOL GetPwCaseSensitive void SetPwCaseSensitive BOOL bNewValue short GetPwAttempts void SetPwAttempts sho...

Page 83: ...s void SetEndSessHostOpts BOOL bNewValue BOOL GetEnableEndSessSecurity 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 ...

Page 84: ...turn FALSE CHostDataManager hostDM CHostData hostData First create the CHostDataManager hostDM CreateDispatch _T WINAWSVR BeHostDataManager Next create CRemoteData and attach it hostData AttachDispatch hostDM CreateObject Test 0 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 ...

Page 85: ...thing Return value Boolean boolean awDisconnect Copies a file from the host computer to the remote computer The parameters can contain wildcard characters The parameter contains the fully qualified path and file name to be copied from the host computer The HostFile and RemoteFile strings do not have to be identical Parameter HostFile as string boolean FileXferFromHost BSTR HostFile Copies a file f...

Page 86: ...qualified path and file name to be copied from the remote computer The HostFile and RemoteFile strings do not have to be identical Parameter RemoteFile as string boolean FileXferToHost BSTR RemoteFile TRUE if command executed Return value Boolean boolean FileXferToHost Creates a new folder on the host computer This function creates a temporary folder on the remote computer and then copies that fol...

Page 87: ...ualified path to the file on the host computer The return value is TRUE if command executed Parameter FileName as string Return value Boolean boolean ExecuteHostFile BSTR FileName Returns the last error generated in Awrem32 as a string Return value String BSTR GetError Returns the current status of your connection to the host computer The possible values include the following 1 Lost connection 0 N...

Page 88: ...Visual C object definitions Awrem32 functions 88 ...

Page 89: ... details 42 76 remote device details 26 66 connection types assigning 41 host properties 38 76 80 remote properties 23 66 68 unassigning 41 connections ending 56 85 returning errors 87 connections continued returning status 57 87 starting 36 55 63 85 country codes on host 81 on remote 69 CRemoteData using Visual Basic 21 using Visual C 63 CRemoteDataEx using Visual Basic 31 using Visual C 70 CRemo...

Page 90: ...tBIOS properties 29 68 O OLE Automation See pcAnywhere Automation Server P parity 27 43 66 77 passwords on host objects 81 on remote objects 69 pcAnywhere Automation Server about 10 accessing with Visual Basic 12 accessing with Visual C 13 example uses 10 registering GUIDs 11 type libraries 13 R remote engine automatically registering 11 manually registering 12 remote objects creating 62 deleting ...

Page 91: ...Ex object 82 CHostDataManager object 71 code samples 70 84 CRemoteData object 63 CRemoteDataEx object 70 CRemoteDataManager object 60 importing classes 14 including Winawsvr h 15 W Winawsvr executable 12 header file 15 objects CHostData 36 75 CHostDataEx 47 82 CHostDataManager 34 71 CRemoteData 21 63 CRemoteDataEx 31 70 CRemoteDataManager 18 60 91 Index ...

Reviews: