|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5. y. j9 U! w: D) O
d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明0 |8 l. r- F" q; b: D* n+ n0 h
3 d9 t- j. p) A2 Y9 o当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )3 a3 U3 t# \- W s) [ T( |! O5 ^# m; b
的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
7 p5 o# ~$ u7 J( A$ Y4 }. Z{' _2 o) v0 ?: m9 y
/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );+ J" V- m' {0 d+ w/ ?
if( pMsg )- P! p7 E q6 B' @/ s, _/ r
{. U4 {0 q& {, M/ _0 l, y, X$ |+ \
::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
8 O' X$ c# q7 M7 _- U0 Z2 p2 ~( _ pMsg->m_nMap = nMap;2 b/ x" T% }5 w
strcpy( pMsg->m_szCmd, str );9 S4 U6 t1 i0 A
pMsg->m_pUserInfo = pUserInfo;# a& V- J& E' W j- t
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数
7 _0 l- U- G$ t9 A- L& V: q( _. ~ ::GlobalFree( pMsg );! ]$ b$ w; l: K8 Q. |! m: W
}*/+ q+ ~4 \4 R8 Q, q" u2 ^( H
tagDllMsgInfo Msg;$ I: g4 y' M6 @# z: w- }( W5 {
::memset( &Msg, 0, sizeof(tagDllMsgInfo) );6 j; R. o0 L, q2 v) t# P. b
Msg.m_nMap = nMap;
; b1 n- T, [2 t/ r strcpy( Msg.m_szCmd, str );* w+ n: ~3 a# x) O& `, h
Msg.m_pUserInfo = pUserInfo;/ z5 v( A5 j/ t6 q
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数
* h- G+ o1 ^: `& D+ t4 A) l! W return 0;$ p8 C/ ]5 x c @" O7 s, ]7 ^. y9 c
} 这样修改对吗? |
|