Unit Scope Names

From RAD Studio XE2
Jump to: navigation, search

Go Up to Getting Started with RAD Studio

Unit scope names are prefixes that are prepended to unit names in the VCL-FMX-RTL libraries. That is, names of units, functions, classes, and members now have a unit scope name prepended to the unit name, as follows:

Syntax and Description

<unitscope>.<unitname>. ...

For example, the SysUtils unit is now part of the System unit scope, as follows:


and the Controls unit is now part of the Vcl unit scope:


Unit scope names:

  • Classify units into basic groups such as Vcl, System, Fmx, and so forth (unit scopes are classified in Unit Scopes).
  • Ensure compatibility of the code that you write using the IDE.
  • Differentiate members whose names are ambiguous (that is, ensure correct name resolution when a member's name matches the name of a member of another unit).
  • Typically begin with a single uppercase letter followed by lowercase letters (such as Vcl and Fmx).
  • Are typically made up of one element (such as Winapi), although some are made up of two elements (such as System.Win).

Third party products, such as Indy and TeeChart, are not unit-scoped. When developing new code with third party components, adding unit scope names is not necessary because added uses entries are automatically scoped.

Component developers can add unit scope names as described in Adding Unit Scope Names for Your Own Components.

Fully Qualified Names Must Include the Unit Scope Name

With one notable exception, legacy code should continue to work without changes. The one exception is scoped or qualified identifiers in the code itself. Fully qualified identifier names now require unit scoping. This means that if you used qualified identifiers in your existing code (which was not unit-scoped), changes are required in order to compile. You need to add the unit scope name to the unit name.

For example, here is the fully qualified identifier of the TStream class that you might have specified in previous product releases:


The name Classes.TStream is no longer considered to be a fully qualified class name because fully qualified names now must be unit-scoped, that is, they must include the unit scope name. In this case, the unit scope name System must be added to the Classes unit name in order to yield a unit-scoped or fully qualified name, as follows:

  • In Delphi, the fully qualified identifier name for TStream is:
  • In C++, unit scope names use the C++ scope operator (::). The fully qualified name for the TStream class in C++ code is:

Possible code changes: If your existing code contains qualified identifiers (such as Classes.TStream.Seek), you must correct the name so that the identifier is unit-scoped and fully qualified (such as System.Classes.TStream.Seek).

How to Specify Unit-Scoped Unit Names in Your Code

For new development, you must specify the unit scope for units in your application. Choose any of the following ways to do this:

  • Everywhere: Fully qualify all names of all members throughout your code. Using full qualification, including unit scope names, throughout your application ensures the fastest compile time.
  • Uses clause or #includes: Fully qualify unit names (with the unit scope and unit names) in the uses clause or #include. Then in your code, you can partially qualify the names of members of those units that you fully qualified (with unit scope) in the uses clause or #include.
  • In Project Options: Add the unit scope names in the Unit scope names option on the Delphi Compiler page in Project Options.

Caution: Using partially qualified names can significantly slow down compile time because the compilers must resolve all partially qualified names during a compile.

RAD Studio Uses Unit Scopes, but the Help Does Not Use Unit Scope Names

The wizards and templates in RAD Studio have been updated to use and include properly unit-scoped unit names. However, in the help (in particular, the VCL-FMX-RTL Libraries documentation), most instances of unit, class, and member names do not yet include the unit scope names.

This means that some functionality in the help is temporarily unavailable; for example, because the unit scope names are not being built into the help, F1 might invoke an incorrect help topic. Updating the help to include the unit scope names is planned for a help update.


If your code contains:

   System.SysUtils, System.Types, System.Classes, FMX.Controls;


#include <System.SysUtils.hpp>
#include <System.Types.hpp>
#include <System.Classes.hpp>
#include <FMX.Controls.hpp>

In your code you can specify unqualified member names, such as:

  GetPackageInfo  // referring to System.SysUtils.GetPackageInfo
  TRect           // referring to System.Types.TRect
  TNotifyEvent    // referring to System.Classes.TNotifyEvent
  TTrackBar       // referring to FMX.Controls.TTrackBar

Unit Scopes

There are more than a few unit scopes, but most of the unit scopes can be grouped into a few general categories, including Vcl, Database, and System. The following table lists the general categories and the unit scope names in each category:

General Category Unit Scope Names in this Category


Bde, Data, Data.Bind, Data.Cloud, Data.Win, Datasnap, Datasnap.Win, Db, IB


Fmx, Fmx.Bind

Mac OS X

Macapi, Posix, System.Mac

System-related (Run-Time Library)

System, System.Bindings, System.Internal, System.Win

Vcl (Visual Component Library)

Vcl, Vcl.Bind, Vcl.Imaging, Vcl.Samples, Vcl.Shell, Vcl.Touch




Web, Web.Internal, Web.Win

Windows API


XML processing

Xml, Xml.Internal, Xml.Win

  • Nine unit scopes are database-related (Bde, Data, Data.Bind, Data.Cloud, Data.Win, DataSnap, DataSnap.Win, Db, IB).
  • Two unit scopes are FireMonkey (Fmx, Fmx.Bind).
  • Three unit scopes are Mac-related (Macapi, Posix, System.Mac).
  • The SOAP unit scope contains COM-related units.
  • The System unit scope has four subscopes (System.Bindings, System.Internal, System.Mac, System.Win).
  • VCL has five related unit scopes (Vcl, Vcl.Bind, Vcl.Imaging, Vcl.Samples, Vcl.Touch).
  • Xml.Win contains the Xml.Win.msxmldom unit related to XML processing.

Unit Scopes and the Units in Each Unit Scope

The following table lists the unit scope names, and the units that belong in each unit scope:

Unit Scope Name Units


BDE, Bdeconst, DBBdeWeb, DbTables, DrTable, SMINTF


DB, DBByteBuffer, DBCommon, DBCommonTypes, DBConnAdmin, DBConsts, DBPlatform, DBXClassRegistry, DBXClient, DBXClientResStrs, DBXCommon, DBXCommonIndy, DBXCommonResStrs, DBXCommonTable, DbxCompressionFilter, DBXDataExpressMetaDataProvider, DbxDatasnap, DBXDBReaders, DBXDelegate, DBXDynalink, DBXDynalinkNative, DBXEncryption, DBXJSON, DBXJSONCommon, DBXJSONReflect, DBXMemoryRow, DBXMessageHandlerCommon, DBXMessageHandlerJSonClient, DBXMessageHandlerJSonCommon, DBXMessageHandlerJSonServer, DBXMessageHandlerServer, DBXMetaDataCommand, DBXMetaDataCommandFactory, DBXMetadataCommon, DBXMetaDataError, DBXMetaDataNames, DBXMetaDataProvider, DBXMetaDataReader, DBXMetaDataUtil, DBXMetaDataWriter, DBXMetaDataWriterFactory, DBXOpenSSL, DBXOpenSSLRes, DBXPlatform, DBXPool, DBXReaderTableStorage, DBXRSAFilter, DbxSocketChannelNative, DBXSqlScanner, DBXStream, DBXStreamer, DBXStreamPlatform, DBXTableFactory, DBXTrace, DBXTransport, DBXTransportFilter, DBXTypedTableStorage, DSUtil, FMTBcd, SqlConst, SqlExpr, SqlTimSt




Components, Consts, DBLinks, DBScope, Editors, EngExt


AmazonAPI, AzureAPI, Azure, AzureBlob, AzureMessageDialog, AzureQueueMetadataDialog, AzureQueue, AzureTableDialog, AzureTableRowDialog, AzureTable, AzureUI


DataBkr, DBClient, DSAuth, DSAzure, DSClientMetadata, DSClientResStrs, DSClientRest, DSCommonProxy, DSCommonServer, DSCommonTable, DSConnect, DSHTTP, DSHTTPCommon, DSHTTPLayer, DSHTTPServiceProxyDispatcher, DSHTTPWebBroker, DSLoginDlg, DSIntf, DSNames, DSPlatform, DSProxy, DSProxyCpp, DSProxyCppRest, DSProxyDelphi, DSProxyDelphiRest, DSProxyDispatcher, DSProxyRest, DSProxyWriter, DSProxyWriterRegistry, DSReflect, DSServer, DSServerResStrs, DSService, DSTCPServerTransport, DSTransport, Midas, MidConst, Provider


MConnect, MidasCon, MtsRdm, ObjBrkr, SConnect, TConnect


(FireMonkey application platform)

Ani, Canvas.D2D, Colors, Context.DX9, Controls, Dialogs, Edit, Effects, ExtCtrls, Filter, Filter.Effects, FilterCatBlur, FilterCatColor, FilterCatColorAdjust, FilterCatComposite, FilterCatDistortion, FilterCatGenerator, FilterCatGeometry, FilterCatStyle, FilterCatTiles, FilterCatTransition, Forms, Grid, Layers3D, Layouts, ListBox, Memo, Menus, Objects, Objects3D, Platform, Platform.Win, Printer, Printer.Win, TabControl, TreeView, Types, Types3D, Video


Consts, DBEngExt, Editors, Handlers


AppKit, CocoaTypes, CoreFoundation, CoreServices, Foundation, Mach, ObjCRuntime, ObjectiveC, OCMarshal, OpenGL, QuartzCore, Security, SystemConfiguration, VarObjC

(Mac OS X)

ArpaInet, Base, Dirent, Dlfcn, Errno, Fcntl, Fnmatch, Grp, Iconv, Langinfo, Limits, Locale, NetDB, NetIf, NetinetIcmp6, NetinetIn, NetinetIp6, Posix, Pthread, Pwd, Sched, Semaphore, Signal, StdDef, Stdio, Stdlib, String_, StrOpts, SysMman, SysSelect, SysSocket, SysStat, SysStatvfs, SysSysctl, SysTime, SysTimes, Systypes, SysUio, SysWait, Termios, Time, Unistd, Utime, Wchar, Wctype, Wordexp


EncdDecd, HTTPSOAPTBind, HTTPUtil, inquire_vcl, IntfInfo, InvConst, Invoker, InvokeRegistry, OPConvert, OPConvertOptions, OPToSOAPDomConv, OPToSOAPDomCustom, Rio, SOAInv, SOAPAttach, SOAPAttachIntf, SOAPConn, SOAPConst, SOAPDm, SOAPDomConv, SOAPHTTPClient, SOAPHTTPPasInv, SOAPHTTPTrans, SOAPLinked, SOAPMidas, TypeTrans, UDDIHelper, WebBrokerSOAP, WebNode, WebServerExp, WSDLBind, WSDLIntf, WSDLItems, WSDLLookup, WSDLNode, WSDLPub, WSDLSOAP, WSILIntf, XSBuiltIns

Soap.Win unit scope



AnsiStrings, Character, Classes, Contnrs, ConvUtils, DateUtils, DebugUtils, Diagnostics, Generics.Collections, Generics.Defaults, HelpIntfs, Inifiles, IOUtils, Masks, MaskUtils, Math, ObjAuto, RegularExpressions, RegularExpressionsCore, RTLConsts, Rtti, ShareMem, SimpleShareMem, StdConvs, StrUtils, SyncObjs, SysConst, SysUtils, TimeSpan, Types, TypInfo, UITypes, VarCmplx, VarConv, Variants, VarUtils, WideStrings, WideStrUtils, ZLib, ZLibConst


CustomScope, CustomWrapper, Consts, EvalProtocol, EvalSys, Evaluator, Expression, ExpressionDefaults, Factories, Graph, Helper, Manager, ManagerDefaults, Methods, NotifierContracts, NotifierDefaults, ObjEval, Outputs, Search


MachExceptions, Unwinder, VarHlpr, StrHlpr




ComConsts, ComObj, ComObjWrapper, Comserv, Mtsobj, ObjComAuto, Registry, ScktComp, StdVCL, VCLCom


(Visual Component Library)

ABAccessibility, ActnColorMaps, ActnCtrls, ActnList, ActnMan, ActnMenus, ActnPopup, ActnRes, AdaptReq, ADODB, AnsiStrings, AppEvnts, AutoAdap, AutoDisp, AxCtrls, BandActn, ButtonGroup, Buttons, Calendar, CaptionedDockTree, CategoryButtons, CGIApp, CGIHTTP, Character, CheckLst, Clipbrd, CmAdmCtl, ColorGrid, ComCtrls, ComStrs, Consts, Controls, ConvUtils, CtlPanel, CustomizeDlg, DBActns, DBCGrids, DBCtrls, DBGrids, DBLogDlg, DBLookup, DBOleCtl, DBPWDlg, DdeMan, Dialogs, Direct2D, DockTabSet, ExtActns, ExtCtrls, ExtDlgs, ExtThemes, FileCtrl, Forms, Graphics, GraphUtil, Grids, HTMLHelpViewer, ImgList, IMouse, LibHelp, ListActns, Mask, Menus, MPlayer, OleAuto, OleConst, OleCntnrs, OleCtrls, OleServer, Outline, PlatformDefaultStyleActnCtrls, Printers, recerror, Ribbon, RibbonActnCtrls, RibbonActnMenus, RibbonConsts, RibbonGalleryBar, RibbonLunaStyleActnCtrls, RibbonObsidianStyleActnCtrls, RibbonSilverStyleActnCtrls, RibbonStyleActnCtrls, ScreenTips, ShadowWnd, Shell.ShellConsts, Shell.ShellCtrls, ShellAnimations, StdActnMenus, StdActns, StdCtrls, StdStyleActnCtrls, SvcMgr, TabNotBk, Tabs, ThemedActnCtrls, Themes, TimeSpan, ToolWin, ValEdit, VDBConsts, WinHelpViewer, XPActnCtrls, XPMan, XPStyleActnCtrls


Consts, DBEngExt, Editors, Handlers


GIFConsts, GIFImg, JConsts, jpeg, pngextra, pngimage, pnglang


Calendar, DirOutln, Gauges, Spin


ShellConsts, ShellCtrls


GestureConsts, GetureCtrls, GestureMgr, Gestures, Keyboard, KeyboardTypes


ApacheApp, ApacheHTTP, ApacheTwoApp, ApacheTwoHTTP, AutoDisp, BrkrConst, CGIApp, CGIHTTP, DBWeb, DBXpressWeb, DSProd, HTTPApp, HTTPD, HTTPD2, HTTPProd, HTTPUtil, WebBroker, WebCntxt, WebConst, WebFileDispatcher, WebReq


ISAPIApp, IsapiHTTP, Sockets


AccCtrl, AclAPI, ActiveX, ADOInt, AspTlb, COMAdmin, CommCtrl, CommDlg, ComSvcs, Cor, CorError, CorHdr, Cpl, D2D1, D3DX8, D3DX9, DDEml, Direct3D, Direct3D8, Direct3D9, DirectDraw, DirectInput, DirectMusic, DirectPlay8, DirectSetup, DirectShow9, DirectSound, Dlgs, DwmApi, DX7toDX8, DxDiag, DXErr8, dXErr9, DXFile, DxgiFormat, DXTypes, FlatSB, GDIAPI, GDIOBJ, GDIPUTIL, ImageHlp, Imm, IpExport, IpHlpApi, IpRtrMib, IpTypes, Isapi, Isapi2, KnownFolders, LZExpand, Manipulations, Mapi, Messages, MMSystem, MSInkAut, MsInkAut15, msxml, Mtx, MultiMon, Nb30, ObjectArray, Ole2, oleacc, OleCtl, OleDlg, OpenGL, Penwin, PenWinapi, PropKey, PropSys, PsAPI, Qos, RegStr, RichEdit, RtsCom, ShellAPI, SHFolder, ShlObj, ShLwApi, StructuredQuery, StructuredQueryCondition, THelp32, TpcShrd, UrlMon, UxTheme, Wincodec, WinCtrl, Windows, WinInet, Winsafer, WinSock, WinSock2, WinSpool, WinSvc, WMF9


adomxmldom, DTDSchema, XDRSchema, XMLConst, XMLDataToSchema, XMLDoc, xmldom, XMLIniFile, XMLIntf, XMLSchema, XMLSchema99, XMLSchemaTags


AbnfUtils, AdomCore_4_3, CodecUtilsWin32, EncodingUtils, LangUtils, ParserUtilsWin32, TreeUtils, UriUtils, WideStringUtils, XmlRulesUtils



Units that Have No Unit Scope Name

The following units exist without unit scoping. These units do not require that you specify a unit scope name in the uses clause or #include.

  • ActnRes
  • AdaptReq
  • AutoAdap
  • ComApp
  • CompProd
  • CtlPanel
  • DBAdapt
  • DBAdaptImg
  • DesignEditors
  • DesignIntf
  • DSAzure
  • IB, IBBlob, and all the other IB (InterBase) units
  • MidItems
  • MidProd
  • PagItems
  • PlatformAPI
  • ReqFiles
  • ReqMulti
  • SessColn
  • SHDocVw
  • SimpleDS
  • SiteComp
  • SiteProd
  • WebAdapt
  • WebComp
  • WebContnrs
  • WebDisp
  • WebFact
  • WebForm
  • WebModu
  • WebScript
  • WebSess
  • WebUsers
  • XMLBrokr
  • Xmlxform
  • XSLProd

Unit Names in Alphabetical Order with Their Unit Scopes

For a reference list of unit names with their associated unit scope name, see Unit Names Alphabetical List with Unit Scopes.


See Also