Ignore:
Timestamp:
Mar 5, 2014 6:48:59 AM (8 years ago)
Author:
riza
Message:

Re #1704:

  • Fix duplicate code on os_winphone.h
  • Change the use of PJ_WIN32_WINPHONE to follow the code convention
  • Fix incorrect link of the Thread library
  • Handle exception raised from select() API. However the break window will still be shown when debugging on Visual Studio. To disable it, from Debug>Exceptions>Win32 Exceptions> unmark the "An invalid handle was specified” exception.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/winphone/pjlib/src/pj/file_access_win32.c

    r4629 r4777  
    3636static pj_status_t get_file_size(HANDLE hFile, pj_off_t *size) 
    3737{ 
    38 #ifdef PJ_WIN32_WINPHONE   
    39     FILE_STANDARD_INFO fileInfo; 
    40  
    41     if (GetFileInformationByHandleEx(hFile, FileStandardInfo, &fileInfo, 
    42                                      sizeof(FILE_STANDARD_INFO)))  
     38#if defined(PJ_WIN32_WINPHONE) && PJ_WIN32_WINPHONE   
     39    FILE_COMPRESSION_INFO fileInfo; 
     40 
     41    if (GetFileInformationByHandleEx(hFile, FileCompressionInfo, &fileInfo, 
     42                                     sizeof(FILE_COMPRESSION_INFO)))  
    4343    { 
    44         *size = fileInfo.AllocationSize.QuadPart;        
     44        *size = fileInfo.CompressedFileSize.QuadPart;    
    4545    } else {     
    4646        *size = -1; 
     
    7171                                 HANDLE template_file) 
    7272{ 
    73 #ifdef PJ_WIN32_WINPHONE 
     73#if defined(PJ_WIN32_WINPHONE) && PJ_WIN32_WINPHONE 
    7474    PJ_UNUSED_ARG(security_attributes); 
    7575    PJ_UNUSED_ARG(flags_and_attributes); 
     
    216216    HANDLE hFile; 
    217217    FILETIME creationTime, accessTime, writeTime; 
    218 #ifdef PJ_WIN32_WINPHONE 
     218#if defined(PJ_WIN32_WINPHONE) && PJ_WIN32_WINPHONE 
    219219    FILE_BASIC_INFO fileInfo; 
    220220#endif 
     
    234234        return PJ_RETURN_OS_ERROR(GetLastError()); 
    235235    } 
    236 #ifdef PJ_WIN32_WINPHONE 
     236#if defined(PJ_WIN32_WINPHONE) && PJ_WIN32_WINPHONE 
    237237    if (GetFileInformationByHandleEx(hFile, FileBasicInfo, &fileInfo, 
    238238                                     sizeof(FILE_BASIC_INFO)))  
Note: See TracChangeset for help on using the changeset viewer.