GetCurrentProcessID not found in kernel32

I have this code here

program Project1; {$APPTYPE CONSOLE} function GetCurrentProcessID : Cardinal; stdcall; external 'kernel32.dll'; begin writeln (GetCurrentProcessID); readln; end. 

and this shows me that the entry point GetCurrentProcessID not found. Any idea why?

I even tried

 function GetCurrentProcessID : Cardinal; stdcall; external 'kernel32.dll'; name 'GetCurrentProcessID'; 

no luck and ...

+4
source share
1 answer

The function name in kernel32 is GetCurrentProcessId , note the lowercase 'd'.

+11
source

Source: https://habr.com/ru/post/1500291/


All Articles