[fpc-pascal] CreateGUID() [was Re: GUID code]

Michael Van Canneyt michael at freepascal.org
Sat May 21 10:54:50 CEST 2005

On Sat, 21 May 2005, listmember wrote:

> Michael Van Canneyt wrote:
> Hi Michael,
> > > I mean the whole code for CreateGUID() --one that does not
> > > use OS's GUID stuff.
> > 
> > See Subversion, SysUtils unit, more specific uuid.pp in the
> > rtl/unix dir.
> Thank you for the pointer.
> Without creating incompatibility to the existing code (that of
> Deplphi and Kylix included), might I suggest a little extension
> to CreateGUID().
> The reason I would like this is, there are timesone would
> want to create GUIDs based on self supplied MAC numbers.
> Here is a template of what I propose. If no one objects
> to the idea, I can submit real code later.

Well, the implementation as it is now for Unix turns out to be very 
Linux specific. Therefore, the system will be done slightly different.


  OnCreateGUID : TCreateGUIDFunc = Nil;

event will be made. if it is set, it will be used instead of the default 
implementation (which will still be system specific). You can then set 
this handler to supply your own GUID generation routine. 
I will supply some example code for Linux, one with the uuid C library, 
one with the implementation I made earlier (it will be in the packages).

I am working on this now, you can expect it in SubVersion tonight.


More information about the fpc-pascal mailing list