|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5
! c0 T. c2 ~$ C5 q3 W; p4 B d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明0 e: N8 y& l! g4 [4 W8 B: p
; m' k; x4 O/ v! B2 l
当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
8 H8 R" {5 U8 I# l. g* B的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
" h/ i) f9 f/ E! }! U{5 d6 u |" J' k% @- s: p
/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );
6 N: V% S' G/ P t! \! m6 V% E) K1 n7 O if( pMsg )
1 s/ J! L+ C- Z {
% ^0 Q& C/ m2 V9 i( i! a' m ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
# _+ @# {* J2 B; B! v. l; z# Q pMsg->m_nMap = nMap;) p( b( k! X. a1 I0 Q
strcpy( pMsg->m_szCmd, str );
2 u E/ B: [7 k9 m' j! R pMsg->m_pUserInfo = pUserInfo;
; X4 L3 b4 k5 l7 |1 e ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数
+ S5 {" ~1 r. F/ ?$ R+ j ::GlobalFree( pMsg );
% @8 s5 |7 d8 [ }*/- G- w2 S. w, P1 g; F6 S
tagDllMsgInfo Msg;
& i; a7 g) h2 N! N1 x ::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
# w+ J. {2 F( [1 Q+ e Msg.m_nMap = nMap;7 V5 i6 h8 W: h0 y5 O) {1 o
strcpy( Msg.m_szCmd, str );5 w9 `; E4 Q6 x+ x5 V! S; [
Msg.m_pUserInfo = pUserInfo;- r# |5 M. }" i1 V; Y! g
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数
4 U! {1 e- E+ ^+ h/ c& | return 0;4 s, L! P+ z# R2 ?) t8 P7 ~
} 这样修改对吗? |
|