Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / webtbs / tw21073.pp
Size: Mime:
{ %norun }

{$mode delphi}

program gpabugtest;

TYPE TGetCurrentProcess = function : THandle; stdcall;
     TGetProcAddress = function(const hModule : THandle; const lpProcName : PAnsiChar) : Pointer; stdcall;

function GetProcAddress(const hModule : THandle;const lpProcName : PAnsiChar) : Pointer; stdcall;
begin
  result:=nil;
end;

function GetModuleHandle(const lpModuleName : PWideChar) : THandle; stdcall;
begin
  result:=thandle(-1);
end;

var proc_GetCurrentProcess : TGetCurrentProcess;
    proc_GetProcAddress : TGetProcAddress;

begin
 {no error} proc_GetCurrentProcess:=GetProcAddress(GetModuleHandle('Kernel32'),'GetCurrentProcess');
 {error ??} proc_GetProcAddress:=   GetProcAddress(GetModuleHandle('Kernel32'),'GetProcAddress');
end.