CDisp Class

CDisp class hierarchy

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

CDisp Constructs a CDisp object.

Operators

LPCTSTR Casts to an LPCTSTR type for use in a debug string.

CDisp::CDisp

CDisp Class

Constructs a CDisp object.

Syntax

CDisp(
    LONGLONG ll,
    int Format = CDISP_HEX
    );
CDisp(
    REFCLSID clsid
    );
CDisp(
    double d
    );
CDisp(
    CRefTime t
    );
CDisp(
    IPin *pPin
    );

Parameters

ll
LONGLONG value for display.
Format
Value indicating whether the value should be displayed in decimal (CDISP_DEC) or (by default) hexadecimal (CDISP_HEX).
clsid
Class identifier to display.
d
The double value to display.
t
Reference time to display. Passing a value of type REFERENCE_TIME will use the LONGLONG constructor.
pPin
Pointer to the IPin interface to display a pin as "CLSID of the filter(Pin name)"; for example, CLSID_AudioRenderer(Audio input pin).

Return Value

No return value.

Remarks

Various constructors are provided, which enables information to be displayed in the most suitable way.

CDisp::LPCTSTR

CDisp Class

Casts the CDisp object to an LPCTSTR value for use in a debug string.

Syntax

operator LPCTSTR();

Return Value

Returns the string representation of the variable used in the constructor.


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