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


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

Re: UniqueKey

From "Willie Moore" <williem@wmconsulting.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: UniqueKey
Date 2012-12-26 12:43 -0600
Organization Aioe.org NNTP Server
Message-ID <kbfgh1$u4h$1@speranza.aioe.org> (permalink)
References <kbffli$t8s$1@ls237.t-com.hr>

Show all headers | View raw


Jozo,

In order to create a GUID, you have to have the dll definition. That is why 
you are getting an error message saying that the function in unknown.

Regards,
Willie
Vulcan VIP

_DLL FUNCTION CoCreateGuid( p AS _winGuid ) AS LONG 
PASCAL:OLE32.CoCreateGuid


"Jozo"  wrote in message news:kbffli$t8s$1@ls237.t-com.hr...

Hello all,

I have the function for creating UniqueKey for that the compiler signalizes
next error:
"Entity CoCreateGuid is unkonwn, bad function call "
The problem is in next code:
hr := CoCreateGuid(@GUID_New)

Can somebody help me with correctly function or any correctly solution ?
I work with Vo27b 2740, Windows XP. Thanks in advance.

Jozo

Source of function:

FUNCTION CreateaUniqueKey  AS STRING PASCAL
LOCAL Guid_New IS _winGuid
LOCAL hr       AS LONG
LOCAL lpBuffer AS PSZ
LOCAL sGuid    AS STRING
hr := CoCreateGuid(@GUID_New)
lpBuffer:= MemAlloc(255)
hr := StringFromGUID2(  @Guid_new , lpBuffer, 255)
sGuid := Mem2String(lpBuffer, hr*2)    // Unicode: char = 2 bytes
MemFree(lpBuffer)
sGuid := Wide2Multi(sGuid)     // Undocumente in VO runtime
RETURN sGuid

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


Thread

UniqueKey "Jozo" <racunalo@os.t-com.hr> - 2012-12-26 19:29 +0100
  Re: UniqueKey "Willie Moore" <williem@wmconsulting.com> - 2012-12-26 12:43 -0600
    Re: UniqueKey "Jozo" <racunalo@os.t-com.hr> - 2012-12-26 20:34 +0100

csiph-web