创建DLL的问题
侠雨飞飞 2001-07-24 05:53:52 自建的DLL
在声明共巷数据段处老出问题:(
#include "stdafx.h"
#include "afxdllx.h"
#include "mousehook.h"
#pragma data_seg("mydata")
HWND glhPrevTarWnd=NULL; //此处显示错误
HWND glhDisplayWnd=NULL;
HHOOK glhHook=NULL;
HINSTANCE glhInstance=NULL;
#pragma data_seg()
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
。。。。
错误提示如下:
D:\mousehook\mousehook.cpp(9) : error C2146: syntax error : missing ';' before identifier 'glhPrevTarWnd'
D:\mousehook\mousehook.cpp(9) : error C2377: 'HWND' : redefinition; typedef cannot be overloaded with any other symbol
c:\program files\microsoft visual studio\vc98\include\windef.h(195) : see declaration of 'HWND'
D:\mousehook\mousehook.cpp(9) : fatal error C1004: unexpected end of file found
怎么回事?