System.Messaging Reference (Document! X Sample)



System.Messaging Namespace > Message Class : SourceMachine Property
SourceMachine Property (Message)
Gets the computer from which the message originated.
Syntax
'Declaration
 
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
<MessagingDescriptionAttribute("Specifies the computer where the message originated.")>
Public ReadOnly Property SourceMachine As String
'Usage
 
Dim instance As Message
Dim value As String
 
value = instance.SourceMachine
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("Specifies the computer where the message originated.")]
public string SourceMachine {get;}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[MessagingDescription("Specifies the computer where the message originated.")]
public:
property String^ SourceMachine {
   String^ get();
}

Property Value

The name of the computer from which the message was sent.
Exceptions
ExceptionDescription
The message has not been sent. This property can only be read on messages retrieved from a queue.-or- The message queue is filtered to ignore the SourceMachine property.
The computer information or directory service could not be accessed.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also