Fill stub of CheckDeviceState

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Fix buffer sharing error and add comment

Signed-off-by: Axel Davy <axel.davy@ens.fr>