Curl 在MFC C++中获得卷曲
我正在尝试将cURL结果设置为messagebox:Curl 在MFC C++中获得卷曲,curl,mfc,Curl,Mfc,我正在尝试将cURL结果设置为messagebox: CURL *curl; CURLcode res; curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); res = curl_easy_perform(curl);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
curl_easy_cleanup(curl);
}
MessageBox(res, _T("Title"), MB_ICONASTERISK | MB_OK);
如何使用messagebox设置res值
CString str(readBuffer.c_str());
statictext.SetWindowTextW(LPCTSTR(str));
MessageBox(LPCTSTR(str), _T("Title"), MB_ICONASTERISK | MB_OK);
curl_easy_cleanup(curl);
终于找到了办法 错误是什么?什么是CURLcode类?我得到了一些中国奇怪的字符而不是结果