|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5* m: [7 d- f. w4 b6 j. R3 V6 G
d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明
3 p' h7 X T0 Z( I' S4 ]) I
# F2 \6 r6 ~3 x* _当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
2 P( n9 F0 B: S的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
% b) m) s3 y# R8 R: z{
9 H; E. [# b1 |, y( L- l1 D/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );
' v/ P- d* @0 T, ]; K if( pMsg )+ t4 `4 g3 R: ?3 E
{
5 o: T4 _# a* t# q, ?3 j ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );; ?. b N) R) @5 U! q9 y
pMsg->m_nMap = nMap;: x7 I9 D/ O: j! A9 a0 a
strcpy( pMsg->m_szCmd, str );
2 I8 ~. _) I9 F% I9 n0 \2 w# n, ` pMsg->m_pUserInfo = pUserInfo;
3 \: F! o$ j. M: K; i ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数
/ l, @* ~- r- ^9 B ::GlobalFree( pMsg );
, P! a! z( o% ]- n }*/
& t' M8 C2 m. z$ d/ [ tagDllMsgInfo Msg;
: s2 P1 Q, [ |/ ? ::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
( K( C) K) p9 M- d* s% B6 T Msg.m_nMap = nMap;! G+ l1 Y! H* g
strcpy( Msg.m_szCmd, str );( l+ j0 n3 j# H: ]
Msg.m_pUserInfo = pUserInfo;
- Q: [% w& l4 [ ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数$ E8 s9 f$ ~6 z5 n0 P/ b3 a
return 0;
* i! `' D* C0 B) {6 ?) R# R# d} 这样修改对吗? |
|