From 857b4997bf8f55bc6965f32e35d01936f220d33c Mon Sep 17 00:00:00 2001 From: Silent Date: Thu, 20 Feb 2025 15:18:59 +0100 Subject: [PATCH] Unify the Private Data docs between D3D9-D3D12 Uses D3D12 wording as a template as it was the most exhaustive. --- .../content/d3d10/nf-d3d10-id3d10device-getprivatedata.md | 4 +--- .../nf-d3d10-id3d10device-setprivatedatainterface.md | 6 +----- .../d3d10/nf-d3d10-id3d10devicechild-getprivatedata.md | 2 +- .../nf-d3d10-id3d10devicechild-setprivatedatainterface.md | 6 +----- .../content/d3d11/nf-d3d11-id3d11device-getprivatedata.md | 2 +- .../nf-d3d11-id3d11device-setprivatedatainterface.md | 2 +- .../d3d11/nf-d3d11-id3d11devicechild-getprivatedata.md | 2 +- .../nf-d3d11-id3d11devicechild-setprivatedatainterface.md | 6 +----- .../content/d3d12/nf-d3d12-id3d12object-getprivatedata.md | 2 +- .../nf-d3d12-id3d12object-setprivatedatainterface.md | 2 +- .../d3d9/nf-d3d9-idirect3dvolume9-getprivatedata.md | 4 ++++ .../nf-d3d9helper-idirect3dresource9-getprivatedata.md | 2 ++ .../nf-d3d9helper-idirect3dvolume9-getprivatedata.md | 4 ++++ .../ddraw/nf-ddraw-idirectdrawsurface7-getprivatedata.md | 2 ++ .../dxgi/nf-dxgi-idxgiobject-setprivatedatainterface.md | 8 +------- 15 files changed, 23 insertions(+), 31 deletions(-) diff --git a/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-getprivatedata.md b/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-getprivatedata.md index 31ee9a2798a4..e26ad5e5db1a 100644 --- a/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-getprivatedata.md +++ b/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-getprivatedata.md @@ -81,9 +81,7 @@ This method returns one of the following ID3D10Device::SetPrivateData. - -The data retrieved and the guid will typically be application-defined. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateDataInterface**, that interface will have its reference count incremented before the private data is returned. ## -see-also diff --git a/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-setprivatedatainterface.md b/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-setprivatedatainterface.md index f25813f73e72..35f01a860a1c 100644 --- a/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-setprivatedatainterface.md +++ b/sdk-api-src/content/d3d10/nf-d3d10-id3d10device-setprivatedatainterface.md @@ -65,7 +65,7 @@ Guid associated with the interface. Type: const IUnknown* -Pointer to an IUnknown-derived interface to be associated with the device. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object. Its reference count is incremented when set, and decremented when either the [ID3D10Device](/windows/win32/api/d3d10/nn-d3d10-id3d10device) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d10/nf-d3d10-id3d10device-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns @@ -73,10 +73,6 @@ Type: HRESULTDirect3D 10 Return Codes. -## -remarks - -When this method is called ::addref() will be called on the IUnknown-derived interface, and when the device is destroyed ::release() will be called on the IUnknown-derived interface. - ## -see-also ID3D10Device Interface \ No newline at end of file diff --git a/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-getprivatedata.md b/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-getprivatedata.md index 1d354970919f..1a342cba9e8a 100644 --- a/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-getprivatedata.md +++ b/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-getprivatedata.md @@ -81,7 +81,7 @@ This method returns one of the following ID3D10DeviceChild::SetPrivateData. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateDataInterface**, that interface will have its reference count incremented before the private data is returned. ## -see-also diff --git a/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-setprivatedatainterface.md b/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-setprivatedatainterface.md index 4af118bb00c3..c8f75ce40bfb 100644 --- a/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-setprivatedatainterface.md +++ b/sdk-api-src/content/d3d10/nf-d3d10-id3d10devicechild-setprivatedatainterface.md @@ -65,7 +65,7 @@ Guid associated with the interface. Type: const IUnknown* -Pointer to an IUnknown-derived interface to be associated with the device child. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device child. Its reference count is incremented when set, and decremented when either the [ID3D10DeviceChild](/windows/win32/api/d3d10/nn-d3d10-id3d10devicechild) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d10/nf-d3d10-id3d10devicechild-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns @@ -73,10 +73,6 @@ Type: HRESULTDirect3D 10 Return Codes. -## -remarks - -When this method is called ::addref() will be called on the IUnknown-derived interface, and when the device child is destroyed ::release() will be called on the IUnknown-derived interface. - ## -see-also ID3D10DeviceChild Interface diff --git a/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-getprivatedata.md b/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-getprivatedata.md index 3964da9e7034..bfb9b9dbb52f 100644 --- a/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-getprivatedata.md +++ b/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-getprivatedata.md @@ -81,7 +81,7 @@ This method returns one of the codes described in the topic IUnknown, or one of its derivative classes, which was previously set by SetPrivateDataInterface, that interface will have its reference count incremented before the private data is returned. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateDataInterface**, that interface will have its reference count incremented before the private data is returned. ## -see-also diff --git a/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-setprivatedatainterface.md b/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-setprivatedatainterface.md index 28021ff339a6..f2ced9f34aa3 100644 --- a/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-setprivatedatainterface.md +++ b/sdk-api-src/content/d3d11/nf-d3d11-id3d11device-setprivatedatainterface.md @@ -65,7 +65,7 @@ Guid associated with the interface. Type: const IUnknown* -Pointer to an IUnknown-derived interface to be associated with the device child. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object. Its reference count is incremented when set, and decremented when either the [ID3D11Device](/windows/win32/api/d3d11/nn-d3d11-id3d11device) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d11/nf-d3d11-id3d11device-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns diff --git a/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-getprivatedata.md b/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-getprivatedata.md index e3244b940dda..09b4ad853db1 100644 --- a/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-getprivatedata.md +++ b/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-getprivatedata.md @@ -86,7 +86,7 @@ This method returns one of the The data stored in the device child is set by calling ID3D11DeviceChild::SetPrivateData. -If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by SetPrivateDataInterface, that interface will have its reference count incremented before the private data is returned. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateDataInterface**, that interface will have its reference count incremented before the private data is returned. Windows Phone 8: This API is supported. diff --git a/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-setprivatedatainterface.md b/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-setprivatedatainterface.md index 924da93bbc8e..7e4411bf983e 100644 --- a/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-setprivatedatainterface.md +++ b/sdk-api-src/content/d3d11/nf-d3d11-id3d11devicechild-setprivatedatainterface.md @@ -65,7 +65,7 @@ Guid associated with the interface. Type: const IUnknown* -Pointer to an IUnknown-derived interface to be associated with the device child. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device child. Its reference count is incremented when set, and decremented when either the [ID3D11DeviceChild](/windows/win32/api/d3d11/nn-d3d11-id3d11devicechild) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d11/nf-d3d11-id3d11devicechild-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns @@ -73,10 +73,6 @@ Type: HRESULTDirect3D 11 Return Codes. -## -remarks - -When this method is called ::addref() will be called on the IUnknown-derived interface, and when the device child is destroyed ::release() will be called on the IUnknown-derived interface. - ## -see-also ID3D11DeviceChild diff --git a/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-getprivatedata.md b/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-getprivatedata.md index 416b08b08ba9..ef13783ec78a 100644 --- a/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-getprivatedata.md +++ b/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-getprivatedata.md @@ -80,7 +80,7 @@ This method returns one of the IUnknown, or one of its derivative classes, which was previously set by SetPrivateDataInterface, that interface will have its reference count incremented before the private data is returned. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateDataInterface**, that interface will have its reference count incremented before the private data is returned. ## -see-also diff --git a/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-setprivatedatainterface.md b/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-setprivatedatainterface.md index 8a10bec5b379..6300a25519d0 100644 --- a/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-setprivatedatainterface.md +++ b/sdk-api-src/content/d3d12/nf-d3d12-id3d12object-setprivatedatainterface.md @@ -61,7 +61,7 @@ The **GUID** to associate with the interface. Type: **const [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)\*** -A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object. Its reference count is incremented when set, and its reference count is decremented when either the [ID3D12Object](/windows/win32/api/d3d12/nn-d3d12-id3d12object) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d12/nf-d3d12-id3d12object-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object. Its reference count is incremented when set, and decremented when either the [ID3D12Object](/windows/win32/api/d3d12/nn-d3d12-id3d12object) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/d3d12/nf-d3d12-id3d12object-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns diff --git a/sdk-api-src/content/d3d9/nf-d3d9-idirect3dvolume9-getprivatedata.md b/sdk-api-src/content/d3d9/nf-d3d9-idirect3dvolume9-getprivatedata.md index 44f0a8fcac0d..fd647689afb7 100644 --- a/sdk-api-src/content/d3d9/nf-d3d9-idirect3dvolume9-getprivatedata.md +++ b/sdk-api-src/content/d3d9/nf-d3d9-idirect3dvolume9-getprivatedata.md @@ -80,6 +80,10 @@ Type: HRESULTIUnknown, or one of its derivative classes, which was previously set by **SetPrivateData** with a `D3DSPD_IUNKNOWN` flag, that interface will have its reference count incremented before the private data is returned. + ## -see-also IDirect3DVolume9 diff --git a/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dresource9-getprivatedata.md b/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dresource9-getprivatedata.md index d3b904c07631..f0e5a1ba953b 100644 --- a/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dresource9-getprivatedata.md +++ b/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dresource9-getprivatedata.md @@ -97,6 +97,8 @@ This method is inherited by the following interfaces: IDirect3DVertexBuffer9. +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateData** with a `D3DSPD_IUNKNOWN` flag, that interface will have its reference count incremented before the private data is returned. + ## -see-also IDirect3DResource9 diff --git a/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dvolume9-getprivatedata.md b/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dvolume9-getprivatedata.md index 591bfde055e5..c3b4ccdfa597 100644 --- a/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dvolume9-getprivatedata.md +++ b/sdk-api-src/content/d3d9helper/nf-d3d9helper-idirect3dvolume9-getprivatedata.md @@ -80,6 +80,10 @@ Type: HRESULTIUnknown, or one of its derivative classes, which was previously set by **SetPrivateData** with a `D3DSPD_IUNKNOWN` flag, that interface will have its reference count incremented before the private data is returned. + ## -see-also IDirect3DVolume9 diff --git a/sdk-api-src/content/ddraw/nf-ddraw-idirectdrawsurface7-getprivatedata.md b/sdk-api-src/content/ddraw/nf-ddraw-idirectdrawsurface7-getprivatedata.md index 17865f58f5df..351c30e542d4 100644 --- a/sdk-api-src/content/ddraw/nf-ddraw-idirectdrawsurface7-getprivatedata.md +++ b/sdk-api-src/content/ddraw/nf-ddraw-idirectdrawsurface7-getprivatedata.md @@ -85,6 +85,8 @@ If it fails, the method can return one of the following error values: ## -remarks +If the data returned is a pointer to an IUnknown, or one of its derivative classes, which was previously set by **SetPrivateData** with a `DDSPD_IUNKNOWNPOINTER` flag, that interface will have its reference count incremented before the private data is returned. + ## -see-also diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgiobject-setprivatedatainterface.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgiobject-setprivatedatainterface.md index 2bbb0532e0c7..3ab86c496a32 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgiobject-setprivatedatainterface.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgiobject-setprivatedatainterface.md @@ -65,7 +65,7 @@ A GUID identifying the interface. Type: const IUnknown* -The interface to set. +A pointer to the [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object. Its reference count is incremented when set, and decremented when either the [IDXGIObject](/windows/win32/api/dxgi/nn-dxgi-idxgiobject) is destroyed, or when the data is overwritten by calling [SetPrivateData](/windows/win32/api/dxgi/nf-dxgi-idxgiobject-setprivatedata) or **SetPrivateDataInterface** with the same **GUID**. ## -returns @@ -73,12 +73,6 @@ Type: HRESULTDXGI_ERROR. -## -remarks - -This API associates an interface pointer with the object. - -When the interface is set its reference count is incremented. When the data are overwritten (by calling SPD or SPDI with the same GUID) or the object is destroyed, ::Release() is called and the interface's reference count is decremented. - ## -see-also DXGI Interfaces