GuidToString (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example builds a GUID and displays it in a dialog box after translating it to a string.

Code

#include <ActiveX.hpp>
#include <ComObj.hpp>
#include <Sysutils.hpp>

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	TGUID g;
  	OleCheck(CoCreateGuid(&g));
	ShowMessage(Sysutils::GUIDToString(g));
}

Uses

Personal tools
Assistance