OK, you take a working sample code, remove and modify some parts and it does not work any more. That's what debugging is for ... . E.g. do you know what the value of size is in your write function?
↧