mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Fix for uuidtostring function.
This commit is contained in:
parent
3daf0a4015
commit
6a67ab2eb2
1 changed files with 10 additions and 4 deletions
|
|
@ -31,11 +31,17 @@ template<typename Type> struct UUIDGetter { static CLSID get() { jassertfalse; r
|
|||
#define __uuidof(x) UUIDGetter<x>::get()
|
||||
#endif
|
||||
|
||||
inline CLSID uuidFromString (const char* s) noexcept
|
||||
inline GUID uuidFromString (const char* const s) noexcept
|
||||
{
|
||||
CLSID c;
|
||||
UuidFromStringA ((unsigned char*) s, &c);
|
||||
return c;
|
||||
unsigned long p0;
|
||||
unsigned int p1, p2, p3, p4, p5, p6, p7, p8, p9, p10;
|
||||
|
||||
sscanf_s (s, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
&p0, &p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10);
|
||||
|
||||
GUID g = { p0, (uint16) p1, (uint16) p2, { (uint8) p3, (uint8) p4, (uint8) p5, (uint8) p6,
|
||||
(uint8) p7, (uint8) p8, (uint8) p9, (uint8) p10 }};
|
||||
return g;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue