Monday, August 23, 2010

UUID Generator


Sometime when coding for ATL, i need to create manually Interface derived from IUnknown. Declaration of Interface derived from IUnknown like below:


[
object,
uuid(9465EAB0-AE53-11DF-94E2-0800200C9A66),
dual,
nonextensible,
helpstring("IInternal Interface"),
pointer_default(unique)
]
interface IInternal : IUnknown{
};


Look at the uuid field. It is a unique (hope) id for this interrface. Forming the uuid refers to RFC 4122. Fortunately, many people has offered a tool to generate it. You can use site below to generate it.


1. http://www.famkruithof.net/uuid/uuidgen
2. http://www.guidgenerator.com/
3. http://www.somacon.com/p113.php

Ok, hope it help!

0 comments: