Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
tcpsock.cpp
Package: fchess_src.zip [view]
Upload User: hy11688
Upload Date: 2007-01-08
Package Size: 81k
Code Size: 1k
Category:
Chess Poker games
Development Platform:
Visual C++
- // tcpsock.cpp : Defines the initialization routines for the DLL.
- //
- #include "stdafx.h"
- #include <afxdllx.h>
- #include "winsock.h"
- #include "ts.h"
- #include "estdlg.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- static AFX_EXTENSION_MODULE tcpsockDLL = { NULL, NULL };
- extern "C" int APIENTRY
- DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- TRACE0("TCPSOCK.DLL Initializing!n");
- // Extension DLL one-time initialization
- AfxInitExtensionModule(tcpsockDLL, hInstance);
- // Insert this DLL into the resource chain
- new CDynLinkLibrary(tcpsockDLL);
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- TRACE0("TCPSOCK.DLL Terminating!n");
- }
- return 1; // ok
- }
- BOOL EstComm(CTCPSocket* ptsEst,
- SOCKET sockEst,
- CWnd* pP,
- LPCSTR lpszOtherName,
- BOOL fListen)
- {
- HINSTANCE hInstRes=AfxGetResourceHandle();
- AfxSetResourceHandle(tcpsockDLL.hModule);
- CEstDlg dlg(ptsEst,lpszOtherName,pP,sockEst);
- dlg.m_fInitListen=fListen;
- BOOL fOK=(dlg.DoModal()==IDOK);
- AfxSetResourceHandle(hInstRes);
- ptsEst->CloseListenSocket();
- return fOK;
- }