I’m only going on the MS docs, yes they (UUID & GUID) are both the same datastructure, but the wording for CoCreateGuid and UuidCreate suggests there are differences, namely UUID and UuidCreate is unique to the device and GUID and CoCreateGuid is unique globally. The docs infer there is an additional process which CoCreateGuid applies.
I wouldnt expect the api UuidToString to throw an error converting a Guid to a string, unless there is some sort of GUID tracking taking place based on other api’s, but NotifyIconA does state there is GUID tracking taking place and it works.
NOTIFYICONDATAA (shellapi.h) - Win32 apps | Microsoft Learn
The binary file that contains the icon was moved. The path of the binary file is included in the registration of the icon’s GUID and cannot be changed. Settings associated with the icon are preserved through an upgrade only if the file path and GUID are unchanged. If the path must be changed, the application should remove any GUID information that was added when the existing icon was registered. Once that information is removed, you can move the binary file to a new location and reregister it with a new GUID. Any settings associated with the original GUID registration will be lost.
TLDR
The first use of a GUID and the icon file, which can be an exe, dll or icon file, will register the GUID with that file. It then stops you from moving that exe/dll/icon file to another location.
So far it seems impossible to reregister that GUID unless the exe/dll/icon file has changed.
So there is GUID tracking tacking place, to what extent or how far that reach’s into the OS, I’ve not been able to establish, but it doesnt stop coders from passing a GUID to UuidToString to get a string form.
Then there’s Raymond Chen only refering to GUID’s GUIDs are globally unique, but substrings of GUIDs aren’t - The Old New Thing (microsoft.com)
and then there’s this internet draft which treats UUID’s and GUID’s as one and the same.
www.webdav.org/specs/draft-leach-uuids-guids-01.txt
This specification defines the format of UUIDs (Universally Unique
IDentifier), also known as GUIDs (Globally Unique IDentifier). A UUID
is 128 bits long, and if generated according to the one of the
mechanisms in this document, is either guaranteed to be different
from all other UUIDs/GUIDs generated until 3400 A.D. or extremely
likely to be different (depending on the mechanism chosen). UUIDs
were originally used in the Network Computing System (NCS) [1] and
later in the Open Software Foundation’s (OSF) Distributed Computing
Environment [2].
Now it seems there are 4 versions of a UUID/GUID which may suggest the difference between UuidCreate and CoCreateGuid’s wording.
Universally unique identifier - Wikipedia
Which makes me think, there might be a difference to UuidToString and GuidToString2, but they wont throw an error, because I can a NID 4 structure to Shell_NotifyIcon without the overlaid 4 byte Union
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
and the description from szInfoTitle (the systray balloon title) will be minus 4 characters, implying some of these structures are not having their contents validated, which makes life interesting from a clever security perspective.
SO TLDR is I’m using GUID api’s for GUIDS and UUID api’s for UUID’s, which should make it one less step to workout what machine it was generated on.