Extern Element

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Extern Element.

The Extern element references any external header (.h) files to merge with the .vsct file at compile time. The files to be merged must be on the Include path given to the VSCT compiler or referenced by an Include Element. The files may be other .vsct files or C++ header files.

Definitions in header files must be of the form "#define [Symbol] [Value]" The value may be another symbol if it is previously defined. Definitions may be used in conditional statements of command items. Any symbol not actually used will be discarded.

CommandTable Element
Extern Element

<Extern href="stdidcmd.h" />  

The following sections describe attributes, child elements, and parent elements.

Attributes

AttributeDescription
hrefRequired. The path to the header file:

href="stdidcmd.h"
ConditionOptional. See Conditional Attributes.
languageOptional. The default language of all <Strings> elements in the command table:

language="en-us"

Child Elements

ElementDescription
None.None.

Parent Elements

ElementDescription
CommandTable ElementDefines all of the elements that represent commands — that is, menu items, menus, toolbars, and combo boxes — that a VSPackage provides to the IDE.
<?xml version="1.0" encoding="utf-8"?>  
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-  
  18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">  
    <Extern href="C:\VSCore\vscommon\inc\vsshlids.h"/>  
    …  
  <Commands package="guidMyPackage">  
</CommandTable>  

Visual Studio Command Table (.Vsct) Files
How VSPackages Add User Interface Elements
Commands, Menus, and Toolbars

Show: