Article ID: 172396 - Last Review: September 2, 2005 - Revision: 3.0 You may experience an access violation when you access an STL object through a pointer or reference in a different DLL or EXE
This article was previously published under Q172396 On This PageSYMPTOMS
When accessing an STL object created in one DLL or EXE through a pointer or
reference in a different DLL or EXE, you may experience an access violation
or other serious program errors including the appearance of data corruption
or data loss.
CAUSE
Most classes in the Standard C++ Libraries use static data members directly
or indirectly. Since these classes are generated through template
instantiation, each executable image (usually with DLL or EXE file name
extensions) will contain its own copy of the static data member for a given
class. When a method of the class that requires the static data member is
executed, it uses the static data member in the executable image in which
the method code resides. Since the static data members in the executable
images are not in sync, this action could result in an access violation or
data may appear to be lost or corrupted.
RESOLUTION
STATUS
This behavior is by design. MORE INFORMATIONSteps to reproduce the behavior | Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top