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.
Registers a function that will be called when an object is destroyed.
HRESULT AddDestroyCallback(
D3DRMOBJECTCALLBACK lpCallback,
LPVOID lpArg
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Creates a copy of an object.
HRESULT Clone(
LPUNKNOWN pUnkOuter,
REFIID riid,
LPVOID *ppvObj
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Removes a function previously registered with the IDirect3DRMObject::AddDestroyCallback method.
HRESULT DeleteDestroyCallback(
D3DRMOBJECTCALLBACK d3drmObjProc,
LPVOID lpArg
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Retrieves the 32 bits of application-specific data in the object. The default value of the data is 0.
DWORD GetAppData( );
Returns the data value defined by the application.
Retrieves the name of the object's class.
HRESULT GetClassName(
LPDWORD lpdwSize,
LPSTR lpName
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Retrieves the object's name.
HRESULT GetName(
LPDWORD lpdwSize,
LPSTR lpName
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Sets the 32 bits of application-specific data in the object.
HRESULT SetAppData(
DWORD ulData
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Sets the object's name.
HRESULT SetName(
const char * lpName
);
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.