Click here to Skip to main content
15,867,771 members
Articles / Desktop Programming / ATL
Article

GUIDGen AddIn for Visual Studio.NET

Rate me:
Please Sign up or sign in to vote.
4.55/5 (10 votes)
20 May 2004CPOL2 min read 110.1K   1.5K   21   16
An Add-In that replaces and extends the GUID Generator component included with Visual Studio.NET

Version 2.1 What's New?

Image 1

Description

GUIDGen.NET is an addin that replaces and extends the GUID Generator component included with Visual Studio.NET.

  • All the formats provided by the standard component are supported, plus two other commonly-used formats.
  • The ability to directly insert the results in the IDE's text editor without having to paste from the clipboard.
  • Insert new GUIDs using the current settings without showing the UI.
  • Optionally include an unformatted GUID as a comment before the main formatted one.
  • Optionally 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.
  • Create GUIDs using lowercase or uppercase characters.
  • Run in standalone mode using RUNDLL32. Just create a shortcut to rundll32.exe <path>\GuidGenNet.dll,ShowDialog
  • Use the addin in macros using two named commands: GGShowDialog and GGInsertGUID. The first command displays the UI and the second one directly inserts a GUID in the text editor using the current settings.
  • Default keybindings: GGShowDialog(alt+g,alt+d) and GGInsertGUID(alt+g,alt+i)

Installation

Just double-click on the GuidGenNetSetup.msi file.

Usage

To use the GUIDGen addin, 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

  1. Using the IMPLEMENT_OLECREATE macro
    // {DEF47E1-E23A-11D3-B4D0-8208CCE0C829}
    IMPLEMENT_OLECREATE(<< class >>, << external_name >>,
    0x0DEF47E1, 0xE23A, 0x11D3, 0xB4, 0xD0, 0x82, 0x08, 
      0xCC, 0xE0, 0xC8, 0x29);
  2. Using the DEFINE_GUID macro
    // {DEF47E6-E23A-11D3-B4D0-8208CCE0C829}
    DEFINE_GUID(<< name >>,
    0xDEF47E6, 0xE23A, 0x11D3, 0xB4, 0xD0, 0x82, 0x08, 0xCC,
      0xE0, 0xC8, 0x29);
  3. Creating a static GUID
    // {DEF47E8-E23A-11D3-B4D0-8208CCE0C829}
    static const GUID << name >> = { 0xDEF47E8, 0xE23A, 0x11D3, 
      { 0xB4, 0xD0, 0x82, 0x08, 0xCC, 0xE0, 0xC8, 0x29 } };
  4. Using the standard registry format
    {DEF47EA-E23A-11D3-B4D0-8208CCE0C829}
  5. Using a "plain", undecorated format
    DEF47EC-E23A-11D3-B4D0-8208CCE0C829
  6. 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.

Updates

Version 2.1 (05/18/04)

  • Added support for Visual Studio 2003
  • Now the GUIDs can be created in using uppercase or lowercase.
  • Administrative installs are now supported.

Version 2.0 (03/01/02)

  • Initial release

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalplz support VS2005 Pin
nitstheone10-Nov-06 20:15
nitstheone10-Nov-06 20:15 
AnswerRe: plz support VS2005 Pin
Eddie Velasquez17-Nov-06 6:52
Eddie Velasquez17-Nov-06 6:52 
GeneralRe: plz support VS2005 Pin
Thomas Helzle15-Sep-07 0:24
Thomas Helzle15-Sep-07 0:24 
QuestionAny plans to support VC++ 2005? Pin
Thomas Helzle17-Mar-06 2:51
Thomas Helzle17-Mar-06 2:51 
GeneralStartup failure Pin
Sid Price22-Jun-04 9:22
Sid Price22-Jun-04 9:22 
GeneralVS.NET 2003 Pin
Daij-Djan14-Sep-03 1:11
Daij-Djan14-Sep-03 1:11 
GeneralRe: VS.NET 2003 Pin
HachiihcaH15-Oct-03 9:51
HachiihcaH15-Oct-03 9:51 
GeneralRe: VS.NET 2003 Pin
HachiihcaH15-Oct-03 10:03
HachiihcaH15-Oct-03 10:03 
GeneralRe: VS.NET 2003 Pin
HachiihcaH15-Oct-03 10:06
HachiihcaH15-Oct-03 10:06 
GeneralRe: VS.NET 2003 Pin
Tillerstarr25-Nov-03 11:01
Tillerstarr25-Nov-03 11:01 
GeneralRe: VS.NET 2003 Pin
Full Meat9-Dec-03 7:58
Full Meat9-Dec-03 7:58 
GeneralGreat idea, but... Pin
Tom Archer1-Mar-02 12:15
Tom Archer1-Mar-02 12:15 
GeneralRe: Great idea, but... Pin
Eddie Velasquez1-Mar-02 14:03
Eddie Velasquez1-Mar-02 14:03 
GeneralRe: Great idea, but... Pin
Tom Archer1-Mar-02 14:11
Tom Archer1-Mar-02 14:11 
GeneralRe: Great idea, but... Pin
Rama Krishna Vavilala1-Mar-02 14:35
Rama Krishna Vavilala1-Mar-02 14:35 
GeneralRe: Great idea, but... Pin
Eddie Velasquez1-Mar-02 15:35
Eddie Velasquez1-Mar-02 15:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.