Salut à tous !
Milles excuses à ceux auxquels j'ai oublié de répondre auparavant.
J'ai trouvé ce que je cherchais.
Petit exemple :
with System;
with ada.text_io; use ada.text_io;
procedure z
is
type tableau is array (0..800,0..600) of integer;
t:tableau;
pragma Linker_Options ("-luser32 -lgdi32" );
subtype HDC is System.Address;
subtype HWND is System.Address;
my_hdc:HDC;
my_hwnd:HWND;
c:integer;
bool:boolean;
function GetDC (my_hwnd0 : HWND) return HDC;
pragma Import (Stdcall, GetDC,"GetDC" );
function GetPixel (my_hdc0:HDC;x:integer;y:integer) return integer;
pragma Import (Stdcall, GetPixel,"GetPixel" );
function setPixelv (my_hdc0:HDC;x:integer;y:integer;c:integer) return boolean;
pragma Import (Stdcall, SetPixelV,"SetPixelV" );
begin
my_hdc:=getdc (System.Null_Address);
for i in 0..800
loop
for j in 0..600
loop
c:=getpixel (my_hdc,i,j);
t(i,j):=c;
end loop;
end loop;
for i in 0..800
loop
for j in 0..600
loop
bool:=setpixelv (my_hdc,i,j,t(i,j)+200);
end loop;
end loop;
end z;
A+