On 12/30/05, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:
> Tony Pelton wrote:
> > not to stick my nose in, but what convention makes this a "usually" ?
> >
> > i'm not a 'C' programmer by any stretch, but i don't _think_ functions
> > that have a return type of "char*" are that unusual are they ?
>
> No. ImageMagick, a c library, makes extensive use of functions returning
> PChars.
Yes, this is what I think. This would be a standard way to go. But I
can't remember, for example, a win API that does just that. I will
have to try that.
> > in an MD5, i don't think you are going to know how long the returned
> > string would be right ?
>
> It is the absolute oposite. MD5 Hashes always have the same size. This
> can help a little.
This is (as we can see it in the md5 unit) a 16 bytes result,
expressed in hex as a 32 char string plus the #0 if a null terminated
string. So memory allocation is always 32+1.
Now I simply want to make that work. I'll need to test that.
Is there anything special to do so that the DLL is working in Windows?
Asside the 'library' program...
Regards.
--
Alexandre Leclerc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives