本文整理汇总了C++中CDPSrvr::LoadAddrPmttd方法的典型用法代码示例。如果您正苦于以下问题:C++ CDPSrvr::LoadAddrPmttd方法的具体用法?C++ CDPSrvr::LoadAddrPmttd怎么用?C++ CDPSrvr::LoadAddrPmttd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDPSrvr
的用法示例。
在下文中一共展示了CDPSrvr::LoadAddrPmttd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
//.........这里部分代码省略.........
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = false;
}
}
break;
/*
#ifdef __S0114_RELOADPRO
case IDT_RELOAD_PROJECT:
{
if( g_dpSrvr.m_bReloadPro )
g_DbManager.Load_ReloadAccount();
}
break;
#endif // __S0114_RELOADPRO
*/
case IDT_BUYING_INFO:
CBuyingInfoMng::GetInstance()->Process();
break;
}
}
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case IDM_OPT_INTERNAL:
{
HMENU hMenu = GetMenu( hWnd );
CheckMenuItem( hMenu, IDM_OPT_INTERNAL, MF_CHECKED );
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_DISABLED | MF_GRAYED );
CheckMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_UNCHECKED );
EnableMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = true;
break;
}
case IDM_OPT_EXTERNAL:
{
HMENU hMenu = GetMenu( hWnd );
CheckMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_CHECKED );
EnableMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_DISABLED | MF_GRAYED );
CheckMenuItem( hMenu, IDM_OPT_INTERNAL, MF_UNCHECKED );
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = false;
break;
}
case IDM_OPT_MAX_CONN:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_MAX_CONN ), hWnd, MaxConnDlgProc );
break;
}
case IDM_OPT_TOGGLE:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_TOGGLE ), hWnd, ToggleDlgProc );
break;
}
case IDM_OPT_SETTIME:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_TIME ), hWnd, SetTimeDlgProc );
break;
}
case IDM_OPT_INTERNAL_IP:
{
g_dpSrvr.LoadAddrPmttd( "pmttd.ini" );
g_dpSrvr.LoadIPCut( "IPCut.ini" );
break;
}
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
g_MyTrace.Paint( hdc );
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
KillTimer( hMainWnd, IDT_SENDPLAYERCOUNT );
if( ::GetLanguage() == LANG_THA )
KillTimer( hMainWnd, IDT_PREVENT_EXCESS );
/*
#ifdef __S0114_RELOADPRO
KillTimer( hMainWnd, IDT_RELOAD_PROJECT );
#endif // __S0114_RELOADPRO
*/
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
示例2: InitInstance
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
#ifndef _DEBUG
// InitEH();
#endif // _DEBUG
#ifdef __BILLING0712
if( ::CreateBillingMgr() == FALSE ) // CreateWindow전에 호출되어야 한다.
return FALSE;
#endif
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hMainWnd = hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if( !hWnd )
return FALSE;
HMENU hMenu = GetMenu( hWnd );
CheckMenuItem( hMenu, IDM_OPT_INTERNAL, MF_CHECKED );
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_DISABLED | MF_GRAYED );
g_dpSrvr.m_bCheckAddr = true;
int x = 400, y = 416;
SetWindowPos( hWnd, NULL, x, y, 400, 416, SWP_SHOWWINDOW );
LOAD_WS2_32_DLL;
::srand( timeGetTime() );
// Script함수의 호출순서가 중요하다. (menu -> script -> createdbworker)
if( Script( "AccountServer.ini" ) == FALSE )
return FALSE;
#ifdef __SECURITY_0628
LoadResAuth( "Flyff.b" );
#endif // __SECURITY_0628
// if( CQuery::EnableConnectionPooling() )
// OutputDebugString( "EnableConnectionPooling\n" );
g_DbManager.CreateDbWorkers();
if( g_dpSrvr.LoadAddrPmttd( "pmttd.ini" ) == false )
{
TRACE("LoadAddrPmttd false\n");
}
if( g_dpSrvr.LoadIPCut( "IPCut.ini" ) == FALSE )
{
TRACE( "LoadIPCut FALSE\n" );
}
g_MyTrace.Initialize( hWnd, "SquireD", RGB( 0x00, 0x00, 0x00 ), RGB( 0xff, 0xff, 0xff ) );
CTime time = CTime::GetCurrentTime();
g_MyTrace.Add( 0, FALSE, "%s", time.Format( "%Y/%m/%d %H:%M:%S" ) );
g_MyTrace.AddLine( '\0' );
if( FALSE == g_dpSrvr.StartServer( PN_ACCOUNTSRVR_0 )
|| FALSE == g_dpDbSrvr.StartServer( PN_ACCOUNTSRVR_1 )
|| FALSE == CDPAdbill::GetInstance()->StartServer( PN_ADBILL )
/*
#ifdef __GIFTBOX0213
|| FALSE == CDPWldSrvr::GetInstance()->StartServer( PN_ACCOUNTSRVR_2 )
#endif // __GIFTBOX0213
*/
)
{
AfxMessageBox( "Unable to start server" );
return FALSE;
}
#ifdef __BILLING0712
if( GetBillingMgr()->Init( hWnd ) == false )
return FALSE;
#endif
SetTimer( hWnd, IDT_SENDPLAYERCOUNT, 1000 * 60, NULL );
SetTimer( hWnd, IDT_TIME_CHECKADDR, 1000 * 30, NULL );
if( ::GetLanguage() == LANG_THA )
SetTimer( hWnd, IDT_PREVENT_EXCESS, 1000 * 60, NULL );
/*
#ifdef __S0114_RELOADPRO
SetTimer( hWnd, IDT_RELOAD_PROJECT, 1000 * 30, NULL );
#endif // __S0114_RELOADPRO
*/
SetTimer( hWnd, IDT_BUYING_INFO, 500, NULL );
if( FALSE == g_DbManager.AllOff() )
return FALSE;
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}