Description
GUIDGen is an add-in that replaces and extends the GUID Generator component included with Developer Studio.
It supports all the formats provided by the standard component, plus two other commonly-used formats. It also has
the ability to directly insert the results in the IDE's text editor.
Installation
To install this VC add-in, copy GUIDGen.dll to the <devstudio>\SharedIDE\AddIn directory,
where <devstudio> is your DevStudio directory. Restart DevStudio and the add-in will automatically
be added. Go to the Tools|Customize menu item and click on the Add-Ins and Macro Files tab. Check
the GUID Generator option and a new toolbar button will be added to DevStudio. The add-in will now
be reloaded whenever DevStudio starts.
Usage
To use the GUID Generator add-in, click on the add-in button and select one of the options. The add-in will
then insert a new GUID in the selected format in the current active document or copy the text to the clipboard.
Supported formats
- Using the IMPLEMENT_OLECREATE macro
IMPLEMENT_OLECREATE(<< class >>, << external_name >>,
0x0DEF47E1, 0xE23A, 0x11D3, 0xB4, 0xD0, 0x82, 0x08, 0xCC, 0xE0, 0xC8, 0x29);
- Using the DEFINE_GUID macro
DEFINE_GUID(<< name >>,
0xDEF47E6, 0xE23A, 0x11D3, 0xB4, 0xD0, 0x82, 0x08, 0xCC, 0xE0, 0xC8, 0x29);
- Creating a static GUID
static const GUID << name >> =
{ 0xDEF47E8, 0xE23A, 0x11D3, { 0xB4, 0xD0, 0x82, 0x08, 0xCC, 0xE0, 0xC8, 0x29 } };
- Using the standard registry format
{DEF47EA-E23A-11D3-B4D0-8208CCE0C829}
- Using a "plain", undecorated format
DEF47EC-E23A-11D3-B4D0-8208CCE0C829
- Using the uuid() format
__declspec(uuid("DEF47EE-E23A-11D3-B4D0-8208CCE0C829"))
When selecting any of the first three formats, GUIDGen will work in "batch mode", creating a new GUID
each time the "Insert" or "Copy" buttons are clicked, but the dialog will not be closed. The
dialog will be closed when the "Exit" button is pressed. For the other formats the dialog will be closed
after the button is pressed.
GUIDGen can optionally include an unformatted GUID as a comment for the first three supported formats.
Updates
02/12/2001 | Added a button to directly insert a new GUID in the selected format in the current active document. |
03/08/2001 | Fixed "missing zeros in GUID" bug. Thanks to Joseph Dempsey for reporting it. |
12/27/2001 | Added the option to generate "classic" GUIDs: those generated by UuidCreateSequential instead of UuidCreate. For security reasons, UuidCreate was modified so that it no longer uses a machine's MAC address to generate UUIDs. UuidCreateSequential was introduced to allow creation of UUIDs using the MAC address of a machine's Ethernet card. |