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);
short GetEncryptionLevel(); //Returns the encryption level value
void SetEncryptionLevel(short nNewValue);
BOOL GetDenyLowerEncrypt(); //Returns the DenyLowerEncrypt value
void SetDenyLowerEncrypt(BOOL bNewValue);
BSTR GetAutoDomain(); //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 remoteDM;
CRemoteData remoteData;
// First, create the CRemoteDataManager
remoteDM.CreateDispatch( _T( "WINAWSVR.RemoteDataManager") );
// Next, create CRemoteData and attach it
remoteData.AttachDispatch( remoteDM.CreateObject("Test", 0) );
// Now, set the required properties
remoteData.SetConnectionType("TCP/IP");
remoteData.SetComputerName(lpszAddress);
Visual C++ object definitions
CRemoteDataEx object
70