When compiling Embarcadero VirtualShellTools in Delphi 2007: http://embtvstools.svn.sourceforge.net/
function TShellIDList.InternalChildPIDL(Index: integer): PItemIDList;
{ Remember PIDLCount does not count index [0] where the Absolute Parent is }
begin
if Assigned(FCIDA) and (Index > -1) and (Index < PIDLCount) then
Result := PItemIDList( PByte(FCIDA)
+ PDWORD(PByte(@FCIDA^.aoffset)
+sizeof(FCIDA^.aoffset[0])*(1+Index))^)
else
Result := nil
end;
I get this error:
[Pascal Error] IDEVirtualDataObject.pas(1023): E2015 Operator not applicable to this operand type
What’s the problem with this code and what kind of type-casting do I need to do to actually make it work?
I get the same error on the following (less complex) routine:
function TShellIDList.InternalParentPIDL: PItemIDList;
{ Remember PIDLCount does not count index [0] where the Absolute Parent is }
begin
if Assigned(FCIDA) then
Result := PItemIDList( PByte(FCIDA) + FCIDA^.aoffset[0])
else
Result := nil
end;
Pointermath was introduced in Delphi 2009. The best you can do in Delphi 2007 is to use
Incprocedure instead: