|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5
9 h- b' a; I0 X# ~7 z d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明
% y- M# S- P8 e. Z Y
2 V. b+ Z5 C; Y* t# e4 f8 n当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )4 t; r7 l; R9 `
的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 ) H7 I3 I I. a* |2 ]9 y3 t
{
1 L, x& p3 _9 u! K1 s* _5 t/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );) E1 a A0 E0 @
if( pMsg )! A, Y R: s0 o' A1 N
{
. R, R( I$ t% x ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
5 C+ ~7 @1 h1 A7 b pMsg->m_nMap = nMap;
+ P: o& p$ s* E, `$ W8 R' G strcpy( pMsg->m_szCmd, str );1 p0 U! H* q, D; Q
pMsg->m_pUserInfo = pUserInfo;
4 [/ A8 H5 t& k4 x. V4 \& B ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数0 p& S6 r5 P* l
::GlobalFree( pMsg );% H+ v$ t' W" Q7 K, [2 y' v( k
}*/+ u8 ~" I, K3 T% b, G$ P8 G2 S2 C9 H
tagDllMsgInfo Msg;
9 E4 h% ?4 X* A* A+ Q) G ::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
/ x& B+ @' {1 b Msg.m_nMap = nMap;9 R. b& @# N& n) h# g
strcpy( Msg.m_szCmd, str );2 p/ t6 e0 m& h( R/ \) g) I
Msg.m_pUserInfo = pUserInfo;5 P% U' u" K* r7 z$ ]- d3 z4 s
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数% z! ?2 g/ }: i/ n) G
return 0;
; ~1 M6 j; L1 M+ J} 这样修改对吗? |
|