General Programming »
Macros and Add-ins »
Visual Studio .NET Addins
Intermediate
GUIDGen AddIn for Visual Studio.NET
By Eddie Velasquez
An Add-In that replaces and extends the GUID Generator component included with Visual Studio.NET
|
VC7, VC7.1, VC8.0, C++Windows, .NET, .NET 1.0, Win2K, WinXP, ATL, VS.NET2003, Visual Studio, Dev
Posted: 28 Feb 2002
Updated: 20 May 2004
Views: 62,800
Bookmarked: 19 times
|
|
|
|
|

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
- 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.
Updates
- 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)
| You must Sign In to use this message board. |
|
| | Msgs 1 to 16 of 16 (Total in Forum: 16) (Refresh) | FirstPrevNext |
|
 |
|
|
this is just what i wanted.. but i want it for 2005. Actually i wanted it to be extended a bit so that.. when i am using a VS2005 snippet, that snippet will give me a piece of code with brand new GUID in it. is it possible.. I just wish MS had enabled custom functions in snippets
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
|
I've been pretty busy but I'll try to add VS2005 support within the next week or so.
Linux is only free if your time is worthless
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi Eddie,
thanks a lot for this tool. I write shaders for Softimage XSI and they need a GUID for every single element... I recently switched to VC++ 2005 Express and wanted to ask, if you have plans to port this to the new IDE?
Thank you very much!
Thomas Helzle
|
| Sign In·View Thread·PermaLink | 4.40/5 (2 votes) |
|
|
|
 |
|
|
I installed the addin on my XP Pro machine with VS.NET 2002. When I started up VS.NET a dialog appeared to say the addin had failed to init, a module was not found, and it had been uninstalled.
Any clues as to why this happened, Sid.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
The addin doesn't install. It does not give me an error but silently fails
May you always find water and shade
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
After tweaking the registry, i can get GUIDGen to show up in the AddinManager...but it seems as if the Actions associated with tool are also not setup correctly for vs.net 2003...Any thoughts Eddie?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
BTW...the extended GUIDGen is a great tool that ive used alot in vs6.0 im glad to see it again for .net (especially if we can get a version that works for 2003) Cool, useful stuff!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I was able to get GUIDGen to work with .Net 2003 after moving the reg keys from 7.0 to 7.1 (2002->2003) and then building the project.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This is a great little tool that I've come to rely on. I reinstalled my environment recently with VS.NET 2003 and have been quite frustrated trying to get this add-in installed. I wish the installer worked.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This is a great idea from which to learn how to write Add-Ins, Eddie. How about a follow-up that goes more into a step-by-step tutorial on actually writing an Add-In?
Cheers, Tom Archer Author, Inside C#
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I'm thinking about that, but right now I'm porting my CodeTemplate addin from VS6. My writing skills aren't that great though. Maybe you can proof-read it, you've definitely do have the skills!
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NET
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
In that case I would also like you to proof read my windows forms internals article, that would bring you one step closer to becoming official codeproject proof reader. -
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
General News Question Answer Joke Rant Admin
|