ATL Error: i386\chkesp.c (ADO)
-
Hi, One problem solved another problem appears. THis time i encountered a problem that has no good explantion for it. I got an error when trying to open a connection to the ADO. The code that i have written is: Code try { //THROW_ERR( CoInitialize(NULL) ); THROW_ERR( CoCreateInstance(CLSID_CADOConnection, NULL, CLSCTX_INPROC_SERVER, IID_IADOConnection, (LPVOID*)&m_pConnection) ); THROW_ERR( m_pConnection->Open(m_bsDataSource, m_bsUserName, m_bsPassword, adOpenUnspecified) ); } catch (HRESULT hr) { PopupErrorMessage(hr); return FALSE; } I tried out the code in the debug mode and it stopped at the line where it calls the 'Open' function. The error message is: Program:C:\temp\project\project.exe Module: File:i386\chkesp.c Line: 42 The Value of the ESP was not properly saved across function call. This us usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. I have included the 'adoid.h' and 'adoint.h' in the 'stdafx.h' file. I even included the 'adoid.lib' in my project setting. What is the root cause of this problem and how to solve it?? Need your help.. thanks in advance. leonwoo