I'm creating a DLL that is going to get a value passed into it (path to a file). I am able to pass in a value, but it's getting truncted in the DLL.
Here's the code:
Path : String;
o : Text;
function MySucc(AVal : PWideString; pLen : Integer) : PWideString; stdcall; begin
Result := AVal;
is there a reason you're using PWideString? SysUtils has a StrPas
function that makes it fairly easy to do things like UnicodeStringVar:=StrPas(AVal); where AVal is a PWideChar .. which is usually enough for me to interact with C/C++ from pascal.
are you calling this from C# then? it would seem SetLength() is doing
|Location:||Huddersfield, West Yorkshire, UK|
|Nodes:||8 (1 / 7)|