diff options
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/main.cpp | 3 | ||||
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 12 | ||||
-rw-r--r-- | protocols/VKontakte/src/stdafx.h | 1 |
3 files changed, 7 insertions, 9 deletions
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 28ce73acae..8f367d6c02 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HINSTANCE hInst;
int hLangpack;
CLIST_INTERFACE *pcli;
-FI_INTERFACE *fii;
PLUGININFOEX pluginInfo =
{
@@ -71,7 +70,7 @@ extern "C" int __declspec(dllexport) Load() {
mir_getLP(&pluginInfo);
pcli = Clist_GetInterface();
- CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
+
InitIcons();
// Register protocol module
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index b9d155e48b..1169de5b01 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1469,16 +1469,16 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) if (pFile == nullptr)
return;
- FIBITMAP *dib = fii->FI_CreateDIBFromHBITMAP(hBitmap);
- FIMEMORY *hMem = fii->FI_OpenMemory(nullptr, 0);
- fii->FI_SaveToMemory(FIF_PNG, dib, hMem, 0);
+ FIBITMAP *dib = FreeImage_CreateDIBFromHBITMAP(hBitmap);
+ FIMEMORY *hMem = FreeImage_OpenMemory(nullptr, 0);
+ FreeImage_SaveToMemory(FIF_PNG, dib, hMem, 0);
BYTE *buf = nullptr;
DWORD bufLen;
- fii->FI_AcquireMemory(hMem, &buf, &bufLen);
+ FreeImage_AcquireMemory(hMem, &buf, &bufLen);
ptrA base64(mir_base64_encode(buf, bufLen));
- fii->FI_CloseMemory(hMem);
- fii->FI_Unload(dib);
+ FreeImage_CloseMemory(hMem);
+ FreeImage_Unload(dib);
CMStringA szHTML(FORMAT, "<html><body><img src=\"data:image/png;base64,%s\" /></body></html>", base64);
fwrite(szHTML, 1, szHTML.GetLength(), pFile);
diff --git a/protocols/VKontakte/src/stdafx.h b/protocols/VKontakte/src/stdafx.h index 6a78386a59..148637c0a0 100644 --- a/protocols/VKontakte/src/stdafx.h +++ b/protocols/VKontakte/src/stdafx.h @@ -56,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "win2k.h"
-extern FI_INTERFACE *fii;
extern HINSTANCE hInst;
#include "resource.h"
|