在WIn32程序中使用MFC的CInternetSession运行异常,主要是因为获取目前应用程序名出错的解决办法

转载:http://group.gimoo.net/review/22564

头文件#include <afxinet.h"> 

在非MFC工程中使用CInternetSession抛异常的原因,调试跟踪到说AfxGetAppName为空

解决办法:创建CInternetSession 有参对象 

CInternetSession    InternetSession(_T("myagent"));
原文地址:https://www.cnblogs.com/chechen/p/5800554.html