运行VC写的程序,出现的错误...请高手指点...???

ismycxp 2008-05-17 07:14:32
在本机运行很正常,BUG和Release都试过了,都出现异常

如下:

this application has requested the runtime to terminate it in an unusual way.please contact the application's support team for more information

试了7台电脑,其中有二台电脑出现这样的异常,其它正常...

请问应该如何解决这样的问题,

我用的是VS2008编译的...

请高手指点...谢谢!
...全文
89 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhouzhenyan 2008-05-17
  • 打赏
  • 举报
回复
如果你用XML文件作为配置文件的话,建议用开源的tinyXML,轻量、高效,使用简单。
七里河蠢才 2008-05-17
  • 打赏
  • 举报
回复
学习
ismycxp 2008-05-17
  • 打赏
  • 举报
回复
CMarkup依赖于MSXML吗?
0x16 2008-05-17
  • 打赏
  • 举报
回复
CMarkup,XML操作类。google一下资源很多。也有使用方法!
ismycxp 2008-05-17
  • 打赏
  • 举报
回复
谁有更好的XML操作类...太痛苦了..............
ismycxp 2008-05-17
  • 打赏
  • 举报
回复
就是因为加入了XML操作才出现的问题,

现在却不知道是哪错了...为什么会出错...

ismycxp 2008-05-17
  • 打赏
  • 举报
回复
找到错误源了,原来是我引用过来的CXML类出现了问题

其中有这样的代码
XML.H

#pragma once


#import "msxml3.dll" // msxml3.dll or msxml4.dll or msxml5.dll or msxml6.dll
#include <memory>

#ifndef ASSERT
#define ASSERT ATLASSERT
#endif

#ifndef TRACE
#define TRACE ATLTRACE
#endif


namespace MSXML2
{
struct __declspec(uuid("f6d90f11-9c73-11d3-b32e-00c04f990bb4"))
DOMDocument;

struct __declspec(uuid("f5078f1b-c551-11d3-89b9-0000f81fe221"))
DOMDocument26;

struct __declspec(uuid("f5078f32-c551-11d3-89b9-0000f81fe221"))
DOMDocument30;

struct __declspec(uuid("88d969c0-f192-11d4-a65f-0040963251e5"))
DOMDocument40;

struct __declspec(uuid("88d969e5-f192-11d4-a65f-0040963251e5"))
DOMDocument50;

struct __declspec(uuid("88d96a05-f192-11d4-a65f-0040963251e5"))
DOMDocument60;
}




#ifndef RELEASE_PTR
#define RELEASE_PTR(x) \
if( x != NULL ) \
{ \
x.Release(); \
x = NULL; \
}
#endif

namespace Generic
{
class CXml;
class CXmlNode;
class CXmlNodes;

typedef std::auto_ptr<CXmlNode> CXmlNodePtr;
typedef std::auto_ptr<CXmlNodes> CXmlNodesPtr;
}

#include "XmlNodes.h"

namespace Generic
{
class CXmlNode
{
friend class CXml;
friend class CXmlNode;
friend class CXmlNodes;

protected:
MSXML2::IXMLDOMNodePtr m_pNode;

CXmlNode( MSXML2::IXMLDOMNodePtr pNode);

BOOL _GetValue(CString & strValue) const;
BOOL _SetValue(CString & strValue) const;

BOOL _GetAttribute( CString & strName, CString & strValue) const;
BOOL _SetAttribute( CString & strName IN
, CString & strValue IN
, CString & strPrefix IN
, CString & strNamespaceURI IN
) const;

public:

// _____________
//______| constructor |___________________________________________________________________
CXmlNode(void);
CXmlNode(const CXmlNode & refNode IN);
CXmlNode(const CXmlNodePtr pNode IN);
~CXmlNode(void);

// _______________
//______| override = |___________________________________________________________________
CXmlNodePtr operator = (CXmlNodePtr pNode);
CXmlNode & operator = (const CXmlNode & refNode);



BOOL IsNull(void) const; // Whether the current element exist
CString GetName(void) const;// Get the name of the current node
CXmlNode & Detach(void); // Detach the current node
void Release(void); // Release this node


// _______________
//______|Parent - Child |___________________________________________________________________
CXmlNodePtr GetChild( CString strName, BOOL bBuildIfNotExist = TRUE);
CXmlNodePtr NewChild( CString strName );
CXmlNodePtr GetParent(void);
CXmlNodesPtr GetChildren();
void AttachChild( CXmlNodePtr & pChildNode);
void AttachChild( CXmlNode & refChildNode);
BOOL HasChildren(void);
BOOL RemoveChildren(void);



// _______________
//______| attribute |___________________________________________________________________
CString GetAttribute( CString strName, LPCTSTR lpszDefault = NULL) const;
bool GetAttribute( CString strName, bool bDefault) const;
int GetAttribute( CString strName, int nDefault) const;
long GetAttribute( CString strName, long lDefault) const;
__int64 GetAttribute( CString strName, __int64 llDefault) const;
float GetAttribute( CString strName, float fDefault) const;
double GetAttribute( CString strName, double dDefault) const;
DWORD GetAttribute( CString strName, DWORD dwDefault) const;

BOOL SetAttribute( CString strName, LPCTSTR lpszValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, bool bValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, int nValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, long lValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, __int64 llValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, float fValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, double dValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));
BOOL SetAttribute( CString strName, DWORD dwValue , CString strPrefix = _T(""), CString strNamespaceURI = _T(""));

BOOL RemoveAttribute( CString strName );


// _______
//______| value |___________________________________________________________________
CString GetValue( LPCTSTR lpszDefault = NULL ) const;
bool GetValue( bool bDefault ) const;
int GetValue( int nDefault) const;
long GetValue( long lDefault) const;
__int64 GetValue( __int64 llDefault) const;
float GetValue( float fDefault) const;
double GetValue( double dDefault) const;
DWORD GetValue( DWORD dwDefault) const;

BOOL SetValue( LPCTSTR lpszValue );
BOOL SetValue( bool bValue );
BOOL SetValue( int nValue );
BOOL SetValue( long lValue );
BOOL SetValue( __int64 llValue );
BOOL SetValue( float fValue );
BOOL SetValue( double dValue );
BOOL SetValue( DWORD dwValue );


CXmlNodePtr SelectSingleNode(LPCTSTR lpszPath);
CXmlNodesPtr SelectNodes(LPCTSTR lpszPath);

// _______________________
//______| InnerXml OuterXml |___________________________________________________________________
CString GetOuterXml(void) const;
CString GetInnerXml(void) const;

};
}



可是为什么会出错,我还是不知道...如何是好?
zhouzhenyan 2008-05-17
  • 打赏
  • 举报
回复
会不会是运行时文件冲突的原因?
把所需的运行时文件重新拷到那些机子上再运行看看。
arong1234 2008-05-17
  • 打赏
  • 举报
回复
debug啊,根据这个哪能知道原因,不debug是不可能知道答案得。首先要尽量加日志,知道代码在哪出现异常

16,467

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧