|
|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 5
- c5 x! U( Q* P- p: C9 w d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明4 J0 Q# g7 n$ ]* q2 l
# s% J. H( W0 J, O z* w% H当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 ) l- `& P* W$ t% y& H
的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 ); e" U0 h& D9 N: y
{
7 k/ r1 e& e4 S/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );7 Z/ {# {3 o- V0 j
if( pMsg )9 n+ ]# Y; [9 v& \. j
{' F- `) H2 s8 m
::memset( pMsg, 0, sizeof(tagDllMsgInfo) );3 k# D% \% z, O5 T
pMsg->m_nMap = nMap;0 O; z; s0 R/ w( p; V
strcpy( pMsg->m_szCmd, str );
% W9 H# s- X5 C; `; t pMsg->m_pUserInfo = pUserInfo;
) |8 S( T0 ?/ B ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数. @* `6 U6 @) E% U
::GlobalFree( pMsg );/ O5 o2 y' U5 M, |( B/ w' e
}*/
6 \! _1 y- Z! y) ?% e tagDllMsgInfo Msg;' a+ D* m) [# l [
::memset( &Msg, 0, sizeof(tagDllMsgInfo) );5 d/ b: i- k! x0 P% N8 C: t
Msg.m_nMap = nMap;: N; y: D6 c- f" q7 @
strcpy( Msg.m_szCmd, str );
) T: q4 K0 \9 q+ b2 R Msg.m_pUserInfo = pUserInfo;
' ~8 H1 F& U) T* W/ b0 [ ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数7 |0 I9 W8 H: f. ]+ S4 t4 }
return 0;/ S* {: ]( U/ ]& a; e2 U# Z
} 这样修改对吗? |
|