This commit is contained in:
orbitcowboy 2019-09-18 09:24:48 +02:00
commit f2b0dc2e12
2 changed files with 19 additions and 2 deletions

View File

@ -2738,15 +2738,30 @@ HFONT CreateFont(
_In_ UINT Msg,
_In_ WPARAM wParam,
_In_ LPARAM lParam); -->
<function name="SendMessage,SendMessageA,SendMessageW">
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
</arg>
</function>
<!-- BOOL WINAPI PostMessage(
_In_opt_ HWND hWnd,
_In_ UINT Msg,
_In_ WPARAM wParam,
_In_ LPARAM lParam); -->
<function name="SendMessage,SendMessageA,SendMessageW,PostMessage,PostMessageA,PostMessageW">
<function name="PostMessage,PostMessageA,PostMessageW">
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2" direction="in">

View File

@ -190,6 +190,8 @@ void validCode()
void * pAlloc1 = _aligned_malloc(100, 2);
_aligned_free(pAlloc1);
::PostMessage(nullptr, WM_QUIT, 0, 0);
// Valid Library usage, no leaks, valid arguments
HINSTANCE hInstLib = LoadLibrary(L"My.dll");
FreeLibrary(hInstLib);