VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Get GUID string

Bogdan Chernyachuk  (2 Submissions)   OLE/COM/DCOM/Active-X   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Generates Global Unique ID - when you want to create an identifier which will never repeat all over the word , you will find this usefull.

Returns
Returns Global Unique ID in string format (the same as the format of ClassID written in registry).

API Declarations
Public Type GUID ' a structure for Global Uniq. ID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0, 7) As Byte
End Type
Declare Function CoCreateGuid Lib "ole32" (ByRef lpGUID As GUID) As Long
Declare Function StringFromGUID2 Lib "ole32" (ByRef lpGUID As GUID, ByVal lpStr As String, ByVal lSize As Long) As Long

Rate Get GUID string (12(12 Vote))
Get GUID string.bas

Get GUID string Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters