The CDisp class provides methods for displaying a number of data types for debugging. It provides a constructor for each type, and can be cast to the LPCTSTR type for use as a string in a debug statement.
For example, the following code fragment:
int MyFunc(REFERENCE_TIME rt, IPin *pPin) { DbgLog((LOG_TRACE, 2, TEXT("MyFunc(%s, %s)"), (LPCTSTR) CDisp(CRefTime(rt)), (LPCTSTR) CDisp(pPin))); ... }
could output the following reference time and pin information onto the debug log:
Quartz.dll(tid d7) : MyFunc(1.003 sec, CLSID_AudioRender(Audio Input pin (rendered)))
Member Functions
Name | Description |
CDisp | Constructs a CDisp object. |
Operators
Name | Description |
LPCTSTR | Casts to an LPCTSTR type for use in a debug string. |
Constructs a CDisp object.
CDisp(
LONGLONG ll,
int Format = CDISP_HEX
);
CDisp(
REFCLSID clsid
);
CDisp(
double d
);
CDisp(
CRefTime t
);
CDisp(
IPin *pPin
);
No return value.
Various constructors are provided, which allows information to be displayed in the most suitable way.
Casts the CDisp object to an LPCTSTR value for use in a debug string.
operator LPCTSTR();
Returns the string representation of the variable used in the constructor.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.