Giter Site home page Giter Site logo

Comments (18)

smart2pet avatar smart2pet commented on June 26, 2024

Please check at the WeChat version. Or have you opened Wechat?

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Please check at the WeChat version. Or have you opened Wechat?

我可以确保微信的版本是项目所支持的,我也尝试了许多方法,但是当点击显示二维码的按钮之后就会崩溃。
我发现是pWnd->SendMessage(WM_COPYDATA, NULL, (LPARAM)&show_qrpic);导致的崩溃,在WeChatRobotDlg.cpp文件,第221行的位置,崩溃的原因是pWnd指针是一个空指针,而且我发现在这个文件的第215行,CWnd *pWnd = CWnd::FindWindow(NULL, L"WeChatHelper");,这里的FindWindow函数返回的是NULL,这是导致崩溃的根源,我想知道如何解决这个问题,谢谢!

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Oh. You can check the Window's name. And maybe it was 微信.

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Oh. You can check the Window's name. And maybe it was 微信.

哦!是的!你是对的!
这个指针正常了,但是又出现了新的问题,执行到显示二维码的时候出现了崩溃,我检查了一下,是执行ShowPicture函数导致的崩溃,我发现这个函数会获得一个图片文件的路径,并试图寻找qrcode.png这个文件,但是我并没有在我的电脑中找到这个图片文件,我猜测这个图片是“从微信登录中获取的二维码”,但是它并不在这个路径下,我该如何解决这个问题?

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Look at the README:
解决方案:安装VS2017 勾选使用C++的桌面开发。问题即可解决

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Look at the README: 解决方案:安装VS2017 勾选使用C++的桌面开发。问题即可解决

我确保我已经安装了VS2017 并且 勾选使用C++的桌面开发,但是问题并不能解决,上述的问题都是在此环境下编译运行产生的,我认为不是开发环境的问题,而是其他问题导致的

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Look at the README: 解决方案:安装VS2017 勾选使用C++的桌面开发。问题即可解决

你可以查看WeChatRobotDlg.cpp这个文件,在第245行,程序获取了图片(二维码)的完整路径,并且在第249行,加载这个图片文件,但是我发现这个图片加载失败了,并且我也没有在电脑上找到这个图片文件,我想这就是崩溃的原因,但是我不能解决它。

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Look at the README: 解决方案:安装VS2017 勾选使用C++的桌面开发。问题即可解决

我尝试去“骗”这个程序,我通过截图的方式,手动保存了这个图片,程序也正确的加载并显示了这张图片,但是当我扫码登录微信之后,程序并没有任何的反应,我觉得在此之前一定出现了一些问题。
CWnd *pWnd = CWnd::FindWindow(NULL, L"WeChatHelper");当程序在执行这个函数的时候,他要寻找的窗口是“WeChatHelper”,这是该项目的模块,而不是“微信”,虽然我不知道程序寻找这个窗口的原因是什么,但我认为这与获取二维码的功能有关,也许是在这一步出现的问题,导致程序无法获取二维码图片

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Oh. Yeah. Let me see...

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

But almost all functions in this bot are based on this.

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

But almost all functions in this bot are based on this.

是的,我现在依然没有找到解决方案...
你可以使用VS2017调试工具检查这里,在WeChatRobotDlg.cpp文件中第215行的位置,CWnd *pWnd = CWnd::FindWindow(NULL, L"WeChatHelper"); ,帮我看看这个函数寻找的是哪一个窗口,也许可以得到答案。
谢谢!

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Yes...

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

I'm sorry because I'm using another python wechat bot. I'll create a virtual machine to debug it. Probably I'll done in the afternoon.

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

对不起,因为我正在使用另一个python微信机器人。我将创建一个虚拟机来调试它。可能我会在下午完成。

十分感谢!

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Sorry.

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Sorry.

You shouldn't apologize to me. Instead, I should thank you for helping me

from wechatrobot.

smart2pet avatar smart2pet commented on June 26, 2024

Sorry. I'm have some things to do these days.

from wechatrobot.

XiaoXueTu555 avatar XiaoXueTu555 commented on June 26, 2024

Sorry. I'm have some things to do these days.

Can understand, in the spare time to help me is ok, thank you
Thanks♪(・ω・)ノ

from wechatrobot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.