Hi, I'm not quite shure if I'm doing something wrong or if the function "WriteFile" has a problem. The problem appears if I use WriteFile twice after eachother with the same String-Variable. In the first WriteFile-Call the String-Variable contains for example 1200 bytes and then I overwrite the string with 1000 bytes and call the WriteFile-Function again. In this case, the File written is bigger than 1000 bytes, it also contains the 200 bytes that were in the string before. There is a c-File with example code attached that produces the failure.