Windows.ApplicationModel.Contacts.ContactManager.requestStoreAsync()
.then(function (cs) {
cs.findContactsAsync(strSearch).then(function (list) {
list[0].thumbnail.openReadAsync().done(function (thmb) {
with (new FileReader) {
onloadend = function () {
data.picture = 'url(' + result + ')';
postMessage(data);
};
readAsDataURL(MSApp.createBlobFromRandomAccessStream("image/png", thmb));
}
});
})
}, function () {
console.log(arguments);
});