Получение списка публичных очередей для отдельного компьютера.
BOOL CMQMsgDlg::LoadPublicQueues
  ( LPTSTR szCompName )
{
	HANDLE					hEnum;
	HRESULT					hRes;
	MQPROPVARIANT				aPropVar[MAX_PROPERTIES];
	DWORD					dwProps;
	BOOL						bRet	= FALSE;
	MQCOLUMNSET		mqColumn;
	PROPID					aPropId[2];
	LPTSTR					szAnsiStr;
	DWORD					i;
	aPropId[0] = PROPID_Q_LABEL;
	aPropId[1] = PROPID_Q_PATHNAME;
	mqColumn.cCol = 2;
	mqColumn.aCol = aPropId;
	 
	if( MQLocateBegin( NULL,NULL,&mqColumn,NULL,&hEnum ) == MQ_OK )
	{
		do
		{
			dwProps = MAX_PROPERTIES;
			if( ( (hRes = MQLocateNext( hEnum,&dwProps,aPropVar )) == MQ_OK ) && ( dwProps > 0 ) )
			{
				i = 0;
				while( i < dwProps )
				{
					if( UnicodeToAnsi( aPropVar[i + 1].bstrVal,&szAnsiStr ) )
					{
						_strupr( szAnsiStr );
						if( strstr( szAnsiStr,szCompName ) == szAnsiStr )
						{
						}
						delete szAnsiStr;
					}
					i = i + 2;
				}
				bRet = TRUE;
			}
		} while( ( dwProps > 0 ) && ( hRes == MQ_OK ) );
		MQLocateEnd( hEnum );
	}
	return bRet;
}