Hello,
I'm trying to convert an application that would use the function fopen_s to open an xml file that is read into our system to use the MFC function CreateFile.
We use Visual Studio 2010 Premium and have a C++ code baseline.
After opening the existing file it is read in and we keep the handle to the file open so that other users or processes can't modify the file so it is locked.
We have a sql function call that fails:
AFX_SQL_SYNC(::SQLDriverConnect( m_hdbc, hWnd, reinterpret_cast<SQLTCHAR *>(pszConnectInput),
SQL_NTS, reinterpret_cast<SQLTCHAR *>(szConnectionOutput),
$nResult, wConnectOption));
The function call above works when I switch back to the previous implementation that uses fopen_s.
I am wondering why this is occurring and how do I fix it.
The error is : Unhandled exception at 0x00000000 in process.exe: 0xC0000005: Access violation location 0x00000000000000000.
Thanks,
Jeff