ContentSharingModality.BeginCreateContentFromFile method

Creates a content object of the PowerPoint or NativeFile type with the given title and file name.

Namespace:  Microsoft.Lync.Model.Conversation.Sharing
Assembly:  Microsoft.Lync.Model (in Microsoft.Lync.Model.dll)

Syntax

'Declaration
Public Function BeginCreateContentFromFile ( _
    contentType As ShareableContentType, _
    title As String, _
    fileName As String, _
    includeNativeFile As Boolean, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As ContentSharingModality
Dim contentType As ShareableContentType
Dim title As String
Dim fileName As String
Dim includeNativeFile As Boolean
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginCreateContentFromFile(contentType, _
    title, fileName, includeNativeFile, _
    callback, state)
public IAsyncResult BeginCreateContentFromFile(
    ShareableContentType contentType,
    string title,
    string fileName,
    bool includeNativeFile,
    AsyncCallback callback,
    Object state
)

Parameters

Return value

Type: System.IAsyncResult
System.IAsyncResult

Remarks

Do not call this method on the ContentSharingModality you get from Participant.Modalities[ModalityType.ContentSharing]. You can only call BeginCreateContent on the Conversation ContentSharingModality. BeginCreateContentFromFile can only be invoked when the state of the ContentSharingModality is ModalityState.Connected. The Title argument of this method must contain only alpha-numeric characters . A native file is not uploaded if the title contains non alpha-numeric characters. An executable file (.exe) cannot be attached to a conversation.

See also

Reference

ContentSharingModality class

ContentSharingModality members

Microsoft.Lync.Model.Conversation.Sharing namespace