|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5
, B6 ^" s( Q+ L; d0 j d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明! P$ c" ?. ]$ S8 P1 d( p9 \1 ]
" ^3 _. ^; U+ f h9 o
当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
5 z4 \: Y5 s) P# r3 n的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )* E" O& w8 k& D4 O6 o9 `, A
{
2 ?9 p0 p0 O: \3 {" x/ U/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );
4 d* B: }4 j3 |2 I2 K if( pMsg )5 S5 O" u+ ^8 j/ x8 N
{
8 K& P$ [) U4 F ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );9 Q% M. a3 \. ]/ N/ h
pMsg->m_nMap = nMap;5 D" A3 ~9 t5 [! K+ I! O7 m3 U% [
strcpy( pMsg->m_szCmd, str );9 y" y, I" ~% @6 {& K( ? K
pMsg->m_pUserInfo = pUserInfo;
6 u6 x7 g) k* r. C7 T- ^- W- D0 t ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数
' w4 f" T) {0 Z) n. T ::GlobalFree( pMsg );+ a1 G w) S2 @% J" F' _
}*/
! }# ^& z9 _, A# `3 n% Y: m$ W% P" H tagDllMsgInfo Msg;
8 p4 {% i, Q7 f ::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
! W- w( Q9 N6 [+ N8 { {5 V+ {$ {( I' q5 W Msg.m_nMap = nMap;
! H2 l! Z+ ]- b7 m7 D2 Q strcpy( Msg.m_szCmd, str );: q! s8 o9 ? O$ D2 u8 {& t) W' c
Msg.m_pUserInfo = pUserInfo;
8 @$ t8 {: h! n) M( x% n ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数
, @/ s2 m" S% t return 0;5 `! R3 m3 @# O5 f( h5 D# y% X. I
} 这样修改对吗? |
|