FFI Win32 api calls with LPTSTR args?

John Pierce john.raymond.pierce at gmail.com
Tue Jan 25 23:32:59 UTC 2005


Not trying to point you another direction, but .NET wraps this up
nicely and with our Squeak.NET package your code would look like:

DotNet Path getTempPath   "-> to get the temp path"
DotNet Environment getFolderPath: DotNet SpecialFolder Personal "-> to
get the user home directory"

I know this is *not* via FFI and I don't play much in that arena so I
couldn't provide much guidance as to how to map char**.

So if I really wanted to do it via FFI -- well, I wouldn't.  I'd just
use the .NET interop package.

Regards,

John

On Tue, 25 Jan 2005 23:40:02 +0100, Cees de Groot <cg at cdegroot.com> wrote:
> Hi,
> 
> I want to use some Win32 API functions to make my app a bit more windoze
> friendly, most notably to place temporary files in the correct location
> (GetTempPath) and to find out where the user's home directory is (haven't
> found that one yet ;)).
> 
> My knowledge of FFI is as big as that of Win32, i.e. almost completely
> absent. I haven't seen an example that uses the 'LPTSTR' (char **?)
> argument type, so I'm a bit at a loss as how to do this - could somebody
> help me here?
> 
> TIA,
> 
> Cees
> 
> 


-- 
Only the mediocre are always at their best. -- Jean Giraudoux



More information about the Squeak-dev mailing list