﻿# Описание ошибки интеграции Intel Parallel Studio Service Pack 1 в Visual Studio 2005/2008

Мы заметили одну ошибку интеграции Intel Parallel Studio Service Pack 1 в Visual Studio 2005/2008, которую хотим здесь описать и подсказать способ ее устранения\. Мы преследуем сразу несколько целей\. Во\-первых, надеемся, что разработчики Intel Parallel Studio заметят эту ошибку и исправят ее\. Во\-вторых, это может помочь пользователям, использующим Intel Parallel Studio устранить эту или схожие ошибки, если они есть\. В\-третьих, из\-за этой ошибки, некорректно себя ведет разрабатываемый нами анализатор PVS\-Studio, который также интегрируется в среду Visual Studio\.

В начале, рассмотрим команду автоматизации Visual Studio для отображения окна настроек \(см\. рисунок 1\)\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image1.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image1.png)

Команда автоматизации доступна через специальный API, предоставляемый Visual Studio подключаемым модулям\. Также можно вызывать различные команды, используя окно "Command Window"\. Это окно можно открыть через "View\-\>Other Windows\-\>Command Window" как показано на рисунке 2\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image2.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image2.png)

Если в окне "Command Window" написать команду "Tools\.Options" \(см\. рисунок 3\), то на экране отобразится окно настроек, показанное на рисунке 1\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image3.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image3.png)

Обратим на будущее внимание на один момент\. Для команд можно назначить горячее сочетание клавиш, воспользовавшись в настройках вкладкой "Keyboard", показанной на рисунке 4\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image4.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image4.png)

Если мы введем строчку "Tools\.Options", то в списке увидим только одну такую же строчку \(см\. рисунок 5\)\. Это ожидаемо и правильно\. Запомним этот момент\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image5.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image5.png)

Перейдем к установке Intel Parallel Studio\. Ниже показана информация, которая была выдана Intel Parallel Studio в процессе установки:

```cpp
Intel Parallel Studio Service Pack 1
Destination Folder(s)
    C:\Program Files (x86)\Intel\Parallel Studio\Composer\
    C:\Program Files (x86)\Intel\Parallel Studio\Inspector\
    C:\Program Files (x86)\Intel\Parallel Studio\Amplifier\
Components
    Intel Parallel Composer Update 3
        Intel C++ Compiler
            Intel C++ Compiler for applications running on IA-32
            Intel C++ Compiler for applications running on Intel(R) 64
            Integration(s) in Microsoft Visual Studio
            Intel Parallel Debugger Extension
            Integrated Documentation
        Intel Integrated Performance Primitives
            Intel IPP for applications running on IA-32
            Intel IPP for applications running on Intel(R) 64
        Intel Threading Building Blocks
            Intel TBB
    Intel Parallel Inspector Update 2
    Intel Parallel Amplifier Update 2
Configuration Options
    Integration with Microsoft Visual Studio 2005 software
    Integration with Microsoft Visual Studio 2008 software
```

После установки происходит сбой команды отображения окна настроек\. Если теперь в окне "Command Window" мы введем команду "Tools\.Options" \(см\. рисунок 6\), то получим сообщение "Command "Tools\.Options" is not available\."\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image6.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image6.png)

Аналогичная проблема возникает при попытке воспользоваться API для отображения окна настроек\. Пример вызова:

Application\.ExecuteDTECommand\("Tools\.Options"\);

В результате при обращении к данной функции внутри разрабатываемого нами инструмента PVS\-Studio, происходит падение, \(см\. рисунок 7\)\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image7.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image7.png)

Причину данной ошибки мы назвать не можем\. Приведем только косвенные данные\. Вернемся к настройкам на вкладке "Keyboard"\. Теперь при вводе строчки "Tools\.Options" в списке показывается уже две одинаковых строки \(см\. рисунок 8\)\.

![0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image8.png](https://import.viva64.com/docx/blog/0056_Description_of_the_error_of_integrating_Intel_Parallel_Studio_Service_Pack_1_into_Visual_Studio_20052008_ru/image8.png)

После сброса настроек все ошибки исчезают, и команда открытия окна настроек начинает вести себя прежним образом\.