|
发表于 2006-9-30 21:15:26
|
显示全部楼层
Db.cpp(3607) : error C2572: “DllChangeMap” : 重定义默认参数 : 参数 53 s) q- W' {0 X/ V2 ^
d:\pChat_DLL_Xajh111\Db.h(43) : 参见“DllChangeMap”的声明 C* @" w9 |! g! {
- d9 b9 x X n, r" h当我修改为LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 )3 U- v: N* r& u* g4 P" o
的时候出现这样的错误啊! LRESULT DllChangeMap( HWND hWnd, CString str, LPVOID pInfo, long nMap, long nType = 0 ). j. I# K9 \8 ~) z/ G" W [! @* a
{
; g) o# h4 d x9 I! Q/* tagDllMsgInfo* pMsg = (tagDllMsgInfo*)::GlobalAlloc( GPTR, sizeof(tagDllMsgInfo) );- o: g% Q4 Q- b+ O# I# v9 M* [
if( pMsg )$ r6 t- |/ x5 K8 Z2 H3 C
{
# I2 Y+ c' I+ U) G$ ]( S& R ::memset( pMsg, 0, sizeof(tagDllMsgInfo) );
$ W4 J4 H2 f; d1 z5 I pMsg->m_nMap = nMap;- i1 {& B1 V/ g* I& H' j6 j
strcpy( pMsg->m_szCmd, str );# q9 ] A$ t! l3 B
pMsg->m_pUserInfo = pUserInfo;: {/ x+ j& K& A
::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)pMsg, 0 ); //调用API函数% Z+ p; u9 X6 U6 m1 U& q" w
::GlobalFree( pMsg );' K8 v, o2 z1 v2 S( b
}*/
: U; b0 h; ?3 G, H tagDllMsgInfo Msg;8 j6 K# m. @7 y2 t9 U4 A
::memset( &Msg, 0, sizeof(tagDllMsgInfo) );0 T& c8 @9 {) [* ]" D! ^
Msg.m_nMap = nMap;
0 x+ R! p3 L* ^3 N0 q strcpy( Msg.m_szCmd, str );& T" G0 Y4 O* w8 x
Msg.m_pUserInfo = pUserInfo;
8 g' Q2 A4 F0 r" F3 V w7 z8 u( J4 M ::SendMessage( hWnd, WM_DLL_CHANGEMAP, (WPARAM)&Msg, 0 ); //调用API函数+ {; y' J: o) c. I- |
return 0;$ I8 {% {6 E& K: c
} 这样修改对吗? |
|