Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Initial import of code already done for Xestia Address Book
[xestiaab/.git] / source / common / uuid.cpp
1 #include <wx/wx.h>
3 wxString GenerateUUID()
4 {
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__)
14 #else
16 #include <ossp/uuid++.hh>
18         uuid_t *uuid;
19         uuid_create(&uuid);
20         char *strdata;
21         
22         //strdata = ;
23         
24         strdata = NULL;
25         
26         uuid_make(uuid, UUID_MAKE_V4);
27         uuid_export(uuid, UUID_FMT_STR, &strdata, NULL);
28         uuid_destroy(uuid);
29         
30         wxString Result = wxString::FromUTF8(strdata);
32         delete strdata;
33         strdata = NULL;
34         
35 #endif
37         return Result;
39 }
41 bool CheckUUID(wxString UUIDInc)
42 {
44         bool Result = FALSE;
45         
46         return Result;
48 }
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