Ich habe im Interfaceteil diese Angaben (in Zeilen 1884-1886):
Code: Alles auswählen
function SetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall;
function InsertMenuItem(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall;
function GetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; var p4: TMenuItemInfo): BOOL; stdcall;
Code: Alles auswählen
function SetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall; external user32 name 'SetMenuItemInfoA';
function InsertMenuItem(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall; external user32 name 'InsertMenuItemA';
function GetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; var p4: TMenuItemInfo): BOOL; stdcall;external user32 name 'GetMenuItemInfoA';
Code: Alles auswählen
C:\KOL_\_KOL3.17\KOL_ansi.inc(2532,10) Error: function header doesn't match the previous declaration "procedure SetMenuItemInfo(LongWord;LongWord;LongBool;const TMenuitemInfo):LongBool; StdCall;"
C:\KOL_\_KOL3.17\KOL_ansi.inc(1884,10) Hint: Found declaration: procedure SetMenuItemInfo(LongWord;LongWord;LongBool;const MENUITEMINFO):LongBool; StdCall;
C:\KOL_\_KOL3.17\KOL_ansi.inc(2533,10) Error: function header doesn't match the previous declaration "procedure InsertMenuItem(LongWord;LongWord;LongBool;const TMenuitemInfo):LongBool; StdCall;"
C:\KOL_\_KOL3.17\KOL_ansi.inc(1885,10) Hint: Found declaration: procedure InsertMenuItem(LongWord;LongWord;LongBool;const MENUITEMINFO):LongBool; StdCall;
C:\KOL_\_KOL3.17\KOL_ansi.inc(2534,10) Error: function header doesn't match the previous declaration "procedure GetMenuItemInfo(LongWord;LongWord;LongBool;var TMenuitemInfo):LongBool; StdCall;"
C:\KOL_\_KOL3.17\KOL_ansi.inc(1886,10) Hint: Found declaration: procedure GetMenuItemInfo(LongWord;LongWord;LongBool;var MENUITEMINFO):LongBool; StdCall;
C:\KOL_\_KOL3.17\kol.pas(61857) Fatal: There were 8 errors compiling module, stopping
Und zwar eigenartigerweise nur bei diesen drei (von Hunderten anderen) Funktionen, die MenuItem im Namen bzw TMenuItemInfo als Parameter haben. Kann mir einer erklären, wie das zustande kommt?
Habe eine ganz frische SnapshotVersion 1.1-37904 FPC 2.71 vom 10.7.2012
Übrigens, wenn ich statt TMenuItemInfo den entsprechenden Pointer nehme (oder ein DWORD), dann geht es:
Code: Alles auswählen
function SetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: PMenuItemInfo): BOOL; stdcall;
function InsertMenuItem(p1: HMENU; p2: UINT; p3: BOOL; const p4: PMenuItemInfo): BOOL; stdcall;
function GetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; var p4: PMenuItemInfo): BOOL; stdcall;
Es muß also irgendwie an dem TMenuitem liegen, daß dieser kuriose Error passiert.