[Mono-list] Re: Problem using p/invoke on mono 1.0.1

DI Mag. Rainer Burgstaller rainer.burgstaller@web.de
Tue, 24 Aug 2004 09:04:24 +0200


> The work-around for this is to have your method return an 
> IntPtr and then 
> convert the IntPtr to a string manually. For example, use the 
> following in 
> the place of your WriteLine() statement:
> 
> 	string encrypted = Marshal.PtrToStringAnsi(UnixCrypt(arg,arg));
> 	Console.WriteLine("UnixEncrypting {0} : {1}",arg,encrypted);

Thanks a lot!!! That worked.