forked from foxlox/GIUDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuhandles.pas
49 lines (29 loc) · 895 Bytes
/
uhandles.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
unit uhandles;
{$mode objfpc}{$H+}
interface
uses windows,ntdll,sysutils,uadvapi32,jwawinuser,jwanative,jwantstatus;
type tobj=record
h:thandle;
s:array [0..255] of char;
end;
type tcallback=function(param:pointer=nil):dword;stdcall;
{
function GetModuleFileNameExA(hProcess : THandle; hModule : THandle;
lpFileName : pchar;
nSize : DWORD): DWORD; stdcall; external 'psapi.dll';
function GetProcessImageFileNameA(
hProcess:HANDLE;
lpImageFileName:LPSTR;
nSize:DWORD):dword; stdcall; external 'psapi.dll';
}
function QueryFullProcessImageNameA(
hProcess:HANDLE;
dwFlags:DWORD;
lpExeName:LPSTR;
lpdwSize:PDWORD):bool; stdcall; external 'kernel32.dll';
//var ptr:pointer;
implementation
var
lpid:word=0;
ltype:string='';
end.