stdafx.h file 

// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__A3BAD4AD_F5AE_11D1_8FE9_6CD504C1BC01__INCLUDED_)
#define AFX_STDAFX_H__A3BAD4AD_F5AE_11D1_8FE9_6CD504C1BC01__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers


#define _WIN32_WINNT 0x0400 

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC OLE automation classes
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include <afxsock.h>		// MFC socket extensions


//declaration files for ATL base classes
#include <atlbase.h>  
//external linkage for CComModule
extern CComModule _Module;
//ActiveX Template Library include
#include <atlcom.h>

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__A3BAD4AD_F5AE_11D1_8FE9_6CD504C1BC01__INCLUDED_)

// stdafx.cpp : source file that includes just the standard includes
//	Modbucfg.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"
#include <atlimpl.cpp> 


XXXApp.cpp file 

CComModule _Module;



add files to project 

AutoModbus.cpp 
modbus.cpp  
OleSafeArray.cpp
Performancecouter.cpp
crc16.cpp


