Direct3D Retained Mode Animated Header --IDirect3DRMObject Direct3D Retained Mode Animated Header --IDirect3DRMObject * Microsoft Direct3D Retained Mode SDK
*Index  *Topic Contents
*Previous Topic: IDirect3DRMMeshBuilder2
*Next Topic: IDirect3DRMProgressiveMesh

IDirect3DRMObject


Applications use the methods of the IDirect3DRMObject interface to work with the object superclass of Microsoft® Direct3D® Retained Mode objects. This section is a reference to the methods of this interface. For a conceptual overview, see Direct3DRMObject.

The methods of the IDirect3DRMObject interface can be organized into the following groups:
Application-specific GetAppData
data SetAppData
Cloning Clone
Naming GetClassName
GetName
SetName
Notifications AddDestroyCallback
DeleteDestroyCallback

The IDirect3DRMObject interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
AddRef
QueryInterface
Release

The Direct3DRMObject object is obtained through the appropriate call to the QueryInterface method from any Retained Mode object. All Retained Mode objects inherit the IDirect3DRMObject interface methods.


IDirect3DRMObject::AddDestroyCallback

IDirect3DRMObject

Registers a function that will be called when an object is destroyed.

HRESULT AddDestroyCallback(
  D3DRMOBJECTCALLBACK lpCallback,
  LPVOID lpArg
  );

Parameters
lpCallback
User-defined callback function that will be used when the object is destroyed.
lpArg
Address of application-defined data passed to the callback function. Because this function is used after the object has been destroyed, you should not use this function with the object as an argument.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMObject::Clone

IDirect3DRMObject

Creates a copy of an object.

HRESULT Clone(
  LPUNKNOWN pUnkOuter,
  REFIID riid,
  LPVOID *ppvObj
  );

Parameters
pUnkOuter
Pointer to the outer IUnknown interface that allows COM aggregation features.
riid
Identifier of the object being copied.
ppvObj
Address that will contain the copy of the object when the method returns.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMObject::DeleteDestroyCallback

IDirect3DRMObject

Removes a function previously registered with the IDirect3DRMObject::AddDestroyCallback method.

HRESULT DeleteDestroyCallback(
  D3DRMOBJECTCALLBACK d3drmObjProc,
  LPVOID lpArg
  );

Parameters
d3drmObjProc
User-defined D3DRMOBJECTCALLBACK callback function that will be used when the object is destroyed.
lpArg
Address of application-defined data passed to the callback function.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMObject::GetAppData

IDirect3DRMObject

Retrieves the 32 bits of application-specific data in the object. The default value of the data is 0.

DWORD GetAppData( );

Return Values

Returns the data value defined by the application.

See Also

IDirect3DRMObject::SetAppData


IDirect3DRMObject::GetClassName

IDirect3DRMObject

Retrieves the name of the object's class.

HRESULT GetClassName(
  LPDWORD lpdwSize,
  LPSTR lpName
  );

Parameters
lpdwSize
Address of a variable containing the size, in bytes, of the buffer pointed to by the lpName parameter.
lpName
Address of a variable that will contain a null-terminated string identifying the class name when the method returns. If this parameter is NULL, the lpdwSize parameter will contain the required size for the string when the method returns.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.


IDirect3DRMObject::GetName

IDirect3DRMObject

Retrieves the object's name.

HRESULT GetName(
  LPDWORD lpdwSize,
  LPSTR lpName
  );

Parameters
lpdwSize
Address of a variable containing the size, in bytes, of the buffer pointed to by the lpName parameter.
lpName
Address of a variable that will contain a null-terminated string identifying the object's name when the method returns. If this parameter is NULL, the lpdwSize parameter will contain the required size for the string when the method returns.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMObject::SetName


IDirect3DRMObject::SetAppData

IDirect3DRMObject

Sets the 32 bits of application-specific data in the object.

HRESULT SetAppData(
  DWORD ulData
  );

Parameters
ulData
User-defined data to be stored with the object.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMObject::GetAppData


IDirect3DRMObject::SetName

IDirect3DRMObject

Sets the object's name.

HRESULT SetName(
  const char * lpName
  );

Parameters
lpName
User-defined data to name the object.
Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.

See Also

IDirect3DRMObject::GetName

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page