RETAILMSG
Windows Mobile SupportedWindows Embedded CE Supported
8/28/2008

This macro conditionally outputs a printf-style formatted message.

Syntax


RETAILMSG (
    Expression,
    Message
) 
Parameters

Expression

Boolean expression used to determine if the message would be output.

Message

Expression to be printed using printf format style.

Return Value

None.

Remarks

The printf-style message parameter is output if the Boolean input expression evaluates to TRUE. Note that the parameter Message must be enclosed by parentheses to prevent syntax errors being generated by the preprocessor. This macro should be used sparingly, as it increases the size of retail builds.

Example

 RETAILMSG(TRUE, (TEXT("Testing item count against maximum %u\r\n"),
         dwMaxNumberOfItems));
 RETAILMSG(dwCurrentNumberOfItems >= dwMaxNumberOfItems,
          (TEXT("Invalid item count! Found %u, expected less than %u\r\n"),
           dwCurrentNumberOfItems, dwMaxNumberOfItems));

Output:

 Testing item count against maximum 68
 Invalid item count! Found 343, expected less than 68
Requirements

Headerdbgapi.h
Windows Embedded CEWindows CE 2.10 and later
Windows MobileWindows Mobile Version 5.0 and later
See Also

Reference

DEBUGMSG
ERRORMSG

Tags :


Page view tracker