Trying to track down a COM problem, I’m debugging my code and seeming to see the same GUID represented different ways…
I have a line in our code:
class __declspec(uuid("{D4F83347-E58E-11d1-9D47-006008098294}"))
And various registry stuff in between, then a call to:
CLSID clsid;
::CLSIDFromProgID("myProgId",&clsid);
In the debugger, clsid is displayed as {000AFC9A-3347-D4F8-8EE5-D1119D470060}. To me this is too similar not to be right, but it’s not something I can check automatically… we’ve got the D4F8 and 3347, 9D47, but E58E becomes 8EE5 etc.
Is there a way I can understand why this is happening, and a way I can get them to look the same for comparison?
EDIT
To clear up some side-tracking, I’ve checked and the CLSID in the Windows registry and our registration scripts is presented as {D4F83347-E58E-11d1-9D47-006008098294} too – so the issue over my uuid(...) is not relevant I think.
After some testing, I discovered that the issue was simply how the visual C++ debugger was displaying the value, nothing more. e.g the registry value is
{D4F83347-E58E-11d1-9D47-006008098294}, calling::StringToCLSID()on the result ofCLSIDFromProgID()gives{D4F83347-E58E-11d1-9D47-006008098294}– but in the debugger MSVC++ displays the variable as{000AFC9A-3347-D4F8-8EE5-D1119D470060}.Why it does that, is another question!