Subj : "Delphi" DLL To : All From : Andy Gorman Date : Sat May 08 2021 15:43:38 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: library SimpleLib; Uses SysUtils; Var Path : String; o : Text; function MySucc(AVal : PWideString; pLen : Integer) : PWideString; stdcall; begin SetLength(String(AVal), pLen); Assign(o, 'c:\temp\simp.txt'); Rewrite(o); Write(o,String(AVal)); Close(o); Result := AVal; end; exports MySucc; End. I'm passing in a path (i.e. c:\mystic\data\users.dat) and the length of said path. Everytime I try to read the path, I end up with "c:\mystic\da" and I'm not sure how to get around this. I'm very new to Pascal (I'm a C# developer generally) and so I'm sure I'm missing something simple, but don't know what that is. Any help is greatly appreciated. Andy --- Mystic BBS v1.12 A47 2021/05/03 (Windows/64) * Origin: The Pot O'Gold - bbs.thepotogold.net:4888 (1:229/426.52) .