Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6467

Re: Globally Unique Identifier

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Globally Unique Identifier
Date Wed, 8 Jan 2014 22:30:52 +0100
Lines 45
Message-ID <bj5v9rFfu36U1@mid.individual.net> (permalink)
References <laju7s$5c8$1@ls237.t-com.hr>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="Windows-1252"; reply-type=response
Content-Transfer-Encoding 7bit
X-Trace individual.net Jdwx8RYNd4toSo11RYD/TgLDGccKu7B+DQh5tWrRKJ54x7mfKn
Cancel-Lock sha1:9K5baVmwDhAzXrMRXyx3x79ha2s=
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
Xref csiph.com comp.lang.clipper.visual-objects:6467

Show key headers only | View raw


Hi Jozo,

A member of the VO-UserGroup Bodensee (Norbert) has written the two 
functions. I think he will allow me to give you this code:

FUNCTION NewGUID() AS STRING PASCAL
     LOCAL hResult    AS LONG
     LOCAL pGuid        AS _WINGUID
     LOCAL cGuid        AS STRING

     pGuid     := MemAlloc( _SIZEOF( _WINGUID ) )
     hResult     := CoCreateGUID( pGuid )
     cGuid      := GUID2String( pGUID )
     MemFree( pGUID )

     RETURN cGuid

FUNCTION GUID2String( pGuid AS _WINGUID ) AS STRING
     LOCAL cGUID        AS STRING
     LOCAL i            AS DWORD

     cGuid := AsHexString( pGuid.Data1 ) + "-" + ;
              Right( AsHexString( pGuid.Data2 ), 4 ) + "-" + ;
              Right( AsHexString( pGuid.Data3 ), 4 ) + "-" + ;
              Right( AsHexString( pGuid.Data4[ 1 ] ), 2 ) + Right(
AsHexString( pGuid.Data4[ 2 ] ), 2 )  + "-"

     FOR i := 3 UPTO 8
         cGuid += Right( AsHexString( pGuid.Data4[ i ] ), 2 )
     NEXT i

     RETURN cGuid

As Karl wrote you need for 2.8 the OLE-Lib

regards
Urs

"Jozo" <racunalo@os.t-com.hr> schrieb im Newsbeitrag 
news:laju7s$5c8$1@ls237.t-com.hr...
> Does anyone has function or method for Globally Unique Identifier ?
>
> Thanks in advance, Jozo.
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Globally Unique Identifier "Jozo" <racunalo@os.t-com.hr> - 2014-01-08 17:26 +0100
  Re: Globally Unique Identifier Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-01-08 20:00 +0100
    Re: Globally Unique Identifier "Jozo" <racunalo@os.t-com.hr> - 2014-01-09 00:38 +0100
  Re: Globally Unique Identifier "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2014-01-08 22:30 +0100
    Re: Globally Unique Identifier Mathias <mathias.hakansson@consultec.se> - 2014-01-08 22:09 -0800

csiph-web