|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 56 Q6 ?6 R- \; B9 p U8 T+ s
d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明
! V \- X4 ]. y5 B
$ {4 l& T* e" T k5 @5 \当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )
0 S# T2 \! @# T/ b; L' M的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )- {6 y; ]: H( n9 Z% p4 G0 a0 y8 I
{ ]' ~+ S5 E. f2 Y1 \8 G4 w
/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );' F* x$ f9 A d2 B3 i6 V' r
if( pMsg )6 s* u' i& J- c- j% g
{
4 R, q- A @, X( X; Z2 t5 G, l: [ ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
4 {+ Z* ?, ]+ T# n+ ]& g" x& _ pMsg->m_nMap = nMap;2 k* H8 |' g9 C G" r2 T F
strcpy( pMsg->m_szCmd, str );
' F# h8 ]1 T; t3 U pMsg->m_pUserInfo = pUserInfo;: n, T5 U7 I L
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数( T4 g) A5 |$ _- |
::GlobalFree( pMsg );
1 J# X p2 F/ U2 D: V! C }*/
: h. @$ x% r( ?7 u' [* T tagDllMsgInfo Msg;9 ?0 P% y8 i+ `8 g1 u( A3 S
::memset( &Msg, 0, sizeof(tagDllMsgInfo) );
8 ^8 {: h( B" Z9 ?" W. o Msg.m_nMap = nMap;
1 ?. [7 l! v- i% K$ } strcpy( Msg.m_szCmd, str );
6 n* f9 i5 l/ m% @ Msg.m_pUserInfo = pUserInfo;8 A C$ r0 h9 e- W* D* L
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数+ l4 A. e- B# f& ^( ~7 p( B
return 0;- ] x$ w, |0 D) V5 m5 N6 n
} 这样修改对吗? |
|