Link to home
Start Free TrialLog in
Avatar of uris
uris

asked on

CoCreateGuid content

Does anyone know if the code used in 'CoCreateGuid' is public domain? if so, where can I get it? (I need a GUID or similar mechanism in a infrastructure library that should not link with MFC/OLE).
Thanks,
Uri
Avatar of uris
uris

ASKER

Adjusted points to 50
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of uris

ASKER

Thanks, but again, is the code of 'UuidCreate' available for me? I want to write it (if possible) in my own library without having to link ANY other library.

Thanks
I'm searching my archives at the moment - i know i have some examples here, but can't locate them at the moment. But be sure, if i find something, i'll post it for you ;-)
ftp://ftp.hkstar.com/.1/netinfo/internet-drafts/draft-leach-uuids-guids-01.txt

Hint: do not accept an answer until you are satisfied with the solution.
alexo - the original (and 'official') source of the document you mentioned is
'http://www.ietf.org/internet-drafts/draft-leach-uuids-guids-01.txt'
BTW: I almost forgot - the source code for 'uuid_create()' (OSF DCE RPC) is available with the Linux sources, so i'll search them when i have time to reboot ;-)
Avatar of uris

ASKER

Thanks guys. By the way, I am trying the code suggested at the end of this article, and there is something missing. They use includes and types defined in "MD5.h". Do you know what it is, and again, where can I get it?

Thanks again,
uris
>> the original (and 'official') source of the document you mentioned [...]
Yea I know, it was temporarily unavailable due to some reason so I did an ftp search on the name.
Avatar of uris

ASKER

Thanks guys. By the way, I am trying the code suggested at the end of this article, and there is something missing. They use includes and types defined in "MD5.h". Do you know what it is, and again, where can I get it?

Thanks again,
uris
md5.h is usually used for encryption purposes - it's quite small, so you'll find it below ;-)

/* MD5.H - header file for MD5C.C
 */

/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.

License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.

License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.

RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.

These notices must be retained in any copies of any part of this
documentation and/or software.
 */

/* MD5 context. */
typedef struct {
  UINT4 state[4];                                   /* state (ABCD) */
  UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
  unsigned char buffer[64];                         /* input buffer */
} MD5_CTX;

void MD5Init PROTO_LIST((MD5_CTX *));
void MD5Update PROTO_LIST((MD5_CTX *, unsigned char *, unsigned int));
void MD5Final PROTO_LIST((unsigned char [16], MD5_CTX *));