Share via


CBaseObject::CBaseObject

 
Microsoft DirectShow 9.0

CBaseObject::CBaseObject

Constructor method.

Syntax

  CBaseObject(
    const TCHAR *pName
);

Parameters

pName

String that contains the name of the object, for debugging purposes.

Remarks

This method increments the active-object count. (See CBaseObject::ObjectsActive.)

Allocate the pName parameter in static memory:

// Correct.
CBaseObject *pObject = new CBaseObject(NAME("My Object"));

// Incorrect.
TCHAR ObjectName[] = TEXT("My Object");
CBaseObject *pObject = new CObject(ObjectName);

The NAME macro compiles to NULL in retail builds, so that static strings appear only in debug builds. For more information, see DbgDumpObjectRegister.

Requirements

**  Header:** Declared in Combase.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also