An access violation occurs when you try to call one of the string conversion macros in Visual C++ (198009)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- The Microsoft Active Template Library (ATL) 2.1, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q198009 SYMPTOMS Calling one of the string conversion macros, such as OLE2T
or T2OLE, inside a catch block of a try/catch exception handler causes an
access violation. CAUSE Some of the string conversion macros will call _alloca().
However, _alloca() cannot be used inside an exception handler. RESOLUTION Use MultiByteToWideChar() or WideCharToMultiByte() rather
than string conversion macros inside an exception handler. STATUS This behavior is by design. REFERENCES Visual C++ Online Documentation for _alloca()
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Samson
Tanrena, Microsoft Corporation.
Modification Type: | Major | Last Reviewed: | 6/2/2005 |
---|
Keywords: | kbtshoot kbExceptHandling kbprb KB198009 kbAudDeveloper |
---|
|