1、asp
<% Dim objTypeLib Set objTypeLib = CreateObject("Scriptlet.TypeLib") Response.Write objTypeLib.Guid %>
2、vb
创建 GUID ============================================================== Private Declare Function CoCreateGuid Lib "OLE32.DLL " _ (pGUID As GUID) As Long Private Declare Function StringFromGUID2 Lib "OLE32.DLL " _ (pGUID As GUID,_ ByVal PointerToString As Long,_ ByVal MaxLength As Long) As Long Private Type GUID Guid1 As Long Guid2 As Long Guid3 As Long Guid4(0 To 7) As Byte End Type Public Function CreateGUID() As String Dim udtGUID As GUID Dim sGUID As String Dim lResult As Long lResult = CoCreateGuid(udtGUID) If lResult Then sGUID = " " Else sGUID = String$(38,0) StringFromGUID2 udtGUID,StrPtr(sGUID),39 End If CreateGUID = sGUID End Function