summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-07 23:38:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-07 23:38:31 +0300
commit777dc2174f34c2a4d4499c3d63ef8914ed9ecb81 (patch)
tree6d7c6c4b09287386739ba4cc7accde38ed90da8c /protocols/FacebookRM/src
parente9e0d8203c36c1d2e2aa4201e01bf4206804f25b (diff)
old AdvaImg services converted into Image_* functions
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r--protocols/FacebookRM/src/captcha.cpp7
-rw-r--r--protocols/FacebookRM/src/json.cpp11
2 files changed, 4 insertions, 14 deletions
diff --git a/protocols/FacebookRM/src/captcha.cpp b/protocols/FacebookRM/src/captcha.cpp
index bcd952fccc..96f13447d5 100644
--- a/protocols/FacebookRM/src/captcha.cpp
+++ b/protocols/FacebookRM/src/captcha.cpp
@@ -120,12 +120,7 @@ bool FacebookProto::RunCaptchaForm(std::string captchaUrl, std::string &result)
}
CAPTCHA_FORM_PARAMS param = {};
-
- IMGSRVC_MEMIO memio = { 0 };
- memio.iLen = reply->dataLength;
- memio.pBuf = reply->pData;
- memio.fif = FIF_UNKNOWN; /* detect */
- param.bmp = (HBITMAP)CallService(MS_IMG_LOADFROMMEM, (WPARAM)&memio);
+ param.bmp = Image_LoadFromMem(reply->pData, reply->dataLength, FIF_UNKNOWN);
BITMAP bmp = { 0 };
GetObject(param.bmp, sizeof(bmp), &bmp);
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index cbf9715466..29ca4dd2da 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -525,19 +525,14 @@ const char* FacebookProto::ParseIcon(const std::string &url)
NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(facy.handle_, &req);
if (reply != nullptr && reply->resultCode == HTTP_CODE_OK) {
- IMGSRVC_MEMIO memio = { 0 };
- memio.iLen = reply->dataLength;
- memio.pBuf = reply->pData;
- memio.fif = FIF_UNKNOWN; /* detect */
-
- HBITMAP hBmp = (HBITMAP)CallService(MS_IMG_LOADFROMMEM, (WPARAM)&memio);
+ HBITMAP hBmp = Image_LoadFromMem(reply->pData, reply->dataLength, FIF_UNKNOWN);
if (hBmp != nullptr) {
IMGSRVC_INFO info = { sizeof(info) };
- info.wszName = wszFileName;
+ info.szName.w = wszFileName;
info.fif = FIF_ICO;
info.dwMask = IMGI_HBITMAP;
info.hbm = hBmp;
- CallService(MS_IMG_SAVE, (WPARAM)&info, IMGL_WCHAR);
+ Image_Save(&info, IMGL_WCHAR);
}
}
}