Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code so that OSX is now supported.
[xestiaab/.git] / source / common / uuid.cpp
1 #include <wx/wx.h>
3 wxString GenerateUUID()
4 {
5     
6 #if defined(__WIN32__)
7     UUID UUIDData;
8     UuidCreate(&UUIDData);
9     wchar_t* UUIDStr = 0;
10     UuidToString(&UUIDData, (RPC_WSTR*)&UUIDStr);
11     wxString Result(UUIDStr);
12 #elif defined(__HAIKU__)
13     
14 #elif defined(__APPLE__)
15     
16     wxString Result;
17     
18 #else
19     
20 #include <ossp/uuid++.hh>
21     
22     uuid_t *uuid;
23     uuid_create(&uuid);
24     char *strdata;
25     
26     //strdata = ;
27     
28     strdata = NULL;
29     
30     uuid_make(uuid, UUID_MAKE_V4);
31     uuid_export(uuid, UUID_FMT_STR, &strdata, NULL);
32     uuid_destroy(uuid);
33     
34     wxString Result = wxString::FromUTF8(strdata);
35     
36     delete strdata;
37     strdata = NULL;
38     
39 #endif
40     
41     return Result;
42     
43 }
45 bool CheckUUID(wxString UUIDInc)
46 {
47     
48     bool Result = FALSE;
49     
50     return Result;
51     
52 }
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy