Поделиться через


Message Queuing Object Libraries

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Message Queuing provides the following object libraries:

  • Microsoft® Message Queue 3.0 Object Library: Provided by Windows® XP Professional and the Windows Server 2003 family.

  • Microsoft Message Queue 2.0 Object Library: Provided by Windows 2000.

  • Microsoft Message Queue 1.0 Object Library: Provided by Windows NT.

Each object library provides a new set of objects that provide new and past Message Queuing functionality (with the exception of the Message Queuing Mail objects that are not available with MSMQ 3.0). The programmatic names used in past functionality remains the same, allowing you to use the same names you are familiar with when writing sending and receiving applications. However, each new object library provides a new interface (with a new GUID) for each object that becomes the default interface for the object.

As a result of the new interfaces, sending and receiving applications that use early binding and that are recompiled on newer operating systems will work only on computers running the newer operating systems. This is because the new default interface identifiers that are compiled into the program are not available on computers running the older operating systems.

Dim qinfo As MSMQQueueInfo  

In contrast, sending and receiving applications that use late binding (as in the code below) will work on all operating systems because interface identifiers are not used.

Dim qinfo As Object  
set qinfo=CreateObject("MSMQ.MSMQQueueInfo")  

Object Libraries

The following table lists the object libraries.

Object Library Files Provided
Microsoft Message Queue 3.0 Object Library (Windows XP Professional and the Windows Server 2003 family) mqoa.dll

mqoa20.tlb

mqoa10.tlb
Microsoft Message Queue 2.0 Object Library (Windows 2000) mqoa.dll

mqoa10.tlb
Microsoft Message Queue 1.0 Object Library (Windows NT) mqoa.dll

Each object library provides an mqoa.dll file that contains new definitions and implementations of the Message Queuing objects, plus .tlb files that contain older definitions of the Message Queuing objects. This means that existing applications can be compiled using the new object definitions provided in mqoa.dll or the older definitions provided in the .tlb files.

The tradeoff between using newer or older definitions is as follows. If you use the newer definitions (provided by the new mqoa.dll), your applications can take advantage of the new functionality provided by that version of Message Queuing, but they can run only on the operating system noted in the table above. However, if you use the old definitions provided by the .tlb file, your applications can run on multiple platforms, but you cannot take advantage of the new functionality.