Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UniqueKey

74 views
Skip to first unread message

Jozo

unread,
Dec 26, 2012, 1:29:07 PM12/26/12
to
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


Willie Moore

unread,
Dec 26, 2012, 1:43:50 PM12/26/12
to
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...

Jozo

unread,
Dec 26, 2012, 2:34:13 PM12/26/12
to
Thank you very much Willie.

Jozo

"Willie Moore" <wil...@wmconsulting.com> wrote in message
news:kbfgh1$u4h$1...@speranza.aioe.org...
0 new messages