Miscellaneous Macros

Some miscellaneous macros are provided, mainly for debug string processing. In particular, the NAME macro is used with many class constructors that support debug names. The REMIND macro is less useful; it just builds a reminder string (including the source file name and line number), which can be displayed at compile time.
NAME Generates a debug-only name.
REMIND Generates a compile-time string.

NAME

Generates a debug-only string.

Syntax

NAME(
  strLiteral
  );

Parameters

strLiteral
Text string, which must be in quotation marks.

Remarks

This macro is helpful for generating the debug name passed to many Microsoft® DirectShow® class constructors. (For more information about using that aspect of debugging, see Object Register Debugging.) For example:

x = new CVideoRenderer(NAME("Sample Video Renderer"),pUnk,phr);

The NAME macro generates NULL unless DEBUG is defined when the DirectShow headers are included.

REMIND

Generates a compile-time string.

Syntax

REMIND(
  strLiteral
  );

Parameters

strLiteral
Text string, which must be in quotation marks.

Remarks

This generated string includes the parameter string, the source file name, and the line number.

For example, to generate a compile-time warning, use the following syntax.

#pragma message (REMIND("Add automation support"))

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.