windows.cfg: Improved configuration of OpenThread() (#5653)
This commit is contained in:
parent
a6b7a8c1cc
commit
b201ef26cb
|
@ -4803,7 +4803,10 @@ HFONT CreateFont(
|
||||||
<!-- HANDLE OpenProcess([in] DWORD dwDesiredAccess,
|
<!-- HANDLE OpenProcess([in] DWORD dwDesiredAccess,
|
||||||
[in] BOOL bInheritHandle,
|
[in] BOOL bInheritHandle,
|
||||||
[in] DWORD dwProcessId); -->
|
[in] DWORD dwProcessId); -->
|
||||||
<function name="OpenProcess">
|
<!-- HANDLE OpenThread ([in] DWORD dwDesiredAccess,
|
||||||
|
[in] BOOL bInheritHandle,
|
||||||
|
[in] DWORD dwThreadId); -->
|
||||||
|
<function name="OpenProcess,OpenThread">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<returnValue type="HANDLE"/>
|
<returnValue type="HANDLE"/>
|
||||||
|
|
|
@ -19,6 +19,13 @@
|
||||||
#include <atlstr.h>
|
#include <atlstr.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
void resourceLeak_OpenThread(const DWORD dwDesiredAccess, const BOOL bInheritHandle, const DWORD dwThreadId)
|
||||||
|
{
|
||||||
|
HANDLE proc = OpenThread(dwDesiredAccess, bInheritHandle, dwThreadId);
|
||||||
|
if (proc != INVALID_HANDLE_VALUE) {}
|
||||||
|
// cppcheck-suppress resourceLeak
|
||||||
|
}
|
||||||
|
|
||||||
void resourceLeak_OpenProcess(const DWORD dwDesiredAccess, const BOOL bInheritHandle, const DWORD dwProcessId)
|
void resourceLeak_OpenProcess(const DWORD dwDesiredAccess, const BOOL bInheritHandle, const DWORD dwProcessId)
|
||||||
{
|
{
|
||||||
HANDLE proc = OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
|
HANDLE proc = OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
|
||||||
|
|
Loading…
Reference in New Issue