The MSMQApplication object provides a single method for obtaining the machine identifier of a computer.
Note Creating a new instance of this object does not start a new instance of MSMQ.
Since it is an application object, MSMQApplication does not have to be explicitly referenced when calling MachineIdOfMachineName. For example, the following three calls to MachineIdOfMachineName all return the same computer identifier.
Dim strId As String Dim myapp As New MSMQApplication strId = MachineIdOfMachineName("machinename") Debug.Print strId strId = MSMQApplication.MachineIdOfMachineName("machinename") Debug.Print strId strId = myapp.MachineIdOfMachineName("machinename") Debug.Print strId