Wie kann ich in Delphi ein ALIAS auf eine
API Funktion realisieren.
Code:
DECLARE FUNCTION MyCreateDIBSection LIB "GDI32.DLL" ALIAS "CreateDIBSection" (BYVAL hdc AS DWORD, pbmi AS MYBITMAPINFO, BYVAL dwUsage AS DWORD, BYVAL ppvBits AS DWORD, BYVAL hSection AS DWORD, BYVAL dwOffset AS DWORD) AS DWORD
Ich möchte
Delphi-Quellcode:
type
PBitmapInfo = ^TBitmapInfo;
{$EXTERNALSYM tagBITMAPINFO}
tagBITMAPINFO = packed record
bmiHeader: TBitmapInfoHeader;
bmiColors: array[0..0] of TRGBQuad;
end;
TBitmapInfo = tagBITMAPINFO;
{$EXTERNALSYM BITMAPINFO}
BITMAPINFO = tagBITMAPINFO;
das Array ändern bmiColors: array[0..255] of TRGBQuad
und einen eigenen Typ als MYBITMAPINFO definieren.
gruss Emil