Root > Advanced topics > Resource leaks detection limitations > List of functions

List of functions

Previous pageReturn to chapter overviewNext page   

This is a list of functions which are monitored by resource leaks feature. This list is expected to be expanded as we would test more functions.

 

Currently monitored functions are:

 

HeapCreate/HeapDestroy
HeapAlloc/HeapReAlloc/HeapFree
VirtualAlloc/VirtualAllocEx/VirtualAllocExNuma/VirtualFree/VirtualFreeEx
GlobalAlloc/GlobalReAlloc/GlobalFree
LocalAlloc/LocalReAlloc/LocalFree
SysAllocString/SysAllocStringByteLen/SysAllocStringLen/SysReAllocString/SysReAllocStringLen/SysFreeString/VariantClear

 

 


 

You can also add functions manually by using HookWin32API function from EResLeaks unit.

 

For example:

 

uses

  EResLeaks;

 

initialization

  HookWin32API('Kernel32.dll''HeapCreate',  'Heaps''Heaps', 3, True,  ctEqual, 0, -1);

  HookWin32API('Kernel32.dll''HeapDestroy''Heaps''Heaps', 1, False, ctEqual, 0, 0);

 

  HookWin32API('Gdi32.dll',  'CreateCompatibleDC''Device Contexts''Device Contexts', 1, True,  ctEqual, 0, -1);

  HookWin32API('Gdi32.dll',  'CreateDC',           'Device Contexts''Device Contexts', 4, True,  ctEqual, 0, -1);

  HookWin32API('Gdi32.dll',  'CreateIC',           'Device Contexts''Device Contexts', 4, True,  ctEqual, 0, -1);

  HookWin32API('Gdi32.dll',  'DeleteDC',           'Device Contexts''Device Contexts', 1, False, ctEqual, 0, 0);

 

  HookWin32API('AdvAPI32.dll''CreateRestrictedToken''Handles''Tokens', 9, True, ctEqual, 0, 8);

  HookWin32API('AdvAPI32.dll''OpenProcessToken',      'Handles''Tokens', 3, True, ctEqual, 0, 2);

  HookWin32API('AdvAPI32.dll''OpenThreadToken',       'Handles''Tokens', 4, True, ctEqual, 0, 3);

  HookWin32API('AdvAPI32.dll''DuplicateToken',        'Handles''Tokens', 3, True, ctEqual, 0, 2);

  HookWin32API('AdvAPI32.dll''DuplicateTokenEx',      'Handles''Tokens', 6, True, ctEqual, 0, 5);

 

  HookWin32API('Kernel32.dll''CloseHandle''Handles''Handles', 1, False, ctEqual, 0, 0);

end.

 

See the EOSApiList.pas source code for reference.

 

 

See also:




Send feedback... Build date: 2024-12-19
Last edited: 2023-03-07
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/resleaks_funcs.php