//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "GuidToString.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: GuidToString
// Routine: SysUtils.GUIDToString
// Routine: ComObj.OleCheck

// BeginCode
/*
The following example manufactures a GUID and displays it in
a dialog box after translating it to a string.
*/
#include <ActiveX.hpp>
#include <ComObj.hpp>
#include <Sysutils.hpp>

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