Eigentlich steht da im Debugger noch was vernünftiges drinnen, trotzdem kracht es:
Delphi-Quellcode:
function TAVPlayer.getAudioDeviceName(index:integer):String;
var deviceName,testName:PUTF8String;
str1,testResult:String;
str2:UTF8String;
begin
str1:='Help me';
str2:=UTF8Encode(str1);
testName:=@Pointer(str2);
testResult:=UTF8ToString(testName^);
deviceName:=SDL_GetAudioDeviceName(index,0);
result:=UTF8ToString(deviceName^);
end;
deviceName: $1B9D4E00 {''}
testName: $14F770 {'Help me'}