|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5
9 Z+ E a, Y3 _ d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明
! X1 u }, F8 m& j, X& c; z6 H% @; s6 h6 L% W( b$ Q6 h! E
当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
, N" O0 h4 J' s0 O" I的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )- D0 V) Q3 G; K
{/ g8 y6 Z A3 G/ u8 h
/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );
# z$ c! I1 [7 v& Y if( pMsg )
; K$ ]8 ~6 n1 g8 r6 E# c {8 ^, b% V j( I; } ^
::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
j) [" [% r& o pMsg->m_nMap = nMap;
; d; ^& y# |2 I& K) e strcpy( pMsg->m_szCmd, str );+ N6 S/ n3 u1 W
pMsg->m_pUserInfo = pUserInfo;4 H8 M6 f& m# F% c/ z4 V2 n
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数
$ K4 x# q& \/ X. J ::GlobalFree( pMsg );
" ^9 }4 j( U; R" @ }*/; ?4 K) |! v6 e7 N- f9 Z$ P' `. u# W3 u
tagDllMsgInfo Msg;9 o+ ^$ G4 C2 I3 o" |* H' Q8 U
::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
+ b) E8 H7 u" J) @ Msg.m_nMap = nMap;2 r9 }& c8 k! S
strcpy( Msg.m_szCmd, str );
s9 {3 @4 D" }" u6 e& b# X Msg.m_pUserInfo = pUserInfo;
. u% C- R! s: t2 l ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数
" L% d2 W" E4 b2 o" \& K T- u return 0;
* n4 L w- O p0 t; d3 }9 T} 这样修改对吗? |
|