Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed file that shouldn't be there.
[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__)
13     
14 #else
15     
16 #include <stdio.h>
17     
18     wxString Result;
19     
20     FILE *uuid_hdl = popen("uuidgen", "r");
21     
22     if (uuid_hdl == NULL) {
23         return Result;
24     }
25     
26     char strdata[64];
27     std::string uuidout;
28     
29     size_t readsize;
30     int size = 0;
31     int maxsize = 63;
32     
33     while (fgets(strdata, sizeof(strdata), uuid_hdl) != NULL){
34         uuidout.append(strdata);
35     }
36     
37     pclose(uuid_hdl);
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