简体   繁体   English

CEDel.exe中0x03f7111c处的第一次机会异常:0xC0000005:访问冲突写入位置0x002e0364

[英]First-chance exception at 0x03f7111c in CEDel.exe: 0xC0000005: Access violation writing location 0x002e0364

I am getting a "First-chance exception at 0x03f7111c in CEDel.exe: 0xC0000005: Access violation writing location 0x002e0364." 我收到“ CEDel.exe中0x03f7111c的首次机会异常:0xC0000005:访问冲突写入位置0x002e0364。 error when running my code. 运行我的代码时出错。 I am currently running in debug mode, and running on an actual Win Mobile CE 6.5.3 device that is plugged into my computer. 我当前正在调试模式下运行,并且在插入计算机的实际Win Mobile CE 6.5.3设备上运行。 The top of the stack (that is not disassembly) is pointing to an if statement, and I am not sure what is causing the error. 堆栈的顶部(不是反汇编的)指向if语句,我不确定是什么导致了错误。 The project was created in MS eMbedded C++ several years ago, and I am porting it to MS Visual Studio 2008. 该项目是几年前使用MS eMbedded C ++创建的,我正将其移植到MS Visual Studio 2008。

The code is 该代码是

CDeviceFuncCursor& curs = tempDeviceFunc.GetCursor();// added for debug checks

if (((wcscmp(_wcsupr(tempDeviceFunc.GetCursor().m_szSection), _wcsupr(INI_SERVERS_SECTION)) == 0) &&    //INI_SERVERS_SECTION == _T("Servers")
    ((wcscmp(_wcsupr(tempDeviceFunc.GetCursor().m_szVariable), _wcsupr(FTP_PRIMARY)) == 0) ||   //FTP_PRIMARY == _T("Primary")
*    (wcscmp(_wcsupr(tempDeviceFunc.GetCursor().m_szVariable), _wcsupr(SERVER_PORT)) == 0))))   //SERVER_PORT == _T("SERVERPORT")
{
    CString csValue = tempDeviceFunc.GetCursor().m_szValue;
    csValue = EncryptData(csValue.GetBuffer(csValue.GetLength()));

    WriteProfileString(tempDeviceFunc.GetCursor().m_szSection, tempDeviceFunc.GetCursor().m_szVariable, csValue.GetBuffer(csValue.GetLength()+1));
}

The line with the * is the one being pointed to by the stack. 带*的行是堆栈所指向的那一行。

at the break point: curs.m_szSection = "APPLICATIONCONTROL", curs.m_szVariable = "AppLanguage", curs.m_szValue == "0" 在断点处:curs.m_szSection =“ APPLICATIONCONTROL”,curs.m_szVariable =“ AppLanguage”,curs.m_szValue ==“ 0”

I am not sure where to look to find the error, 我不确定在哪里可以找到错误,

I guess you have a macro 我想你有一个宏

#define SERVER_PORT _T("SERVERPORT")

in which case _T("SERVERPORT") is a const array. 在这种情况下, _T("SERVERPORT")是一个const数组。
You're not allowed to modify it ( _wcsupr modifies its argument in-place). 您不允许对其进行修改( _wcsupr修改其参数)。

Replace the macro with a variable: 将宏替换为变量:

TCHAR SERVER_PORT[] = _T("SERVERPORT");

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Project4.exe中0x00998876处的首次机会异常:0xC0000005:访问冲突写入位置0x00000000 - First-chance exception at 0x00998876 in Project4.exe: 0xC0000005: Access violation writing location 0x00000000 0x0FBD8B51 (msvcr120d.dll) 中的高或低.exe 处的第一次机会异常:0xC0000005:访问冲突读取位置 0x74742E6C - First-chance exception at 0x0FBD8B51 (msvcr120d.dll) in Higher Or Lower.exe: 0xC0000005: Access violation reading location 0x74742E6C 在 ConsoleApplication5.exe 中的 0x0F640E09 (ucrtbased.dll) 处抛出异常:0xC0000005:访问冲突写入位置 0x014C3000? - Exception thrown at 0x0F640E09 (ucrtbased.dll) in ConsoleApplication5.exe: 0xC0000005: Access violation writing location 0x014C3000? program.exe中0x010F2F1C处未处理的异常:0xC0000005:访问冲突读取位置0xCCCCCCD0 - Unhandled exception at 0x010F2F1C in program.exe: 0xC0000005: Access violation reading location 0xCCCCCCD0 NVIDIA未处理的异常,位于0x002a2da2中 <work.exe> 0xC0000005:访问冲突读取位置0x00000000 - NVIDIA Unhandled exception at 0x002a2da2 in <work.exe>0xC0000005: Access violation reading location 0x00000000 CandidateVotes.exe中0x50E6F1C0(ucrtbased.dll)抛出异常:0xC0000005:访问冲突读取位置0x00000000 - Exception thrown at 0x50E6F1C0 (ucrtbased.dll) in CandidateVotes.exe: 0xC0000005: Access violation reading location 0x00000000 HW 5 Rational pt2.exe 中 0x5E10F1C0 (ucrtbased.dll) 处未处理的异常:0xC0000005:访问冲突读取位置 0xCCCCCCCC。 发生了 - Unhandled exception at 0x5E10F1C0 (ucrtbased.dll) in HW 5 Rational pt2.exe: 0xC0000005: Access violation reading location 0xCCCCCCCC. occurred 在 0x0037A5C2 project.exe 处抛出异常:0xC0000005:程序末尾的访问冲突写入位置 0xDDDDDDDD - Exception thrown at 0x0037A5C2 project.exe: 0xC0000005: Access violation writing location 0xDDDDDDDD at the end of the program Final Project.exe中0x0F28EA8E(msvcr110d.dll)的未处理异常:0xC0000005:访问冲突读取位置0x9F5A339A - Unhandled exception at 0x0F28EA8E (msvcr110d.dll) in Final Project.exe: 0xC0000005: Access violation reading location 0x9F5A339A 在 Project70.exe 中的 0x0F4D514F (vcruntime140d.dll) 处引发异常:0xC0000005:访问冲突写入位置 0xDDDDDDDD - Exception thrown at 0x0F4D514F (vcruntime140d.dll) in Project70.exe: 0xC0000005: Access violation writing location 0xDDDDDDDD
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM