RAD Studio Athens

W1032

Go Up to Error and Warning Messages (Delphi)

Identifier

The identifier for the $WARN directive: PACKAGED_THREADVAR

Description

Windows does not support the exporting of threadvar variables from a DLL, but since using packages is meant to be semantically equivalent to compiling a project without them, the Delphi compiler must somehow attempt to support this construct.

This warning is to notify you that you have included a unit which contains a threadvar in an interface into a package. While this is not illegal, you will not be able to access the variable from a unit outside the package.

Attempting to access this variable may appear to succeed, but it actually does not.

A solution to this warning is to move the threadvar to the implementation section and provide function which will retrieve the variables value.