summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-04-12 13:46:16 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-04-12 13:46:16 +0000
commit0e9408f5c2169c407fb83310a5ef735cee1c648d (patch)
tree064b6858c7491dc2ca47d73e89fb4d28acd04cd7 /misc
parentd672b251d6155470ed50948277104abc35686c4b (diff)
downloadapr-0e9408f5c2169c407fb83310a5ef735cee1c648d.tar.gz
Point out a possible issue, and clean up the includes sequence.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r--misc/win32/getuuid.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/misc/win32/getuuid.c b/misc/win32/getuuid.c
index e833472ec..1082b6dd1 100644
--- a/misc/win32/getuuid.c
+++ b/misc/win32/getuuid.c
@@ -57,16 +57,32 @@
* located at http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt
*/
-#include <objbase.h>
+#define _WINUSER_
#include "apr.h"
#include "apr_uuid.h"
+#ifdef NOUSER
+#undef NOUSER
+#endif
+#undef _WINUSER_
+#include <winuser.h>
+#include <objbase.h>
+
APR_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid)
{
GUID guid;
- /* Note: this call doesn't actually require CoInitialize() first */
+ /* Note: this call doesn't actually require CoInitialize() first
+ *
+ * XXX: This is wrong (two ways) ... one we need to test the HRESULT
+ * and if not S_OK (0) then we actually FAILED!
+ *
+ * Second, we should scramble the bytes or some such to eliminate the
+ * possible misuse/abuse since uuid is based on the NIC address, and
+ * is therefore not only a uniqifier, but an identity (which might not
+ * be appropriate in all cases.
+ */
(void) CoCreateGuid(&guid);
memcpy(uuid->data, &guid, sizeof(uuid->data));
}