// ADSmartIO_load_sample.cpp
//
// Demonstrates how to use the adsmartio_load files to
// dynamically load ASDmartIO functions.  This ensures
// application portability across all ADS platforms.
//
// The debug version of this application displays what
// functions were successfully linked.
//
// r14nov02 ak
//

#include "stdafx.h"
#include "ADSmartIO_load.h"

//-------------------------------------------------------------------
//-------------------------------------------------------------------
int WINAPI WinMain(	HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					LPTSTR    lpCmdLine,
					int       nCmdShow)
{

	RETAILMSG (1,(L"\r\n* ADSmartIO_load_sample.exe\r\n"));

	if (int LinkErrors = LoadADSmartIOFunctions())
		RETAILMSG(TRUE,(L"! %d ADSmartIO functions failed to link.\r\n",LinkErrors));
	
	RETAILMSG (1,(L"\r\n* Device type %x, firmware version %x rev %c\r\n",
					SIOReadDevicePartType(), 
					SIOFirmwareVersion(), 
					SIOReadDeviceVersion()));

	
	RETAILMSG (1,(L"\r\n* ADSmartIO_load_sample.exe complete.\r\n"));

	return 0;

}
