Changeset 14

Show
Ignore:
Timestamp:
12/19/07 11:02:35 (9 months ago)
Author:
Chris Miller
Message:

Fixed issue with COM stuff with Tango.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/dfl/drawing.d

    r7 r14  
    849849             IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED), false); 
    850850    } 
     851     
     852    /// ditto 
     853    Icon information() // getter 
     854    { 
     855        return new Icon(LoadImageA(null, IDI_INFORMATION, 
     856             IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED), false); 
     857    } 
    851858} 
    852859 
     
    13531360    { 
    13541361        dfl.internal.wincom.IPicture ipic; 
    1355         if(S_OK != OleLoadPicture(istm, 0, FALSE, &_IID_IPicture, cast(void**)&ipic)) 
    1356             return null; 
    1357         return ipic; 
     1362        switch(OleLoadPicture(istm, 0, FALSE, &_IID_IPicture, cast(void**)&ipic)) 
     1363        { 
     1364            case S_OK: 
     1365                return ipic; 
     1366             
     1367            debug(DFL_X) 
     1368            { 
     1369                case E_OUTOFMEMORY: 
     1370                    debug assert(0, "Picture: Out of memory"); 
     1371                    break; 
     1372                case E_NOINTERFACE: 
     1373                    debug assert(0, "Picture: The object does not support the interface"); 
     1374                    break; 
     1375                case E_UNEXPECTED: 
     1376                    debug assert(0, "Picture: Unexpected error"); 
     1377                    break; 
     1378                case E_POINTER: 
     1379                    debug assert(0, "Picture: Invalid pointer"); 
     1380                    break; 
     1381                case E_FAIL: 
     1382                    debug assert(0, "Picture: Fail"); 
     1383                    break; 
     1384            } 
     1385             
     1386            default: ; 
     1387        } 
     1388        return null; 
    13581389    } 
    13591390     
  • trunk/win32/dfl/internal/com.d

    r7 r14  
    8383            version(Tango) 
    8484            { 
    85                 read = stm.input.read(pv[0 .. cb]); 
     85                read = stm.read(pv[0 .. cb]); 
    8686            } 
    8787            else 
     
    112112            version(Tango) 
    113113            { 
    114                 written = stm.output.write(pv[0 .. cb]); 
     114                written = stm.write(pv[0 .. cb]); 
    115115            } 
    116116            else 
     
    230230    { 
    231231        // Ignore -grfCommitFlags- and just flush the stream.. 
    232         version(Tango) 
    233         { 
    234             stm.output.flush(); 
    235         } 
    236         else 
    237         { 
    238             stm.flush(); 
    239         } 
     232        stm.flush(); 
    240233        return S_OK; // ? 
    241234    } 
  • trunk/win32/dfl/internal/winapi.d

    r13 r14  
    15701570    const LPCSTR IDI_QUESTION = cast(LPCSTR)32514; 
    15711571    const LPCSTR IDI_EXCLAMATION = cast(LPCSTR)32515; 
     1572    const LPCSTR IDI_ASTERISK = cast(LPCSTR)32516; 
     1573    const LPCSTR IDI_INFORMATION = IDI_ASTERISK; 
    15721574     
    15731575