Table 2-30
CHostDataEx properties and return values (continued)
Description
Return value
Property
Returns whether the drive security option is
enabled.
Bool
Bool = <CHostDataEx>.AllowDriveSecurity
Returns whether the directory services option
is enabled.
Bool
Bool = <CHostDataEx>.UseDirectoryServices
Returns the directory service settings.
String
String = <CHostDataEx>.DirectoryServiceEntry
Visual Basic sample code for host functionality
The following Visual Basic sample code 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.CurrentDirectory()
MsgBox ( s )
'retrieve remote data object
Set HostData = HostDataManager.RetrieveObject("pod.BHF", 2, 0)
'display some properties
s = HostData.AreaCode()
MsgBox (s)
s = HostData.PhoneNumber()
MsgBox (s)
'set some properties
Visual Basic object definitions
CHostDataEx object
54