Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Declare Function CoCreateGuid Lib "OLE32.DLL" (pGUID As GUID) As Long
Private Declare Function StringFromGUID2 Lib "OLE32.DLL" (pGUID As GUID, ByVal sGUID As String, ByVal MaxLength As Long) As Long
Public Function CreateGUID2() As String
Dim G As GUID, S As String, I As Long
Call CoCreateGuid(G)
S = Space$(128)
I = StringFromGUID2(G, S, Len(S))
If I = 0 Then Exit Function
CreateGUID2 = Left$(StrConv(S, vbFromUnicode), I - 1)
End Function
Сейчас этот форум просматривают: Google-бот, Yandex-бот и гости: 42