#include <mil.h>
int MosMain(void)
{
MIL_ID MilApplication,
MilSystem,
MilDisplay,
MilDigitizer,
MilImage;
MappAllocDefault(M_DEFAULT, &MilApplication, &MilSystem,
&MilDisplay, &MilDigitizer, &MilImage);
MdigGrabContinuous(MilDigitizer, MilImage);
MosPrintf(MIL_TEXT("\nDIGITIZER ACQUISITION:\n"));
MosPrintf(MIL_TEXT("----------------------\n\n"));
MosPrintf(MIL_TEXT("Continuous image grab in progress.\n"));
MosPrintf(MIL_TEXT("Press <Enter> to stop.\n\n"));
MosGetch();
MdigHalt(MilDigitizer);
MosPrintf(MIL_TEXT("Continuous grab stopped.\n\n"));
MosPrintf(MIL_TEXT("Press <Enter> to do a single image grab.\n\n"));
MosGetch();
MdigGrab(MilDigitizer, MilImage);
MosPrintf(MIL_TEXT("Displaying the grabbed image.\n"));
MosPrintf(MIL_TEXT("Press <Enter> to end.\n\n"));
MosGetch();
MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage);
return 0;
}