I don’t really understand this ‘incompatible types’ error (Delphi XE2)
function TWaveBase.GetHandle: THandle;
begin
if HandleNeeded then begin
if HandleAllocated then
CloseHandle;
CreateHandle(False);
end;
FHandleNeeded:=False;
Result:=FHandle;
end;
[…]
property Handle:Cardinal read GetHandle; -> error here
THandleis a type declared based onCardinalin Delphi XE. (Because of 64-bit and cross-platform, it’s defined asNativeUIntin XE2). It’s a new type.If your
GetHandlegetter is returning aTHandle, your property should also be declared as aTHandle. Change it and things should work fine.