//+---------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1994.
//
//  File:       tc1632.cxx
//
//  Notes:      This file is automatically generated
//      Do not modify by hand
//
//  History:    Fri May 27 10:39:02 1994        Generated
//
//----------------------------------------------------------------------------

#include <headers.cxx>
#pragma hdrstop

DWORD ThunkCall1632(THUNKINFO *pti)
{
    DWORD dwReturn;
    thkAssert(pti->pvfn != NULL);
    thkAssert(*pti->pThop == THOP_END);
    pti->pThop++;
    thkAssert(*pti->pThop == THOP_ROUTINEINDEX);
    pti->pThop++;
    if (FAILED(pti->scResult))
    {
        return (DWORD)pti->scResult;
    }
    pti->pThkMgr->SetThkState(THKSTATE_NOCALL);
    switch(*pti->pThop)
    {
    case 0:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8)
            );
        break;
    case 1:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0)
            );
        break;
    case 2:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12)
            );
        break;
    case 3:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4)
            );
        break;
    case 4:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20),
            *(DWORD *)(pti->s32.pbStart+24)
            );
        break;
    case 5:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16)
            );
        break;
    case 6:
        dwReturn = (*(DWORD (__stdcall *)())pti->pvfn)(
            );
        break;
    case 7:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20)
            );
        break;
    case 8:
        dwReturn = (*(DWORD (__stdcall *)(
                WORD,
                WORD,
                DWORD))pti->pvfn)(
            *(WORD *)(pti->s32.pbStart+0),
            *(WORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8)
            );
        break;
    case 9:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                ULARGE_INTEGER,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20)
            );
        break;
    case 10:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                ULARGE_INTEGER))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+4)
            );
        break;
    case 11:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                ULARGE_INTEGER,
                ULARGE_INTEGER,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+4),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+20)
            );
        break;
    case 12:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                ULARGE_INTEGER,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16)
            );
        break;
    case 13:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                ULARGE_INTEGER,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(ULARGE_INTEGER *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20)
            );
        break;
    case 14:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20),
            *(DWORD *)(pti->s32.pbStart+24),
            *(DWORD *)(pti->s32.pbStart+28),
            *(DWORD *)(pti->s32.pbStart+32),
            *(DWORD *)(pti->s32.pbStart+36),
            *(DWORD *)(pti->s32.pbStart+40)
            );
        break;
    case 15:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                SIZEL,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(SIZEL *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+20)
            );
        break;
    case 16:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                SIZEL,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(SIZEL *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+16)
            );
        break;
    case 17:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                WORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(WORD *)(pti->s32.pbStart+8)
            );
        break;
    case 18:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                SIZEL))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(SIZEL *)(pti->s32.pbStart+4)
            );
        break;
    case 19:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                WORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(WORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8)
            );
        break;
    case 20:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(DWORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20),
            *(DWORD *)(pti->s32.pbStart+24),
            *(DWORD *)(pti->s32.pbStart+28)
            );
        break;
    case 21:
        dwReturn = (*(DWORD (__stdcall *)(
                DWORD,
                WORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD,
                DWORD))pti->pvfn)(
            *(DWORD *)(pti->s32.pbStart+0),
            *(WORD *)(pti->s32.pbStart+4),
            *(DWORD *)(pti->s32.pbStart+8),
            *(DWORD *)(pti->s32.pbStart+12),
            *(DWORD *)(pti->s32.pbStart+16),
            *(DWORD *)(pti->s32.pbStart+20),
            *(DWORD *)(pti->s32.pbStart+24)
            );
        break;
    }

#if DBG == 1
    if ( !pti->fResultThunked && FAILED(dwReturn) )
    {
        thkDebugOut((DEB_FAILURES,
                     "ThunkCall1632 pvfn = %08lX Probably failed hr = %08lX\n",
                     pti->pvfn, dwReturn));
    }

#endif

    pti->pThkMgr->SetThkState(THKSTATE_INVOKETHKOUT32);
    return dwReturn;
}
