FIX: ADO Recordset GetString() Function Throws an Access Violation in Oleaut32.dll (230276)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
This article was previously published under Q230276 SYMPTOMS Calling the GetString() function on a _RecordsetPtr object
may cause the following error to occur: Unhandled
Exception in <application name> (OLEAUT32.DLL) : 0xC0000005: Access
Violation CAUSE The #import-generated wrapper function GetString() passes
an uninitialized BSTR pointer to the ADO raw_GetString() function as an out
parameter. The raw_GetString() function incorrectly calls the SysFreeString()
function on the parameter if it is not pointing to NULL. RESOLUTIONThis problem was corrected in
ADO 2.5.
For earlier versions of ADO, call the
raw_GetString directly and pass a BSTR pointer that points to NULL as the
output parameter, or create a wrapper function as described in the "More
Information" section. STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
This problem was corrected in ADO
2.5.
Modification Type: | Major | Last Reviewed: | 11/4/2003 |
---|
Keywords: | kbADO250Fix kbbug kbDatabase kbfix kbMDACNoSweep KB230276 kbAudDeveloper |
---|
|