Thank you Stephen
Here it is

Option Compare Database
Option Explicit

Private Type Guid
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type
____________________________________________________________________________________

Private Declare Function CoCreateGuid Lib "OLE32.DLL" (pGuid As Guid) As Long

Public Function GetGUID() As String

Dim udtGUID As Guid

If (CoCreateGuid(udtGUID) = 0) Then

GetGUID = _
String(8 - Len(Hex$(udtGUID.Data1)), "0") & Hex$(udtGUID.Data1) & _
String(4 - Len(Hex$(udtGUID.Data2)), "0") & Hex$(udtGUID.Data2) & _
String(4 - Len(Hex$(udtGUID.Data3)), "0") & Hex$(udtGUID.Data3) & _
IIf((udtGUID.Data4(0) < &H10), "0", "") & Hex$(udtGUID.Data4(0)) & _
IIf((udtGUID.Data4(1) < &H10), "0", "") & Hex$(udtGUID.Data4(1)) & _
IIf((udtGUID.Data4(2) < &H10), "0", "") & Hex$(udtGUID.Data4(2)) & _
IIf((udtGUID.Data4(3) < &H10), "0", "") & Hex$(udtGUID.Data4(3)) & _
IIf((udtGUID.Data4(4) < &H10), "0", "") & Hex$(udtGUID.Data4(4)) & _
IIf((udtGUID.Data4(5) < &H10), "0", "") & Hex$(udtGUID.Data4(5)) & _
IIf((udtGUID.Data4(6) < &H10), "0", "") & Hex$(udtGUID.Data4(6)) & _
IIf((udtGUID.Data4(7) < &H10), "0", "") & Hex$(udtGUID.Data4(7))
End If

End Function


On 5/22/07, Stephen the Cook <[EMAIL PROTECTED]> wrote:
> Sytze de Boer <> wrote:
> > Hi Folk
> > I have about 15 lines in VB code that I need to convert into VFP(9) I
> > tried a utility from Sweet Potato but it's not quite complete Can
> > anyone help me ? (Gimme your email address and I can send the txt
> > file)
>
> Just put the code out here.
>
>
> Stephen Russell
> DBA / .Net Developer
>
> Memphis TN 38115
> 901.246-0159
>
> "A good way to judge people is by observing how they treat those who
>     can do them absolutely no good." ---Unknown
>
> http://spaces.msn.com/members/srussell/
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/813 - Release Date: 5/20/2007
> 7:54 AM
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to