www.pudn.com > 3D_OnlineGame_Humen.rar > InitInternet.cpp
//
//初始化連接網絡部分,新的線程部分
//
#include "stdafx.h"
#include "XMudClient.h"
#include "InitInternet.h"
#include "StartGameMenu.h"
#include "CommunicateMsg.h"
#include "FacePlate.h"
#include "InterNetMsg.h"
#include "OtherePlayerCmd.h"
//add header file
#include "wgs\common.h"
#include "wgs\WGS.h"
//end
SOCKADDR_IN stRSvrName;
BOOL g_bInternConnect = FALSE;
char szSendBuf[INPUT_SIZE];
char g_szReceive[INPUT_SIZE];
BOOL bCloseSocket;
SOCKET hLCltForRSvrSock=INVALID_SOCKET;
CRITICAL_SECTION csMaplist;
extern int nSrvPort;
extern CRITICAL_SECTION csSrvMsg;
extern int g_nReceiveMsgState;
extern char g_szReceive[];//主動接收服務器的數據串
extern char g_tszPathName[256];
extern rmfullglobals myglobs;
extern CStartGameMenu m_StartGameMenu;
extern BOOL g_GetSameMove;
void CPmudNet_End(void)
{
wgs.Release();
}
void OpenIE(char * szWhere)
{
HKEY key;
LONG result;
char strPath[512];
DWORD type, size = 512;
result = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\IE4\\Setup",
0, KEY_READ, &key );
if( ERROR_SUCCESS != result ){
result = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\IE5\\Setup",
0, KEY_READ, &key );
}
result = RegQueryValueEx( key, "Path", NULL, &type,
(LPBYTE)strPath, &size );
RegCloseKey( key );
strcat( strPath, "\\Iexplore ");
CString msg = CString(szWhere);
strcat(strPath, msg);
WinExec(strPath,SW_MINIMIZE);
}