Changeset 1381


Ignore:
Timestamp:
Jun 22, 2007 11:30:44 AM (12 years ago)
Author:
bennylp
Message:

Fixed ticket #340: File access problem on WinCE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/file_access_win32.c

    r974 r1381  
    2626#include <time.h> 
    2727 
     28#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 
     29    /* WinCE lacks READ_CONTROL so we must use GENERIC_READ */ 
     30#   define CONTROL_ACCESS   GENERIC_READ 
     31#else 
     32#   define CONTROL_ACCESS   READ_CONTROL 
     33#endif 
     34 
     35 
    2836/* 
    2937 * pj_file_exists() 
     
    3745 
    3846    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)),  
    39                        READ_CONTROL,  
     47                       CONTROL_ACCESS,  
    4048                       FILE_SHARE_READ, NULL, 
    4149                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 
     
    6169 
    6270    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename, wfilename,sizeof(wfilename)),  
    63                        READ_CONTROL,  
     71                       CONTROL_ACCESS,  
    6472                       FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, 
    6573                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 
     
    170178 
    171179    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)),  
    172                        READ_CONTROL,  
     180                       CONTROL_ACCESS,  
    173181                       FILE_SHARE_READ, NULL, 
    174182                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 
Note: See TracChangeset for help on using the changeset viewer.