MSMQ Error and Information Codes

The following error and information codes are defined in mq.h.:

Code Description
MQ_ERROR Generic error code.
MQ_ERROR_ACCESS_DENIED Access to the specified queue or computer is denied.

Verify the access rights for the operation (for example, creating, setting properties, or deleting a queue). To change access rights for a queue, call MQSetQueueSecurity.

MQ_ERROR_BAD_DSSERVER
_REGISTRY
Registry parameter for Active Directory server has a bad value.
MQ_ERROR_BAD_SECURITY
_CONTEXT
Security context specified by PROPID_M_SECURITY_CONTEXT is corrupted.
MQ_ERROR_BUFFER_OVERFLOW Supplied message body buffer is too small. A partial copy of the message body is copied to the buffer, but the message is not removed from the queue.
MQ_ERROR_CANNOT
_IMPERSONATE_CLIENT
Active Directory server cannot impersonate the client application. Security credentials could not be verified.
MQ_ERROR_COMPUTER_DOES
_NOT_SUPPORT_ENCRYPTION
Encryption failed. Computer (source or destination) does not support encryption operations.
MQ_ERROR_CORRUPTED
_INTERNAL_CERTIFICATE
MSMQ-supplied internal certificate is corrupted.
MQ_ERROR_CORRUPTED
_PERSONAL_CERT_STORE
Microsoft® Internet Explorer personal certificate store is corrupted.
MQ_ERROR_CORRUPTED
_SECURITY_DATA
Cryptographic function (CryptoAPI) has failed.
MQ_ERROR_COULD_NOT
_GET_ACCOUNT_INFO
MSMQ could not get account information for the user.
MQ_ERROR_COULD_NOT
_GET_USER_SID
MSMQ could not get the specified sender identifier.
MQ_ERROR_DELETE_CN
_IN_USE
Specified connected network (CN) cannot be deleted because it is defined in at least one computer. Remove the CN from all CN lists and try again.
MQ_ERROR_DS_ERROR Internal error with Active Directory.
MQ_ERROR_DS_IS_FULL MSMQ information store is full.
MQ_ERROR_DTC_CONNECT MSMQ cannot connect to the Microsoft® Distributed Transaction Coordinator (MS DTC).
MQ_ERROR_FORMATNAME
_BUFFER_TOO_SMALL
Specified format name buffer is too small to contain the queue's format name.
MQ_ERROR_FUNCTION_NOT
_SUPPORTED
Function is not supported in Windows 95.
MQ_ERROR_ILLEGAL_CONTEXT The lpwcsContext parameter of MQLocateBegin is not NULL.
MQ_ERROR_ILLEGAL_CURSOR
_OPERATION
An attempt was made to peek at the next message in the queue when the cursor was at the end of the queue.
MQ_ERROR_ILLEGAL
_FORMATNAME
Format name specified is not valid.
MQ_ERROR_ILLEGAL
_MQCOLUMNS
Indicates that pColumns is NULL.
MQ_ERROR_ILLEGAL
_MQQMPROPS
No properties are specified by the MQQMPROPS structure, or it is set to NULL.
MQ_ERROR_ILLEGAL
_MQQUEUEPROPS
No properties are specified by the MQQUEUEPROPS structure, or it is set to NULL.
MQ_ERROR_ILLEGAL_OPERATION The operation is not supported on this specific platform.
MQ_ERROR_ILLEGAL
_PROPERTY_SIZE
The specified buffer for the message identifier or correlation identifier is not the correct size.
MQ_ERROR_ILLEGAL
_PROPERTY_VALUE
Property value specified in the PROPVARIANT array is illegal.
MQ_ERROR_ILLEGAL
_PROPERTY_VT
VARTYPE specified in the VT field of the PROPVARIANT array is not valid.
MQ_ERROR_ILLEGAL_PROPID Property identifier in the property identifier array is not valid.
MQ_ERROR_ILLEGAL_QUEUE
_PATHNAME
MSMQ pathname specified for the queue is not valid.
MQ_ERROR_ILLEGAL_RELATION Relationship parameter is not valid.
MQ_ERROR_ILLEGAL
_RESTRICTION_PROPID
Property identifier specified in MQRESTRICTION is invalid.
MQ_ERROR_ILLEGAL
_SECURITY_DESCRIPTOR
Specified security descriptor is not valid.
MQ_ERROR_ILLEGAL_SORT Illegal sort specified.
MQ_ERROR_ILLEGAL_SORT
_PROPID
Property identifier specified in MQSORTSET is not valid.
MQ_ERROR_ILLEGAL_USER User is not legal.
MQ_ERROR_INCONSISTENT
_QM_ID
Inconsistency exists between the Queue Manager identifier found in Active Directory and the one found in the registry.
MQ_ERROR_INSUFFICIENT
_PROPERTIES
Not all properties required for the operation were specified.
MQ_ERROR_INSUFFICIENT
_RESOURCES
Insufficient resources to complete operation (for example, not enough memory). Operation failed.
MQ_ERROR_INVALID
_CERTIFICATE
Security certificate specified by PROPID_M_SENDER_CERT is invalid, or the certificate is not correctly placed in the Microsoft® Internet Explorer personal certificate store.
MQ_ERROR_INVALID_HANDLE Specified queue handle is not valid.
MQ_ERROR_INVALID_OWNER Object owner is not valid. Owner was not found when trying to create object.
MQ_ERROR_INVALID_PARAMETER One of the IN parameters supplied by the operation is not valid.
MQ_ERROR_IO_TIMEOUT MQReceiveMessage I/O time-out has expired.
MQ_ERROR_LABEL_TOO_LONG Message label is too long. It should be equal to or less than MQ_MAX_MSG_LABEL_LEN.
MQ_ERROR_LABEL_BUFFER
_TOO_SMALL
Message label buffer is too small for received label.
MQ_ERROR_LOG_XACT_STATE Cannot log transaction state.
MQ_ERROR_LOGMGR_LOAD Cannot get log manager library or interface.
MQ_ERROR_MACHINE_EXISTS Machine with the specified name already exists.
MQ_ERROR_MACHINE_NOT
_FOUND
Specified machine could not be found in Active Directory.
MQ_ERROR_MESSAGE
_ALREADY_RECEIVED
Message pointed at by the cursor has already been removed from the queue.
MQ_ERROR_MESSAGE
_STORAGE_FAILED
Recoverable message could not be stored on the local computer.
MQ_ERROR_MISSING
_CONNECTOR_TYPE
Specified a property typically generated by MSMQ but did not specify PROPID_M_CONNECTOR_TYPE
MQ_ERROR_MQIS_SERVER
_EMPTY
(MSMQ 1.0 only). The list of MSMQ information store servers (in registry) is empty.
MQ_ERROR_NO_DS Cannot access Active Directory.
MQ_ERROR_NO_INTERNAL
_USER_CERT
No internal certificate available for this user.
MQ_ERROR_NO_RESPONSE
_FROM_OBJECT_SERVER
No response from Active Directory server. Operation status is unknown.
MQ_ERROR_NO_TRANSPORT No network transport to the remote computer.
MQ_ERROR_OBJECT_SERVER
_NOT_AVAILABLE
Object's Active Directory server is not available. Operation failed.
MQ_ERROR_OPERATION
_CANCELLED
Operation was canceled before it could be started.
MQ_ERROR_PRIVILEGE
_NOT_HELD
Application does not have the required privileges to perform the operation.
MQ_ERROR_PROPERTY One or more of the specified properties caused an error.
MQ_ERROR_PROPERTY
_NOTALLOWED
Specified property is not valid for the operation (for example, specifying PROPID_Q_INSTANCE when setting queue properties).
MQ_ERROR_PROV_NAME
_BUFFER_TOO_SMALL
The provider name buffer for cryptographic service provider is too small.
MQ_ERROR_QUEUE_DELETED Queue was deleted before the message could be read.

The specified queue handle is no longer valid and the queue must be closed.

MQ_ERROR_QUEUE_EXCEEDS
_QUOTA
Specified queue is full.
MQ_ERROR_QUEUE_EXISTS Queue (public or private) with the identical MSMQ pathname is registered.

Public queues are registered in Active Directory. Private queues are registered in the local computer.

MQ_ERROR_QUEUE
_NOT_AVAILABLE
Error while reading from queue residing on a remote computer.
MQ_ERROR_QUEUE_NOT_FOUND (Public queues only) Queue is not registered in Active Directory.
MQ_ERROR_RECOVER
_TRANSACTIONS
MSMQ could not recover the transactions.
MQ_ERROR_REGISTRATION
_ERROR
Error in registration access.
MQ_ERROR_RESULT
_BUFFER_TOO_SMALL
Supplied result buffer is too small. MQLocateNext could not return at least one complete query result.
MQ_ERROR_SECURITY
_DESCRIPTOR_TOO_SMALL
Supplied security buffer is too small.
MQ_ERROR_SENDER_CERT
_BUFFER_TOO_SMALL
Supplied sender certificate buffer is too small.
MQ_ERROR_SENDERID
_BUFFER_TOO_SMALL
Supplied sender identification buffer is too small to hold sender identification.
MQ_ERROR_SERVICE_NOT
_AVAILABLE
Application was unable to connect to the Queue Manager.
MQ_ERROR_SIGNATURE
_BUFFER_TOO_SMALL
The signature buffer is too small.
MQ_ERROR_SHARING_VIOLATION Sharing violation when opening queue. The application is trying to open an already opened queue that has exclusive read rights.
MQ_ERROR_STALE_HANDLE Specified handle was obtained in a previous session of the Queue Manager service.
MQ_ERROR_SYMM_KEY
_BUFFER_TOO_SMALL
The symmetric key buffer is too small.
MQ_ERROR_TOO_MANY
_TRANSACTIONS
Too many active transactions.
MQ_ERROR_TRANSACTION
_ENLIST
Cannot enlist transaction.
MQ_ERROR_TRANSACTION_FILE MSMQ cannot open or create a transaction file.
MQ_ERROR_TRANSACTION
_IMPORT
MSMQ could not import the specified transaction.
MQ_ERROR_TRANSACTION
_PREPAREINFO
MSMQ could not get the Prepare Info from the Microsoft Distributed Transaction Coordinator (MS DTC).
MQ_ERROR_TRANSACTION
_QUEUE
The application could not create or use the transaction queue.
MQ_ERROR_TRANSACTION
_SEQUENCE
Transaction operation sequence is incorrect.
MQ_ERROR_TRANSACTION
_USAGE
Transaction error. An attempt was made to open a remote queue for read access from within a transaction, or an attempt was made to read a message from a non-transaction queue from within a transaction.
MQ_ERROR_WRITE_NOT
_ALLOWED
Write operations to Active Directory are not allowed.
MQ_ERROR_UNSUPPORTED
_ACCESS_MODE
Specified access mode is not supported. Supported access modes include MQ_PEEK_MESSAGE, MQ_SEND_MESSAGE, and MQ_RECEIVE_MESSAGE.
MQ_ERROR_UNSSUPORTED
_DBMS
Current version of Database Management System is not supported.
MQ_ERROR_UNSUPPORTED
_FORMATNAME_OPERATION
Requested operation is not supported for the specified format name (for example, trying to open a queue to receive messages using a direct format name).
MQ_ERROR_UNSUPPORTED
_PROTOCOL
Remote machine network protocol is not supported.
MQ_ERROR_USER_BUFFER
_TOO_SMALL
Supplied buffer for user is too small to hold the returned information.
MQ_INFORMATION_DUPLICATE
_PROPERTY
Property already specified with same value.

When duplicate settings are found, the first entry is used and subsequent settings are ignored.

MQ_INFORMATION_FORMATNAME
_BUFFER_TOO_SMALL
Supplied format name buffer is too small. Queue was still created.
MQ_INFORMATION_ILLEGAL
_PROPERTY
Specified identifier in property identifier array aPropID is not valid.
MQ_INFORMATION_OPERATION
_OPERATION_PENDING
Asynchronous operation is pending.
MQ_INFORMATION_PROPERTY One or more of the specified properties resulted in a warning. Operation completed anyway.
MQ_INFORMATION_PROPERTY
_IGNORED
Specified property is not valid for this operation (for example, PROPID_M_SENDERID is not valid; it is set by MSMQ when sending messages).
MQ_INFORMATION
_UNSUPPORTED_PROPERTY
Specified property is not supported by this operation. This property is ignored.