/*->c.dsm */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "swis.h"
#include "h.os"
#include "h.bbc"
#include "h.wimpt"
#include "h.werr"
#include "h.kernel"


#include "h.TWAIN"  /* for TW data type defines */

#include "h.common"


#include "h.glue"   /* for function prototypes */
#include "h.con"    /* common lib of container routines */




TW_UINT16 DSM_Entry(pTW_IDENTITY pOrigin,pTW_IDENTITY pDest,TW_UINT32 DG,
                    TW_UINT16 DAT,TW_UINT16 MSG,TW_MEMREF pData)
{
 _kernel_oserror  *  err;
 _kernel_swi_regs    rx;

 rx.r[0]=(int)pOrigin;
 rx.r[1]=(int)pDest;
 rx.r[2]=(int)DG;
 rx.r[3]=(int)DAT;
 rx.r[4]=(int)MSG;
 rx.r[5]=(int)pData;

 err=_kernel_swi(TWAIN_DSM,&rx,&rx);

 if(err) return(TWRC_FAILURE);
 else    return(rx.r[0]);
}


