Index Topic Contents | |||
Previous Topic: Pointer Validation Macros Next Topic: Debug Logging by Module Level |
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.
Macro Description NAME Generates a debug-only name. REMIND Generates a compile-time string.
NAMEGenerates a debug-only string.
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. (See Object Register Debugging for more information about using that aspect of debugging.) For example:
x = new CVideoRenderer(NAME("Sample Video Renderer"),pUnk,phr);The NAME macro generates NULL unless DEBUG is defined when the Microsoft DirectShow headers are included.
REMINDGenerates a compile-time string.
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"))© 1998 Microsoft Corporation. All rights reserved. Terms of Use.