Keyword: ActiveX, Tguid, CocreateGuid, Guidtostring
// --- Test Program by Conan 2005/04/14 --- // Unit unit1;
Interface
Uses Windows, Messages, Sysutils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ActiveX, stdctrls;
TYPE TFORM1 = Class (TFORM) Button1: TButton; Procedure Button1Click (sender: TOBJECT); private {private declarations} end;
Var Form1: TFORM1;
IMPLEMENTATION
{$ R * .dfm}
procedure TForm1.Button1Click (Sender: TObject); var I: Integer; sGUID: string; TmpGUID: TGUID; begin for I: = 0 to 10 do begin if CoCreateGUID (TmpGUID) = S_OK then sGUID: = GUIDToString (TmpGUID) else ShowMessage ('Create Guid Error!'); ShowMessage (SGUID); end;
End.