Solved

CoCreateGuid content

Posted on 1998-12-30
10
319 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

809 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