Skip to content

Latest commit

 

History

History
78 lines (63 loc) · 2.85 KB

nf-combaseapi-codecrementmtausage.md

File metadata and controls

78 lines (63 loc) · 2.85 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:combaseapi.CoDecrementMTAUsage
CoDecrementMTAUsage function (combaseapi.h)
Releases the increment made by a previous call to the CoIncrementMTAUsage function.
CoDecrementMTAUsage
CoDecrementMTAUsage function [COM]
com.codecrementmtausage
combaseapi/CoDecrementMTAUsage
com\codecrementmtausage.htm
com
66AA2783-7F24-41BB-911B-D452DF54C003
12/05/2018
CoDecrementMTAUsage, CoDecrementMTAUsage function [COM], com.codecrementmtausage, combaseapi/CoDecrementMTAUsage
combaseapi.h
Windows
Ole32.lib
Ole32.dll
Windows
19H1
CoDecrementMTAUsage
combaseapi/CoDecrementMTAUsage
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l1-1-0.dll
ComBase.dll
API-MS-Win-Core-Com-l1-1-1.dll
CoDecrementMTAUsage

CoDecrementMTAUsage function

-description

Releases the increment made by a previous call to the CoIncrementMTAUsage function.

-parameters

-param Cookie [in]

A PVOID variable that was set by a previous call to the CoIncrementMTAUsage function.

-returns

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

Cookie must be a valid value returned by a successful previous call to the CoIncrementMTAUsage function. If the overall count of MTA usage reaches 0, including both through this API and through the CoInitializeEx and CoUninitialize functions, the system frees resources related to MTA support.

You can call CoIncrementMTAUsage from one thread and CoDecrementMTAUsage from another as long as a cookie previously returned by CoIncrementMTAUsage is passed to CoDecrementMTAUsage.

Don't call CoDecrementMTAUsage during process shutdown or inside dllmain. You can call CoDecrementMTAUsage before the call to start the shutdown process.

-see-also

CoIncrementMTAUsage