You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
754 B
28 lines
754 B
#ifndef _MEPADRT_H
|
|
#define _MEPADRT_H
|
|
|
|
// -------------------------------------------------------------------------
|
|
// ReplaceInterface - Replaces a member interface with a new interface
|
|
// -------------------------------------------------------------------------
|
|
|
|
#define ReplaceInterface(_pUnk, _pUnkNew) \
|
|
{ \
|
|
if (_pUnk) \
|
|
_pUnk->Release(); \
|
|
if (_pUnk = _pUnkNew) \
|
|
_pUnk->AddRef(); \
|
|
}
|
|
|
|
#define ReleaseObj(_object) (_object) ? (_object)->Release() : 0
|
|
|
|
#define SafeRelease(_object) \
|
|
if (_object) { \
|
|
(_object)->Release(); \
|
|
(_object) = NULL; \
|
|
} else
|
|
|
|
#define GetWndThisPtr(hwnd) \
|
|
GetWindowLong(hwnd, GWL_USERDATA)
|
|
|
|
|
|
#endif // _MEPADRT_H
|