//sure it will be included only once
#ifndef _ATM_HWMAIN_H_
#define _ATM_HWMAIN_H_
#pragma once
//to speedup & reduce size
#define VC_EXTRALEAN
//export macros
#define DLL_EXPORT __declspec(dllexport)
//import macro
#define DLL_IMPORT __declspec(dllimport)
#include <windows.h>
//to export for C++ & C
#ifdef __cplusplus
extern "C"
{
#endif
//exported function
DLL_EXPORT float Relation( BYTE *Image , long nWidth , long nHeight , int th , BYTE *Model , int x , int y , int flag )
#ifdef __cplusplus
}
#endif
//EOF Header body
#endif
//*******************Kernel.h file**********************
.c如下:
#include "Kernel.h"
BOOL WINAPI DllMain(HINSTANCE hinstDLL, // DLL module handle
DWORD fdwReason, // for calling function
LPVOID lpvReserved // reserved
)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
default:
break;
}
return TRUE;
}
DLL_EXPORT float Relation( BYTE *Image , long nWidth , long nHeight , int th , BYTE *Model , int x , int y , int flag )
{
return 0;
}
//sure it will be included only once
#ifndef _ATM_HWMAIN_H_
#define _ATM_HWMAIN_H_
#pragma once
//to speedup & reduce size
#define VC_EXTRALEAN
//export macros
#define DLL_EXPORT __declspec(dllexport)
//import macro
#define DLL_IMPORT __declspec(dllimport)
#include <windows.h>
//to export for C++ & C
#ifdef __cplusplus
extern "C"
{
#endif
//exported function
DLL_EXPORT float Relation( BYTE *Image , long nWidth , long nHeight , int th , BYTE *Model , int x , int y , int flag )
#ifdef __cplusplus
}
#endif
//EOF Header body
#endif
//*******************Kernel.h file**********************
.c如下:
#include "Kernel.h"
BOOL WINAPI DllMain(HINSTANCE hinstDLL, // DLL module handle
DWORD fdwReason, // for calling function
LPVOID lpvReserved // reserved
)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
default:
break;
}
return TRUE;
}
DLL_EXPORT float Relation( BYTE *Image , long nWidth , long nHeight , int th , BYTE *Model , int x , int y , int flag )
{
return 0;
}