Ah, sorry, I didn't realise it was write-only.

Here is a (untested) function to get the TransparentColor from a surface:
[pascal]function GetSurfaceTransparentColor(Surface: TDirectDrawSurface): Longint;
var
hr: HResult;
ddck: TDDColorKey;
begin
if (Surface <> nil) and (Surface.ISurface <> nil) then begin
hr := Surface.ISurface.GetColorKey(DDCKEY_SRCBLT, ddck);
if (hr = DD_OK) then begin
Result := ddck.dwColorSpaceLowValue;
end else begin
// failed to read ColorKey
Result := 0;
end;
end else begin
// surface is invalid
Result := 0;
end;
end;[/pascal]
I am not sure of the exact difference between dwColorSpaceLowValue and dwColorSpaceHighValue; the SetTransparentColor methods sets them both to the TransparentColor, so I'm assuming it is the same in this case (you could try replacing dwColorSpaceLowValue with dwColorSpaceHighValue if this doesn't work.) I don't have a copy of the DirectDraw documentation handy, so I can't check right now.

I don't really see why you need to read the TransparentColor of a surface anyway, seeing as you must have set it previously.