home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   PASCAL      Pascal programming language discussions      592 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 504 of 592   
   Andy Gorman to All   
   "Delphi" DLL   
   08 May 21 15:43:38   
   
   TID: Mystic BBS 1.12 A47   
   MSGID: 1:229/426.52 801c7496   
   TZUTC: -0700   
   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)   
   SEEN-BY: 1/123 90/1 120/340 123/131 129/305 226/30 227/114 702 229/101   
   SEEN-BY: 229/424 426 550 616 664 700 1016 1017 240/5832 249/206 317   
   SEEN-BY: 249/400 282/1038 292/854 301/1 317/3 322/757 342/200   
   PATH: 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca