Using the High Level API > Using the HLAPI in an Application

Using the HLAPI in an Application

To use the HLAPI in an application you must include it in the project, as described in these steps:

1.  Add references to these dll files (located in the Bin folder of this distribution):

•        HLAPI.dll

•        IWSManClient.dll (use of the WSMan Client is deprecated in favor of the ConnectionInfoEX class included in the HLAPI.)

2.  Add these namespaces to the project:

•        Intel.Manageability

•        Intel.Manageability.Exceptions

For example:

using Intel.Manageability;

using Intel.Manageability.Exceptions;

 

3.  Optionally, add a configuration file (“app.config”) to the application. The HLAPI.dll will look here for certain definitions. See the Redirection sample for an example of a config file.

•   The single parameter that the dll looks for is the definition of the location of temporary files. Bracket the temporary file path setting with <appSettings></appSettings>.

There are three options for setting the location where the temp files can be created, as shown in the following snippet. The three options are shown below with the first two commented out. Uncomment the desired option. The default option is ApplicationStartUpPath. If there is more than 1 un-commented option the HLAPI library will use the last definition.

<appSettings>

 

  <!-- a path predefined by the user as the location where the temp files will be created

  <add key="TEMP_FILE_DIRECTORY" value="c:\myFolder"></add>-->

 

  <!-- The path for the user application data.

  If a path does not exist, one is created in the following format:

  Home Directory\CompanyName\ProductName\ProductVersion

  <add key="TEMP_FILE_DIRECTORY" value="UserAppDataPath"></add>-->

 

  <!--The path for the executable file that started the application-->

   <add key="TEMP_FILE_DIRECTORY" value="ApplicationStartUpPath"></add>

 

</appSettings>

 

•   Some of the above dlls are signed for disabling the signature checking.  Add the following tag to the APP.config.

<runtime>

    <generatePublisherEvidence enabled="false"/>

</runtime>

 

 Note:

The HLAPI supports the Microsoft IntelliSense functionality included in Microsoft Visual Studio. For IntelliSense to work, the HLAPI.xml file (also provided in the Bin folder) must be located in the same folder as the HLAPI.dll referenced by the application.

 

Copyright © 2006-2022, Intel Corporation. All rights reserved.