In a dll build with Delphi 2006
Foo(aPath: widestring);
begin
_rootPath := aPath;
end;
In an executable built with Delphi 2010
_Foo := GetProcAddress(FooModule,’Foo’);
_Foo(‘123456’);
Stepping into the dll, aPath = '123'. In fact any string I pass gets cut exactly in half.
1.) Why is my literal being halved? 2.) How do I fix it?