![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#1
|
||||
|
||||
|
Hola a Todos:
Estoy trabajando con delphi 6 y necesito generar GUID's en tiempo de ejecucion. Si alguien me puede decir cual es la funcion que se debe utilizar se los agradeceria mucho. Saludos.
__________________
Al infierno se llega por atajos. |
|
#2
|
||||
|
||||
|
autorespuesta
Hola:
Bueno, parece que fue un hilo bastante corto .Encontre un ejemplo que espero le sirva a alguien mas. Saludos. "El que busca encuentra" (Alguien). Código:
unit GreateMyNewGUID;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
BtnNewGuid: TButton;
Memo1: TMemo;
procedure BtnNewGuidClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmCreateNewGuid: TForm1;
implementation
{$R *.DFM}
uses
ComObj, ActiveX;
procedure frmCreateNewGuid.BtnNewGuidClick(Sender: TObject);
var
ID: TGUID;
S: string;
begin
if CoCreateGuid (Id) = s_OK then
begin
s := GUIDToString (Id);
Memo1.Lines.Add (S);
end;
end;
end.
__________________
Al infierno se llega por atajos. |
![]() |
|
|
|