debugger showing wrong data in argument list C++.NET and ADO
From: michael (michael_at_discussions.microsoft.com)
Date: 08/02/04
- Next message: Developer: "Re: Crash under debugger"
- Previous message: Gary Chang: "RE: Cannot break at stored procedures from VC.NET 2003"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 2 Aug 2004 05:13:02 -0700
I am having a problem using the "mixed/managed debugger "
all my classes are unmanaged. I compiled with /clr /EHsc
first I import msado v1.5
DBUtiles.h
#include <afxtempl.h>
#import "c:\Program files\Common files\system\ado\msado15.dll"
no_namespace rename("EOF", "adoEOF")
#include "comdef.h"
class TRV_UTILITY_EXPORT CDatabaseHelper : CStoredProcRS
{
_RecordsetPtr pRecordSet;
}
Issue:
I initialize the Rows = 3000, then I step into a msado15 wrapper
method GetRows(). I confirmed that one recored was return because
lpRecords = 1, this is what I expected.
DBUtiles.cpp
{
ADO_LONGPTR lpRecords = pRecordSet->GetRecordCount();
Rows = 3000;
avarRecords = pRecordSet->GetRows(Rows); //, Start, Fields);
}
However, while in the inline Recordset15::GetRows( ) intellisense
shows the value parameter "Rows" = {_int3} and it fails when a call is
made to raw_GetRows( ) because the local variable Rows = {__int3} not
3000.
I get exception Error:
3421 adErrDataConversion Application uses a value of the wrong type for the current operation.
msado15.tli
inline _variant_t Recordset15::GetRows ( long Rows, const _variant_t &
Start, const _variant_t & Fields ) {
VARIANT _result;
VariantInit(&_result);
/* Rows = {__int3 } it should be = 3000 */
HRESULT _hr = raw_GetRows(Rows, Start, Fields, &_result);
/* hr = -2146824867 it should be 0 */
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
does anyone think that the ms kb 840667 have any relevance to this issue?
could it be that MC++.NET unmanaged code has unknown errors when used with
ADO not ADO.NET?
msado15.tlh
struct __declspec(uuid("0000050e-0000-0010-8000-00aa006d2ea4"))
Recordset15 : _ADO
{
virtual HRESULT __stdcall raw_GetRows (
/*[in]*/ long Rows,
/*[in]*/ VARIANT Start,
/*[in]*/ VARIANT Fields,
/*[out,retval]*/ VARIANT * pvar ) = 0;
}
Any help from anyone would be highly appreciated.
- Next message: Developer: "Re: Crash under debugger"
- Previous message: Gary Chang: "RE: Cannot break at stored procedures from VC.NET 2003"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|