ring
End Get
End Property
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Gets the local path of the share.
'''''' </summary>
'''''' <history>
'''''' [Eduardo Morcillo] 11/08/2004 Created
'''''' </history>
'''''' -----------------------------------------------------------------------------
Public ReadOnly Property Path() As String
Get
Return _share.GetPropertyValue("Path").ToString
End Get
End Property
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Gets the share status.
'''''' </summary>
'''''' <history>
'''''' [Eduardo Morcillo] 11/08/2004 Created
'''''' </history>
'''''' -----------------------------------------------------------------------------
Public ReadOnly Property Status() As String
Get
Return _share.GetPropertyValue("Status").ToString
End Get
End Property
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Gets the share type.
'''''' </summary>
'''''' <history>
'''''' [Eduardo Morcillo] 11/08/2004 Created
'''''' </history>
'''''' -----------------------------------------------------------------------------
Public ReadOnly Property Type() As ShareType
Get
Dim typeValue64 As Long = Convert.ToInt64(_share.GetPropertyValue("Type"), CultureInfo.InvariantCulture)
Dim typeValue32 As Integer
If (typeValue64 And &H80000000) > 0 Then
typeValue32 = &H80000000 Or Convert.ToInt32(typeValue64 And &H7FFFFFFF, CultureInfo.InvariantCulture)
Else
typeValue32 = Convert.ToInt32(typeValue64, CultureInfo.InvariantCulture)
End If
Return CType(typeValue32, ShareType)
End Get
End Property
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Creates a shared folder in the local computer.
'''''' </summary>
'''''' <history>
'''''' [Eduardo Morcillo] 11/08/2004 Created
'''''' </history>
'''''' -----------------------------------------------------------------------------
Public Shared Function Create( _
ByVal path As String, _
ByVal name As String) As NetShare
Return Create(".", path, ShareType.DiskDrive, name, -1, Nothing, Nothing)
End Function
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Creates a shared folder in the local computer.
'''''' </summary>
'''''' <history>
'''''' [Eduardo Morcillo] 11/08/2004 Created
'''''' </history>
'''''' -----------------------------------------------------------------------------
Public Shared Function Create( _
ByVal path As String, _
ByVal name As String, _
ByVal password As String) As NetShare
Return Create(".", path, ShareType.DiskDrive, name, -1, Nothing, password)
End Function
'''''' -----------------------------------------------------------------------------
'''''' <summary>
'''''' Creates a shared folder in the local computer.
'''''' </summary>
'''''' <hist