Exemple #1
0
/******************************************************************
 *		IC_Callback3216
 *
 *
 */
static  LRESULT CALLBACK  IC_Callback3216(DWORD pfn16, HIC hic, HDRVR hdrv, UINT msg, LPARAM lp1, LPARAM lp2)
{
    WORD args[8];
    DWORD ret = 0;

    switch (msg)
    {
    case DRV_OPEN:
        lp2 = (DWORD)MapLS((void*)lp2);
        break;
    }
    args[7] = HIWORD(hic);
    args[6] = LOWORD(hic);
    args[5] = HDRVR_16(hdrv);
    args[4] = msg;
    args[3] = HIWORD(lp1);
    args[2] = LOWORD(lp1);
    args[1] = HIWORD(lp2);
    args[0] = LOWORD(lp2);
    WOWCallback16Ex( pfn16, WCB16_PASCAL, sizeof(args), args, &ret );

    switch (msg)
    {
    case DRV_OPEN:
        UnMapLS(lp2);
        break;
    }
    return ret;
}
Exemple #2
0
/******************************************************************
 *		IC_Callback3216
 *
 *
 */
static  LRESULT CALLBACK  IC_Callback3216(HIC hic, HDRVR hdrv, UINT msg, DWORD lp1, DWORD lp2)
{
    WINE_HIC*   whic;
    WORD args[8];

    whic = MSVIDEO_GetHicPtr(hic);
    if (whic)
    {
        DWORD ret = 0;
        switch (msg)
        {
        case DRV_OPEN:
            lp2 = (DWORD)MapLS((void*)lp2);
            break;
        }
        args[7] = HIWORD(hic);
        args[6] = LOWORD(hic);
        args[5] = HDRVR_16(whic->hdrv);
        args[4] = msg;
        args[3] = HIWORD(lp1);
        args[2] = LOWORD(lp1);
        args[1] = HIWORD(lp2);
        args[0] = LOWORD(lp2);
        WOWCallback16Ex( whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &ret );

        switch (msg)
        {
        case DRV_OPEN:
            UnMapLS(lp2);
            break;
        }
        return ret;
    }
    else return ICERR_BADHANDLE;
}
Exemple #3
0
/***********************************************************************
 *		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;
}