Solved

CoCreateGuid content

Posted on 1998-12-30
10
322 Views
Last Modified: 2008-01-16
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
0
Comment
Question by:uris
  • 4
  • 4
  • 2
10 Comments
 

Author Comment

by:uris
ID: 1181291
Adjusted points to 50
0
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 1181292
The code isn't public domain, but the function isn't included in MFC/OLE lib's, it simply maps to 'UuidCreate()' from rpcrt4.dll (available on every Win32 system)
0
 

Author Comment

by:uris
ID: 1181293
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
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 86

Expert Comment

by:jkr
ID: 1181294
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 ;-)
0
 
LVL 11

Expert Comment

by:alexo
ID: 1181295
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 1181296
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 ;-)
0
 

Author Comment

by:uris
ID: 1181297
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
0
 
LVL 11

Expert Comment

by:alexo
ID: 1181298
>> 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.
0
 

Author Comment

by:uris
ID: 1181299
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
0
 
LVL 86

Expert Comment

by:jkr
ID: 1181300
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 *));

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ assignment question 7 236
c++ syntax question 9 50
Microsoft C++ code failing in executable that worked 9 107
c++, dynamic object by json 1 53
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question