C++如何将网页下载到字符串而不保存到磁盘 - URLDownloadToFile 不起作用

发布于 2024-08-07 01:03:52 字数 221 浏览 5 评论 0原文

如何在不将此页面保存到磁盘的情况下将网页下载到字符串中 C++

URLDownloadToFile MSDN 函数 仅将页面保存到磁盘中。

How to download webpage into string without saving this page to disk in C++?

URLDownloadToFile MSDN function only saving page into disk.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爺獨霸怡葒院 2024-08-14 01:03:52

您是否查找过其中提到的其他 URLXXX 函数?怎么样:URLOpenBlockingStream

//implement filestream that derives from IStream
class StringStream : public IStream
{
  StringStream(std::wstring buf) 
    {
        _refcount = 1;
        _mBuf = buf;
    }

    ~ StringStream ()
    {

    }
   // implement IUknown, IStream interfaces
   private:
    std::wstring _mBuf;
    long _refcount;
 };

请参阅此处基于默认文件的 IStream 实现。

Did you look up the other URLXXX functions mentioned thereof? How about: URLOpenBlockingStream?

//implement filestream that derives from IStream
class StringStream : public IStream
{
  StringStream(std::wstring buf) 
    {
        _refcount = 1;
        _mBuf = buf;
    }

    ~ StringStream ()
    {

    }
   // implement IUknown, IStream interfaces
   private:
    std::wstring _mBuf;
    long _refcount;
 };

See the default file based IStream implementation here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文