- wrapper: fix append mode in win_fopen() (2nd try)

svn path=/trunk/boinc_samples/; revision=13614
This commit is contained in:
David Anderson 2007-09-20 20:32:33 +00:00
parent fea864af4d
commit 2d3be1dd51
2 changed files with 8 additions and 1 deletions

View File

@ -461,3 +461,9 @@ David 12 Sept 2007
uc_graphics.C
wrapper/
wrapper.C
David 20 Sept 2007
- wrapper: fix append mode in win_fopen() (2nd try)
wrapper/
wrapper.C

View File

@ -173,7 +173,7 @@ HANDLE win_fopen(const char* path, const char* mode) {
0, 0
);
} else if (!strcmp(mode, "a")) {
return CreateFile(
HANDLE happend = CreateFile(
path,
GENERIC_WRITE,
FILE_SHARE_WRITE,
@ -182,6 +182,7 @@ HANDLE win_fopen(const char* path, const char* mode) {
0, 0
);
SetFilePointer(hAppend, 0, NULL, FILE_END);
return hAppend;
} else {
return 0;
}