.h文件编译时出错,现将.h文件给出,兄弟帮忙看看(100分)

  • 主题发起人 主题发起人 lance0909
  • 开始时间 开始时间
L

lance0909

Unregistered / Unconfirmed
GUEST, unregistred user!
#ifndef _PROTOCOL_
#define _PROTOCOL_
/*******************************************************/
/*---------------------- response----------------------*/
#define mRight 0x81
#define mReIn 0x82
#define mEot 0x83
#define mBusy 0x84 //Module response
#define hRight 0x81
#define hReIn 0x82
#define hEot 0x83 //Host response
/*---------------------- command----------------------*/
#define Reset 0x00
#define Status 0x01
#define Enroll 0x03
#define GenTzz 0x04
#define do
wnMb 0x05
#define do
wnTz 0x06
#define UpMb 0x07
#define UpTz 0x08
#define Store 0x09
#define LdBuf 0x0a
#define Verify 0x0b
#define QuickSearch 0x0c
#define Search 0x0d
#define EraseOne 0x0e
#define EraseAll 0x0f
#define GenImg 0x10
#define UpImg 0x11
#define SetAddr 0x12
#define Signature 0x13
#define SecuLevel 0x14
#define DeviceKey 0x15
#define Free 0x16
#define StorePage 0x17
#define LoadPage 0x18
#define SysLowSet 0x81
#define SysHighSet 0x82
#define SetPwd 0x02
#define GetInfo 0x20
/*--------------------PkgID----------------------*/
#define Cmd 0x1<<0
#define Data 0x1<<1
#define EndData 0x1<<3
struct TZDP
{
int hres;
int zres;
int direct;
char flag;
};
struct CMD
{
unsigned char PkgId;
unsigned char Address[2];
unsigned char PkgLen;
unsigned char PkgCnt[128];
unsigned char Jyh[2];
};
struct SCMD
{
unsigned char sPkgId;
unsigned char sAddress[2];
unsigned char sPkgLen;
unsigned char sPkgCnt[128];
unsigned char sJyh[2];
};
__declspec (dllimport) HANDLE HCOM[8];
{{{{{{出错的地方}}}}}}
/*--------------------function---------------------*/
bool InitCom(int comport);
bool InitComHigh(int comport);
void ReleaseCom(int comport);
int GetPkgByte(int comport,unsigned char *TranChar);
int SendPkgByte(int comport,unsigned char TranChar);
int GetPackage(int comport,CMD *cmd);
int SendPackage(int comport,SCMD scmd);
int SensorReset(int comport);
int SensorStatus(int comport,unsigned char* St0,unsigned char* St1);
int SensorEnroll(int comport);
int SensorGenTzz(int comport);
int SensorDownMb(int comport,int nummb,TZDP mb[],int DampMbLock);
int SensorDownTz(int comport,int numtzd,TZDP tzd[],int DampFinger);
int SensorUpMb(int comport,int* nummb,TZDP mb[],int* DampMbLock);
int SensorUpTz(int comport,int* numtzd,TZDP tzd[],int* DampFinger);
int SensorStore(int comport,int address);
int SensorLdBuf(int comport,int address);
int SensorVerify(int comport);
int SensorQuickSearch(int comport);
int SensorSearch(int comport);
int SensorEraseOne(int comport,int address);
int SensorEraseAll(int comport);
int SensorGenImg(int comport);
int SensorUpImg(int comport,unsigned char image[128][128],int* DampFinger);
//300pix/inch,0-180 gray
int SensorSetAddr(int comport,unsigned char Addr0,unsigned char Addr1);
int SensorSignature(int comport,unsigned char Sign[128]);
int SensorSecuLevel(int comport,unsigned char Level);
int SensorDeviceKey(int comport,unsigned char OldPwd[8],unsigned char NewPwd[8]);
int SensorFree(int comport);
int SensorLoadPage(int comport,unsigned char cc[256],int page) ;
int SensorStorePage(int comport,unsigned char cc[256],int page);
int YanZ(int comport,bool *cont);
int DenL(int comport,int id,bool *cont);
int SensorHighSet(int comport,char dmperror,int drawlevel,intdo
or,int mbdoor,int grade,int intquick,int frd);
int SensorLowSet(int comport,char dmperror,int drawlevel,intdo
or,int mbdoor,int grade,int intquick,int frd);
unsigned char WriteBMP(char* file,unsigned char Input[128][128]);
//----add for sm2-b-----
int SensorSetPwd(int comport,unsigned char NewPwd[8]);
int SensorGetInfo(int comport,unsigned char *info);
/*********************************************************************/
#endif
 
编译时什么错误说清楚。
 
#ifndef _PROTOCOL_
#define _PROTOCOL_
#include <windows.h>//加这个。
.............
 

#include <windows.h>
__declspec (dllimport) HANDLE HCOM[8];
最好采用函数导出指向数据的指针!
 
后退
顶部