CInternetSession的问题

hotheartlewis 2004-04-29 11:16:41
我新建了一个win32 console application,之后想用CInternetSession类作和网页的交互,但编译成功后,执行是却报

Debug Assertion failed!
program:test.exe
file:afxwin1.inl
line:27

for information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.


而当我新建一个win32 application时,如果加入<afxinet.h>,编译无法通过,
“e:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
Error executing cl.exe.”,谁做过类似的工作,help!
...全文
171 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
hotheartlewis 2004-06-23
  • 打赏
  • 举报
回复
ok
hotheartlewis 2004-05-06
  • 打赏
  • 举报
回复
我什么都没有动,只是想用CinternetSession类,只是声明了一个变量,又包含了<afxinet.h〉头文件,然后编译成debug版本就有这样的问题。
herofyf 2004-04-29
  • 打赏
  • 举报
回复
afxCurrentAppName 是为空了吧!还要问
hotheartlewis 2004-04-29
  • 打赏
  • 举报
回复
在线等
hotheartlewis 2004-04-29
  • 打赏
  • 举报
回复
afxwin1.inl文件的第27行是
{ ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }
PiggyXP 2004-04-29
  • 打赏
  • 举报
回复
还有就是在win32 application中,默认已经包含windows.h了,这个时候就不能再
包含以afx开头的头文件了,如<afxinet.h>
PiggyXP 2004-04-29
  • 打赏
  • 举报
回复
回复人: hotheartlewis() ( ) 信誉:100 2004-04-29 11:19:00 得分:0


afxwin1.inl文件的第27行是
{ ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }

---------------------------------------------------------------------------

这个的意思就是确认afxCurrentAppName不为空,如果为空就要发生Assertion错误
这个函数是获得当前应用程序的exe名字,不知道楼主怎么把它弄空的-_-b

hotheartlewis 2004-04-29
  • 打赏
  • 举报
回复
afxCurrentAppName是什么东西呀,我不知道,我对vc只知道一点,怎么办呢?

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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