コード例 #1
0
ファイル: msvideo16.c プロジェクト: AmesianX/RosWine
/***********************************************************************
 *		ICSendMessage			[MSVIDEO.205]
 */
LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2)
{
    LRESULT     ret = ICERR_BADHANDLE;
    struct msvideo_thunk* thunk;

    if ((thunk = MSVIDEO_HasThunk(hic)))
    {
        WORD args[8];
        DWORD result;

        /* FIXME: original code was passing hdrv first and hic second */
        /* but this doesn't match what IC_Callback3216 does */
        args[7] = HIWORD(hic);
        args[6] = LOWORD(hic);
        args[5] = 0; /* the 32bit also sets it to NULL */
        args[4] = msg;
        args[3] = HIWORD(lParam1);
        args[2] = LOWORD(lParam1);
        args[1] = HIWORD(lParam2);
        args[0] = LOWORD(lParam2);
        WOWCallback16Ex( thunk->pfn16, WCB16_PASCAL, sizeof(args), args, &result );
        ret = result;
    }
    else
    {
        /* map the message for a 32 bit infrastructure, and pass it along */
        void*       data16 = MSVIDEO_MapMsg16To32(msg, &lParam1, &lParam2);

        ret = ICSendMessage(HIC_32(hic), msg, lParam1, lParam2);
        if (data16)
            MSVIDEO_UnmapMsg16To32(msg, data16, &lParam1, &lParam2);
    }
    return ret;
}
コード例 #2
0
ファイル: msvideo16.c プロジェクト: AmesianX/RosWine
/***********************************************************************
 *		ICInfo				[MSVIDEO.200]
 */
BOOL16 VFWAPI ICInfo16(DWORD fccType, DWORD fccHandler, ICINFO16 *lpicinfo)
{
    BOOL16 ret;
    LPVOID lpv;
    DWORD lParam = (DWORD)lpicinfo;
    DWORD size = ((ICINFO*)(MapSL((SEGPTR)lpicinfo)))->dwSize;

    /* Use the mapping functions to map the ICINFO structure */
    lpv = MSVIDEO_MapMsg16To32(ICM_GETINFO, &lParam, &size);

    ret = ICInfo(fccType, fccHandler, (ICINFO*)lParam);

    MSVIDEO_UnmapMsg16To32(ICM_GETINFO, lpv, &lParam, &size);

    return ret;
}
コード例 #3
0
ファイル: msvideo16.c プロジェクト: WASSUM/longene_travel
/***********************************************************************
 *		ICSendMessage			[MSVIDEO.205]
 */
LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2) 
{
    LRESULT     ret = ICERR_BADHANDLE;
    WINE_HIC*   whic;

    whic = MSVIDEO_GetHicPtr(HIC_32(hic));
    if (whic)
    {
        /* we've got a 16 bit driver proc... call it directly */
        if (whic->driverproc16)
        {
            WORD args[8];
            DWORD result;

            /* FIXME: original code was passing hdrv first and hic second */
            /* but this doesn't match what IC_Callback3216 does */
            args[7] = HIWORD(hic);
            args[6] = LOWORD(hic);
            args[5] = HDRVR_16(whic->hdrv);
            args[4] = msg;
            args[3] = HIWORD(lParam1);
            args[2] = LOWORD(lParam1);
            args[1] = HIWORD(lParam2);
            args[0] = LOWORD(lParam2);
            WOWCallback16Ex( whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &result );
            ret = result;
        }
        else
        {
            /* map the message for a 32 bit infrastructure, and pass it along */
            void*       data16 = MSVIDEO_MapMsg16To32(msg, &lParam1, &lParam2);
    
            ret = MSVIDEO_SendMessage(whic, msg, lParam1, lParam2);
            if (data16)
                MSVIDEO_UnmapMsg16To32(msg, data16, &lParam1, &lParam2);
        }
    }
    return ret;
}