i have run into a very strange and inconsistent behaviour of VC++2010 IDE
given this recordset
LONGLONG m_ID;
long m_lingua;
CString m_titolo;
CTime m_dataemissione;
int m_fonte;
CString m_cryptedfilepath;
CString m_tabellaindice;
long m_num_ind;
bool m_border;
bool m_xdom;
CString m_triass;
LONGLONG m_offset;
and this method which i have extracted from the standard constructorvoid Crecdocumenti::Azzera(void)
{
m_ID = 0;
m_lingua = 0;
m_titolo = L"";
m_dataemissione=NULL;
m_fonte = 0;
m_cryptedfilepath = "";
m_tabellaindice = "";
m_num_ind = 0;
m_border = 0;
m_xdom = 0;
m_triass="";
m_offset=(LONGLONG)0;
}
when the constructor is called in a statement like
crdoc = new Crecdoc(idb)
the method works correctly
when it is called thru
crdoc->AddNew()
the statement which i underscored throw an atl string incorrect parameter exception as if it were unable to compute the string final size [the getallocdata call in line 892 of ATLsimplstring.cpp
what is impossible to understand is WHY ONLY this field has problems and WHY only with addnew and not with the other call path
DOES ANYONE HAVE ANY IDEA ???
claudio cannella