Hello Roger, On Sep 22, 2011, at 16:25 , Roger KeIrad wrote:
> Hello, > It is me again. > I have some troubles with PHOTO for synchronised contact. > I used the same idea to extract encoded value to decode it. > I tried with GetValue and GetValueByID but no chance. Both should work (the PHOTO is not an array field). Just pass VALTYPE_BUF as type, and provide a buffer large enough to get the binary photo data. To find out in advance how large the buffer needs to be, just call GetValue once with a NULL pointer as buffer or zero buffer size. This will return the needed size in the aValSize parameter, which you can use to allocate a buffer large enough to get the entire PHOTO. If you pass a buffer that is too small for the entire PHOTO data, you'll get LOCERR_TRUNCATED status. The data you get is binary data, usually a JPG. If you save the data 1:1 into a file, any image viewer program should be able to show it. Best Regards, Lukas Lukas Zeller, plan44.ch [email protected] - www.plan44.ch _______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
