错误
Traceback (most recent call last):
File "c:/Users/Administrator/Source/Repos/RSPluginKey/Debug/load.py", line 9, in <module>
work.re("")#http been del
OSError: exception: access violation reading 0x008B1000
python代码
from ctypes import *
import os
sdir = os.path.dirname(__file__)
work = CDLL(sdir + "\\RSPluginKey.dll")
print(work)
work.re("http://127.0.0.1")
cpp代码
#include "pch.h"
#include <iostream>
#include <string>
#include "requests.h"
extern "C" {//以此格式来添加引用函数
__declspec(dllexport) void re(std::string http);
}
void re(std::string http) {
using namespace std;
using namespace requests;
Response resp = Get(http);
cout << resp.status << endl;
cout << resp.GetText() << endl;
}
请求:https://github.com/lxwAsm/requests
也许是请求或其他原因,我是ctypes的新uesr,需要帮助
怎么办
目前没有回答
相关问题 更多 >
编程相关推荐