Hi, how can I convert a ePR_ENTRYID to a string ? For now I am using this : llTemp = pRows->aRow[0].lpProps[ePR_ENTRYID].Value.li.QuadPart; LONG t1 = (LONG)(llTemp % (LONGLONG)1000000000); LONG t2 = (LONG)((llTemp / (LONGLONG)1000000000) % (LONGLONG)1000000000); LONG t3 = (LONG)((llTemp / (LONGLONG)1000000000) / (LONGLONG)1000000000); sprintf( pId, "%u%09lu%09lu", t3, t2, t1 ); but I am now very confident in it.
Hi mosfet, > how can I convert a ePR_ENTRYID to a string ? > For now I am using this : > > llTemp = pRows->aRow[0].lpProps[ePR_ENTRYID].Value.li.QuadPart; > LONG t1 = (LONG)(llTemp % (LONGLONG)1000000000); > LONG t2 = (LONG)((llTemp / (LONGLONG)1000000000) % > (LONGLONG)1000000000); > LONG t3 = (LONG)((llTemp / (LONGLONG)1000000000) / > (LONGLONG)1000000000); > sprintf( pId, "%u%09lu%09lu", t3, t2, t1 ); HexFromBin is your friend. But be aware that it is lying with its parameter types. It tells you it uses LPTSTR but in reality it is LPSTR. So if you build Unicode you need to cast that type. -- SvenC