?? macros.h
字號(hào):
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//
//
/*---------------------------------------------------------------------------*\
*
*
* module: macros.h
* date:
*
* purpose:
*
\*---------------------------------------------------------------------------*/
#ifndef __MACROS_H__
#define __MACROS_H__
/////////////////////////////////////////////////////////////////////////////
#ifdef UNDER_CE
#ifndef _T
#ifdef _UNICODE
#define _T(x) L ## x
#else
#define _T(x) x
#endif
#endif
#define RegOpenKey(hkey, lpsz, phk) \
RegOpenKeyEx((hkey), (lpsz), 0, 0, (phk))
#ifndef MulDiv
#define MulDiv(a,b,c) (((a)*(b))/(c))
#endif
#endif //UNDER_CE
#ifdef __cplusplus
#define ADDREF(x) if ((x) != NULL) { (x)->AddRef(); }
#define RELEASE(x) if ((x) != NULL) { (x)->Release(); (x) = NULL; }
#define METHOD_PROLOGUE(theClass, localClass) \
theClass* pThis = \
((theClass *)((BYTE *)this - offsetof(theClass, m_x##localClass))); \
#define DEFINE_INTERFACE_PART(localClass) \
friend localClass; \
localClass m_x##localClass; \
#define BEGIN_INTERFACE_PART(localClass, baseClass) \
class localClass : public baseClass \
{ \
public: \
STDMETHOD_(ULONG, AddRef)(); \
STDMETHOD_(ULONG, Release)(); \
STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR* ppvObj); \
#define END_INTERFACE_PART(localClass) \
};
#define INTERFACE_PART(localClass) (&m_x##localClass)
#define CONTROLING_UNKNOWN (pThis->m_pUnkOuter)
#else
#define ADDREF(x) if ((x) != NULL) {(x)->lpVtbl->AddRef((x)); }
#define RELEASE(x) if ((x) != NULL) {(x)->lpVtbl->Release((x)); (x) = NULL;}
#endif // __cplusplus
/////////////////////////////////////////////////////////////////////////////
#endif /* __MACROS_H__ */
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -