Updated desktop samples for latest API changes