// // Mapping the base 85 string to the base 64 string through GUID. // char * String85_To_String64( const char *string85, char * buf, int len ) { GUID guid; if (getGuidFromString85 (string85, &guid)) { return getString64FromGuid (&guid, buf, len); } return 0; }
char* IFCBuilder::CreateCompressedGuidString() { char * buf = (char *) malloc(23); GUID guid = GUID_NULL; // // Call to the function from Microsoft // CoCreateGuid(&guid); if (memcmp(&GUID_NULL, &guid, sizeof (GUID)) == 0) { return NULL; } return getString64FromGuid (&guid, buf); }
// // Creation of the string representing the GUID, the buffer must be able // to hold 22 characters + 1 for the terminating 0 // char * CreateCompressedGuidString( char * buf, int len ) { GUID guid; guid = GUID_NULL; // // Call to the function from Microsoft // getGuid(&guid); if (memcmp (&GUID_NULL, &guid, sizeof (GUID)) == 0) { return 0; } return getString64FromGuid (&guid, buf, len); }
std::wstring CreateCompressedGuidString22() { GUID guid = GUID_NULL; char guid_buf[23]; int len = 23; // Call to the function from Microsoft getGuid(&guid); if (memcmp (&GUID_NULL, &guid, sizeof (GUID)) == 0) { return 0; } std::string guid_str = getString64FromGuid (&guid, guid_buf, len); std::wstring guid_wstr; guid_wstr.assign(guid_str.begin(), guid_str.end()); return guid_wstr; }