windows.cfg: Add Load/FreeLibrary() functions

This commit is contained in:
versat 2018-01-05 11:22:36 +01:00 committed by Daniel Marjamäki
parent ba0ea2e8b1
commit a1cc44eb21
1 changed files with 110 additions and 0 deletions

View File

@ -1022,6 +1022,20 @@
<alloc init="true">_tpopen</alloc>
<dealloc>_pclose</dealloc>
</resource>
<resource>
<alloc init="true">LoadLibrary</alloc>
<alloc init="true">LoadLibraryA</alloc>
<alloc init="true">LoadLibraryW</alloc>
<alloc init="true">LoadLibraryEx</alloc>
<alloc init="true">LoadLibraryExA</alloc>
<alloc init="true">LoadLibraryExW</alloc>
<!--For GetModuleHandle() FreeLibrary*() should never be called.-->
<!--For GetModuleHandleEx() FreeLibrary*() can not always be called
(depends on the flags). So to prevent false positives it is not added
to the allocation functions here.-->
<dealloc>FreeLibrary</dealloc>
<dealloc>FreeLibraryAndExitThread</dealloc>
</resource>
<memory>
<alloc>ExAllocatePool</alloc>
<alloc>ExAllocatePoolWithQuota</alloc>
@ -3628,6 +3642,101 @@ HFONT CreateFont(
<not-uninit/>
</arg>
</function>
<!--HMODULE WINAPI LoadLibrary(
_In_ LPCTSTR lpFileName);-->
<function name="LoadLibrary,LoadLibraryA,LoadLibraryW">
<noreturn>false</noreturn>
<returnValue type="HMODULE"/>
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!--HMODULE WINAPI LoadLibraryEx(
_In_ LPCTSTR lpFileName,
_Reserved_ HANDLE hFile,
_In_ DWORD dwFlags);-->
<function name="LoadLibraryEx,LoadLibraryExA,LoadLibraryExW">
<noreturn>false</noreturn>
<returnValue type="HMODULE"/>
<arg nr="1">
<not-uninit/>
<strz/>
</arg>
<arg nr="2">
<valid>0</valid>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
</function>
<!--HMODULE WINAPI GetModuleHandle(
_In_opt_ LPCTSTR lpModuleName);-->
<function name="GetModuleHandle,GetModuleHandleA,GetModuleHandleW">
<noreturn>false</noreturn>
<returnValue type="HMODULE"/>
<arg nr="1">
<not-uninit/>
<strz/>
</arg>
</function>
<!--BOOL WINAPI GetModuleHandleEx(
_In_ DWORD dwFlags,
_In_opt_ LPCTSTR lpModuleName,
_Out_ HMODULE *phModule);-->
<function name="GetModuleHandleEx,GetModuleHandleExA,GetModuleHandleExW">
<noreturn>false</noreturn>
<returnValue type="BOOL"/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
</arg>
</function>
<!--BOOL WINAPI FreeLibrary(
_In_ HMODULE hModule);-->
<function name="FreeLibrary">
<noreturn>false</noreturn>
<returnValue type="BOOL"/>
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!--VOID WINAPI FreeLibraryAndExitThread(
_In_ HMODULE hModule,
_In_ DWORD dwExitCode);-->
<function name="FreeLibraryAndExitThread">
<noreturn>true</noreturn>
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!--FARPROC WINAPI GetProcAddress(
_In_ HMODULE hModule,
_In_ LPCSTR lpProcName);-->
<function name="GetProcAddress">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
<not-bool/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<podtype name="LARGE_INTEGER" sign="s" size="8"/>
<podtype name="POINTER_SIGNED" sign="s"/>
<podtype name="POINTER_UNSIGNED" sign="u"/>
@ -3642,4 +3751,5 @@ HFONT CreateFont(
<define name="INVALID_SOCKET" value="0"/>
<define name="WINAPI" value=""/>
<define name="__pragma(x)" value=""/>
<define name="TEXT(str)" value="str"/>
</def>