Target Settings for DLLs

When you set the Target Type to Dynamic Link Library and select Build»Target Settings, the Target Settings dialog box has the following options:

Note Note  Refer to the Persistence of LabWindows/CVI Dialog Box Options topic for more information about where dialog box options are saved and what they affect.
  • Configuration—Specifies the configuration(s) to which the settings apply. The following configurations are listed by default:
    • Debug—Settings apply to the default 32-bit debug configuration.
    • Release—Settings apply to the default 32-bit release configuration.
    • Debug64—Settings apply to the default 64-bit debug configuration.
    • Release64—Settings apply to the default 64-bit release configuration.
    • All Configurations—Changed settings apply to all configurations.
      Note Note  
      • Any custom configurations you create are also listed.
      • If you access the Target Settings dialog box from the Add Configuration or Edit Configuration dialog boxes, LabWindows/CVI dims the Configuration option. LabWindows/CVI applies the changes you make in this dialog box to the configuration specified in the Add Configuration or Edit Configuration dialog box.
  • DLL file—The name of the DLL file for your program. You can use the Browse button to select an existing filename.
    Note  If you select the Real-time only option for Run-time support, the filename you select must conform to the 8.3 DOS standard to be downloadable to an RT target.
  • Import library base name—Normally, the name of the import library is the same as the name of the DLL except that the extension is .lib. There might be some cases, however, when you want to use a different name. For example, you might want to append _32 to the name of your DLL to distinguish it as a 32-bit DLL but not append it to the import library name. This is, in fact, the convention used for VXIplug&play and IVI instrument driver DLLs. If you want to enter a different name for the import library, disable the Use default option. Enter a name without any directory names.
  • Where to copy DLL—This option instructs LabWindows/CVI to copy the DLL to a different directory after creating it. Choose from the following items:
    Note Note  If you build a 64-bit DLL on a 32-bit operating system, LabWindows/CVI will not copy the DLL to the Windows system, IVI standard root or VXIplug&play directories.
    • Do not copy—Does not copy the DLL.
    • Windows system directory—Copies the DLL to the Windows system directory.
    • IVI standard root directory—Copies the DLL to the bin directory under the IVI Standard Root directory.
    • VXIplug&play directory—Copies the DLL to the bin directory under the VXIplug&play framework directory.
    • IVI standard root directory + VXIplug&play directory—Copies the DLL to both the bin directory under the IVI Standard Root directory and the bin directory under the VXIplug&play framework directory.
    • Custom directory—Copies the DLL to a directory you specify.
  • Run-time support—The run-time support for your DLL. If you select the Instrument driver only item or the Real-time only item, your project does not link to the entire set of LabWindows/CVI libraries but instead links to a smaller set of functions.

    DLLs you create with the Full runtime item selected use the LabWindows/CVI Runtime DLL, cvirte.dll.
  • Runtime bindingBinds the DLL to the specified LabWindows/CVI Runtime.
    Note Note  Refer to the Runtime Usage topic for more information about how this option affects the behavior of bound executables and DLLs.
    • Shared—Binds the DLL to the default, shared LabWindows/CVI Runtime.
    • <version> side-by-side—Binds the DLL to the version of the LabWindows/CVI Side-by-Side Runtime indicated by <version>.
  • Generate help from source—After you insert and edit template comment tags, you can export the function documentation by selecting one of the following items:
    • None (default)—Does not generate documentation from the code comments.
    • XML—Generates a .xml file from the code comments and places the file in the same folder as the LabWindows/CVI project. You then can process the .xml file using an XML parser.
    • HTML—Generates .html files from the code comments and places the files in the same folder as the LabWindows/CVI project.
    • HTML & XML—Generates both .xml and .html files from the code comments and places the files in the same folder as the LabWindows/CVI project.
  • Embed manifest file—Embeds the manifest (.manifest) file you specify into the DLL. Manifest files are XML files that contain information about the dependencies, security, assembly, and so on of your application. Refer to the KnowledgeBase on ni.com for more information about application manifests.
  • Real-time function tracing—Specifies the functions you want to trace in the Real-Time Trace Viewer. You can select one of the following options:

    • Disabled—Do not trace any functions.
    • User-defined functions only—Trace only functions you create.
    • User-defined functions and library functions—Trace functions you create and LabWindows/CVI library functions.
    Note Note  This option is available only when you set the Run-time support option to Real-time only.
    Refer to the LabWindows/CVI Real-Time Module Help for more information about enabling tracing.
  • Embed project .UIRs—Embeds .uir files into the DLL. Enabling this option allows you to ship only the DLL, instead of including the .uir files also. You must call LoadPanelEx with a valid calling module handle to load an embedded .uir file from a DLL. Make sure that you include all .uir files loaded through LoadPanelEx in your project if you want to ship only the DLL file.
  • Generate map file—Creates a memory map for the executable. This map lists the address of every function and global variable and the name of the function or global variable. This option is useful if your program crashes and provides an address where the failure occurred. You can view the map file to check which function or global variable the crash occurred in.

    LabWindows/CVI generates the map file in the cvibuild.projectname/configname directory under the main project directory. The file is named map_projectname_Configuration.txt.
  • Register ActiveX server after build—LabWindows/CVI registers the target each time that it builds the target. By default, this option is enabled for a new ActiveX server project. This option appears only for ActiveX server projects.
    Note Note  When you build ActiveX servers, the ActiveX servers are registered in your user profile. This registration is not visible to other users on your system. When you register these servers outside the LabWindows/CVI environment, they are always registered for all users; this option requires administrator privilege.
  • Embed timestamp—Adds the time at which you built the project to the .dll file you create.
  • Version Info—Opens the Version Info dialog box.
  • Signing Info—Opens the Signing Information dialog box.
  • Import Library Choices—Choose whether to create the import libraries in the VXIplug&play or IVI subdirectories instead of the directory of the DLL.

    If you choose to use the DLL directory, LabWindows/CVI creates the import library in the directory of the DLL. If you choose to the VXIplug&play directories, LabWindows/CVI creates the import library in the ..\lib\msc subdirectory of the VXIplug&play framework directory. If you choose the IVI directories, LabWindows/CVI creates the import library in the ..\Lib\msc subdirectory of the IVI Standard Root directory.



  • Type Library—Choose whether to add a type library resource to your DLL. LabWindows/CVI generates the type library resource from a function panel (.fp) file, which you must specify in the Type Library dialog box. Also, you can choose to include links in the type library resource to a Microsoft Compiled Help (.chm) file or Windows help (.hlp) file.

    This feature is useful if you intend for your DLL to be used from Microsoft Visual Basic.
  • LoadExternalModule Options—The following options assist you in loading external modules.

    • Enable LoadExternalModule—Select this option if your project uses LoadExternalModule. If your project does not use LoadExternalModule, disable this option to reduce the size of your DLL. If you disable the option but still use LoadExternalModule, LabWindows/CVI prompts you to enable full support. You must rebuild your project before the changes take effect.
    • Add Files to DLL—Select additional module files that you want to link into the DLL. These are modules that your project files do not directly reference but that are referenced by modules you load at run time by calling LoadExternalModule.

      If you force a Windows SDK import library into your project, your DLL might not load. The Windows SDK import libraries contain functions that are not present on all versions of Windows. If the DLL on your system does not export all the functions in the import library, your DLL will not load. Instead of forcing an import library into your DLL, you can force only the functions you need into the DLL. To force specific functions into your DLL, create a table of function pointers and add the functions to the table. For example, to force references to CreateWindow and GetFreeDiskSpace, you can add the following code to a source file in your project.

      void* ReferenceFunctionsTable[] = {
         CreateWindow,
         GetDiskFreeSpace,
      }
  • Exports—The following options assist you in exporting symbols.
    • Export what—Indicates the current method for determining which symbols in the DLL to export to the users of the DLL. Use the Change button to change your choice.
    • Change—Select the method to use for determining which symbols in the DLL to export to the users of the DLL. You have the following choices:
      • Include file symbols—You must name one or more include files that declare symbols defined globally in the DLL. The DLL exports the symbols you declare in the include files. You can select from a list of include files in the project.
      • Include file and marked symbols—The DLL exports all symbols you define in the DLL with the __declspec(dllexport) or export qualifier and the symbols you declare in the include files.
      • Symbols marked for export—The DLL exports all symbols you define in the DLL with the __declspec(dllexport) or export qualifier.
  • OK—Accepts the current inputs and closes the dialog box.
  • Cancel—Cancels the operation and removes the dialog box.

For more information about creating DLLs, refer to Compiler/Linker Issues.

WAS THIS ARTICLE HELPFUL?

Not Helpful