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 did not.
A solution to this warning is to move the threadvar to the implementation section and provide function which will retrieve the variables value.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!