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:
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:
|