ReactOS 0.4.16-dev-91-g764881a
CImageDx::SHARED Struct Reference

#include <atlimagedx.h>

Collaboration diagram for CImageDx::SHARED:

Public Member Functions

HINSTANCE Init ()
 
void Free ()
 
LONG AddRef ()
 
LONG Release ()
 

Public Attributes

HINSTANCE m_hGdiPlus = NULL
 
LONG m_cRefs = 0
 
ULONG_PTR m_dwToken = 0
 
FN_Shutdown m_Shutdown = NULL
 
FN_GetImageHorizontalResolution m_GetImageHorizontalResolution = NULL
 
FN_GetImageVerticalResolution m_GetImageVerticalResolution = NULL
 
FN_BitmapSetResolution m_BitmapSetResolution = NULL
 
FN_CreateBitmapFromHBITMAP m_CreateBitmapFromHBITMAP = NULL
 
FN_CreateBitmapFromFile m_CreateBitmapFromFile = NULL
 
FN_CreateHBITMAPFromBitmap m_CreateHBITMAPFromBitmap = NULL
 
FN_SaveImageToFile m_SaveImageToFile = NULL
 
FN_DisposeImage m_DisposeImage = NULL
 
FN_GetImageEncodersSize m_GetImageEncodersSize = NULL
 
FN_GetImageEncoders m_GetImageEncoders = NULL
 

Detailed Description

Definition at line 194 of file atlimagedx.h.

Member Function Documentation

◆ AddRef()

LONG CImageDx::SHARED::AddRef ( )
inline

Definition at line 241 of file atlimagedx.h.

242 {
243 return ++m_cRefs;
244 }

Referenced by CImageDx::CImageDx(), CImageDx::IsExtensionSupported(), CImageDx::LoadDx(), and CImageDx::SaveDx().

◆ Free()

void CImageDx::SHARED::Free ( )
inline

Definition at line 235 of file atlimagedx.h.

236 {
238 ZeroMemory(this, sizeof(*this));
239 }
#define FreeLibrary(x)
Definition: compat.h:748
HINSTANCE m_hGdiPlus
Definition: atlimagedx.h:196
#define ZeroMemory
Definition: winbase.h:1712

Referenced by Release().

◆ Init()

HINSTANCE CImageDx::SHARED::Init ( )
inline

Definition at line 211 of file atlimagedx.h.

212 {
213 if (m_hGdiPlus)
214 return m_hGdiPlus;
215
216 m_hGdiPlus = ::LoadLibraryW(L"gdiplus.dll");
217 if (!m_hGdiPlus)
218 return NULL;
219
221 m_Shutdown = (FN_Shutdown)GetProcAddress(m_hGdiPlus, "GdiplusShutdown");
222 if (!Startup || !m_Shutdown)
223 {
226 return NULL;
227 }
228
229 Gdiplus::GdiplusStartupInput gdiplusStartupInput;
230 Startup(&m_dwToken, &gdiplusStartupInput, NULL);
231
232 return m_hGdiPlus;
233 }
decltype(&Gdiplus::GdiplusStartup) FN_Startup
Definition: atlimagedx.h:181
decltype(&Gdiplus::GdiplusShutdown) FN_Shutdown
Definition: atlimagedx.h:182
static BYTE Startup[]
Definition: dem.c:1121
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:753
#define LoadLibraryW(x)
Definition: compat.h:747
#define L(x)
Definition: ntvdm.h:50
FN_Shutdown m_Shutdown
Definition: atlimagedx.h:199
ULONG_PTR m_dwToken
Definition: atlimagedx.h:198

Referenced by CImageDx::get_fn().

◆ Release()

LONG CImageDx::SHARED::Release ( )
inline

Definition at line 246 of file atlimagedx.h.

247 {
248 if (--m_cRefs == 0)
249 {
250 Free();
251 return 0;
252 }
253 return m_cRefs;
254 }

Referenced by CImageDx::IsExtensionSupported(), CImageDx::LoadDx(), CImageDx::SaveDx(), and CImageDx::~CImageDx().

Member Data Documentation

◆ m_BitmapSetResolution

FN_BitmapSetResolution CImageDx::SHARED::m_BitmapSetResolution = NULL

Definition at line 202 of file atlimagedx.h.

Referenced by CImageDx::SetResolution().

◆ m_CreateBitmapFromFile

FN_CreateBitmapFromFile CImageDx::SHARED::m_CreateBitmapFromFile = NULL

Definition at line 204 of file atlimagedx.h.

◆ m_CreateBitmapFromHBITMAP

FN_CreateBitmapFromHBITMAP CImageDx::SHARED::m_CreateBitmapFromHBITMAP = NULL

Definition at line 203 of file atlimagedx.h.

Referenced by CImageDx::SaveDx().

◆ m_CreateHBITMAPFromBitmap

FN_CreateHBITMAPFromBitmap CImageDx::SHARED::m_CreateHBITMAPFromBitmap = NULL

Definition at line 205 of file atlimagedx.h.

Referenced by CImageDx::LoadDx().

◆ m_cRefs

LONG CImageDx::SHARED::m_cRefs = 0

Definition at line 197 of file atlimagedx.h.

Referenced by AddRef(), and Release().

◆ m_DisposeImage

FN_DisposeImage CImageDx::SHARED::m_DisposeImage = NULL

Definition at line 207 of file atlimagedx.h.

Referenced by CImageDx::LoadDx(), and CImageDx::SaveDx().

◆ m_dwToken

ULONG_PTR CImageDx::SHARED::m_dwToken = 0

Definition at line 198 of file atlimagedx.h.

Referenced by Init().

◆ m_GetImageEncoders

FN_GetImageEncoders CImageDx::SHARED::m_GetImageEncoders = NULL

Definition at line 209 of file atlimagedx.h.

Referenced by CImageDx::GetAllEncoders().

◆ m_GetImageEncodersSize

FN_GetImageEncodersSize CImageDx::SHARED::m_GetImageEncodersSize = NULL

Definition at line 208 of file atlimagedx.h.

Referenced by CImageDx::GetAllEncoders().

◆ m_GetImageHorizontalResolution

FN_GetImageHorizontalResolution CImageDx::SHARED::m_GetImageHorizontalResolution = NULL

Definition at line 200 of file atlimagedx.h.

Referenced by CImageDx::GetResolution().

◆ m_GetImageVerticalResolution

FN_GetImageVerticalResolution CImageDx::SHARED::m_GetImageVerticalResolution = NULL

Definition at line 201 of file atlimagedx.h.

Referenced by CImageDx::GetResolution().

◆ m_hGdiPlus

HINSTANCE CImageDx::SHARED::m_hGdiPlus = NULL

Definition at line 196 of file atlimagedx.h.

Referenced by Free(), and Init().

◆ m_SaveImageToFile

FN_SaveImageToFile CImageDx::SHARED::m_SaveImageToFile = NULL

Definition at line 206 of file atlimagedx.h.

Referenced by CImageDx::SaveDx().

◆ m_Shutdown

FN_Shutdown CImageDx::SHARED::m_Shutdown = NULL

Definition at line 199 of file atlimagedx.h.

Referenced by Init().


The documentation for this struct was generated from the following file: