Language Agnostic Macros
[COMSTL]


Detailed Description

These macros are used enable writing COM client code that works regardless of whether it is compiled in C or C++.


Defines

#define COMSTL_ITF_CALL(p)   (p)
 Resolves to p->lpVtbl for C compilation, and to p in C++.
#define COMSTL_ITF_THIS(p)
 Resolves to p, for C compilation, and to nothing in C++.
#define COMSTL_ITF_THIS0(p)
 Resolves to p for C compilation, and to nothing in C++.
#define COMSTL_IID_2_REF(iid)   (iid)
 Resolves to &iid for C compilation, and to iid in C++.
#define COMSTL_REF_2_PTR(iid)   (&(iid))
 Resolves to iid for C compilation, and to &iid in C++.
#define COMSTL_PTR_2_REF(piid)   (*(piid))
 Resolves to piid for C compilation, and to *piid in C++.
#define COMSTL_ACCESS_VARIANT_MEM_BYPTR(pvar, mem)   (pvar)->mem
#define COMSTL_ACCESS_VARIANT_MEM_BYREF(var, mem)   COMSTL_ACCESS_VARIANT_MEM_BYPTR(&(var), mem)
 Used to provide access to the mem member of a VARIANT structure in a language-independent manner.
#define COMSTL_ACCESS_VARIANT_vt_BYPTR(pvar)   (pvar)->vt
#define COMSTL_ACCESS_VARIANT_vt_BYREF(var)   COMSTL_ACCESS_VARIANT_vt_BYPTR(&(var))
 Used to provide access to the vt member of a VARIANT structure in a language-independent manner.
#define COMSTL_ACCESS_VARIANT_decVal_BYPTR(pvar)   (pvar)->decVal
#define COMSTL_ACCESS_VARIANT_decVal_BYREF(var)   COMSTL_ACCESS_VARIANT_decVal_BYPTR(&(var))
#define WINSTL_ITF_CALL(p)   (p)
 Resolves to p->lpVtbl for C compilation, and to p in C++.
#define WINSTL_ITF_THIS(p)
 Resolves to p, for C compilation, and to nothing in C++.
#define WINSTL_ITF_THIS0(p)
 Resolves to p for C compilation, and to nothing in C++.
#define WINSTL_IID_2_REF(iid)   (iid)
 Resolves to &iid for C compilation, and to iid in C++.
#define WINSTL_REF_2_PTR(iid)   (&(iid))
 Resolves to iid for C compilation, and to &iid in C++.


Define Documentation

#define COMSTL_ACCESS_VARIANT_MEM_BYREF ( var,
mem   )     COMSTL_ACCESS_VARIANT_MEM_BYPTR(&(var), mem)

Used to provide access to the mem member of a VARIANT structure in a language-independent manner.

Usage:

  VARIANT v;

  COMSTL_ACCESS_VARIANT_MEM_BYREF(v, lVal) = 10;

Referenced by comstl__DECIMAL_compare().

#define COMSTL_ACCESS_VARIANT_vt_BYREF ( var   )     COMSTL_ACCESS_VARIANT_vt_BYPTR(&(var))

Used to provide access to the vt member of a VARIANT structure in a language-independent manner.

Usage:

  VARIANT v;

  COMSTL_ACCESS_VARIANT_vt_BYREF(v) = VT_I4;

Referenced by comstl__DECIMAL_compare().

#define COMSTL_IID_2_REF ( iid   )     (iid)

Resolves to &iid for C compilation, and to iid in C++.

See also:
COMSTL_ITF_CALL, COMSTL_ITF_THIS, COMSTL_ITF_THIS0, COMSTL_REF_2_PTR

Referenced by comstl__get_object_identity(), and comstl__is_same_object().

#define COMSTL_ITF_CALL (  )     (p)

#define COMSTL_ITF_THIS (  ) 

#define COMSTL_ITF_THIS0 (  ) 

#define COMSTL_PTR_2_REF ( piid   )     (*(piid))

Resolves to piid for C compilation, and to *piid in C++.

See also:
COMSTL_ITF_CALL, COMSTL_ITF_THIS, COMSTL_ITF_THIS0, COMSTL_REF_2_PTR

#define COMSTL_REF_2_PTR ( iid   )     (&(iid))

Resolves to iid for C compilation, and to &iid in C++.

See also:
COMSTL_ITF_CALL, COMSTL_ITF_THIS, COMSTL_ITF_THIS0, COMSTL_PTR_2_REF

Referenced by comstl__set_error_info_a(), and comstl__set_error_info_w().

#define WINSTL_IID_2_REF ( iid   )     (iid)

Resolves to &iid for C compilation, and to iid in C++.

See also:
WINSTL_ITF_CALL, WINSTL_ITF_THIS, WINSTL_ITF_THIS0, WINSTL_REF_2_PTR

#define WINSTL_ITF_CALL (  )     (p)

#define WINSTL_ITF_THIS (  ) 

#define WINSTL_ITF_THIS0 (  ) 

#define WINSTL_REF_2_PTR ( iid   )     (&(iid))

Resolves to iid for C compilation, and to &iid in C++.

See also:
WINSTL_ITF_CALL, WINSTL_ITF_THIS, WINSTL_ITF_THIS0, WINSTL_REF_2_REF


Generated on Thu Jun 10 08:58:21 2010 for STLSoft by  doxygen 1.5.6