# Which Windows API fuiction create GUID for Windows Registry



## nandip (Oct 31, 2006)

I am interested in windows programming. I done many tweak with VB 6.0. I want to know which API function crearte GUID (Globaly Unique Identifier) 
something like

---

{00000010-6F7D-442C-93E3-4A4827C2E4C8}

---

for windows registry.


----------



## Kiran.dks (Oct 31, 2006)

Source:*www.asp-dev.com/main.asp?page=60

There is a simple function that allows you to create a GUID that uses the Windows API to guarantee it's unique.


<%
Function createGuid()
  Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
  tg = TypeLib.Guid
  createGuid = left(tg, len(tg)-2)
  Set TypeLib = Nothing
End Function
%>


----------

