Append to a file

Discuss PocketC for CE (including Desktop Edition)

Postby joh.becker on Mon Jan 20, 2003 6:21 am

I struggle with appending to a file. The file gets always newly created instead of appended. The attributes at fileopen are FILE_CREATE | FILE_NOTRUNCATE | FILE_WRITE. I tried other combinations without success.

Does anyone know the trick?

Posts: 86
Joined: Tue Apr 17, 2001 6:51 am
Location: Germany

Postby guy on Mon Jan 20, 2003 10:12 am

Try opening the file with FILE_READWRITE.

I don't know what Kevin does with the file mode that you pass to him, the actual Windows CE API function has a set of flags that are completely different. You would use the OPEN_ALWAYS flag which only creates the file if it doesn't exist, the file would only be truncated if you explicitly requested it by including the TRUNCATE_EXISTING flag.

PocketC CE API interface:
PCForm and CE API forum:
PocketC CE API interface:
PCForm and CE API forum:
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 3 guests