Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
New related comments Number of comments in the last 48 hoursOLE Error: CoInitialize has not been called 1 new comments
|
Create a GUID at runtime
1 comments. Current rating: (1 votes). Leave comments and/ or rate it.
You may need to create a GUID at runtime. One reason could be to simply have a unique number that identifies each workstation.
By the way the last group of digits in the GUID generated on a computer is its network card number (if any is present).
Delphi does not have the needed definitions, here they are:
 | |  | | function CoCreateGuid (pGUID : TGUID) : longint;
external 'OLE32.DLL';
procedure TForm1.FormCreate(Sender: TObject);
var
udtGUID : TGUID;
lResult : longint;
begin
lResult := CoCreateGuid(udtGUID);
end;
| |  | |  |
Comments:
|
anonymous from United Kingdom
|
 |
|
|
|
|