Click here to Skip to main content
15,878,945 members
Articles / Desktop Programming / MFC

The Ultimate TCP/IP Home Page

Rate me:
Please Sign up or sign in to vote.
4.98/5 (77 votes)
25 Aug 2007CPOL13 min read 2.5M   45.4K   267  
Ultimate TCP-IP is now Open Source
#ifndef __STDAFX_H__INCLUDED
#define __STDAFX_H__INCLUDED

// This file is included in all .CPP implementation files to
// maintain compatibility with MFC and pre-compiled headers.
// If you're building an MFC application you will not need 
// this file as the Application AppWizard will automatically
// generate one for you. 
//
// Also note that ".\" -- the current working directory -- has
// been added to the project's "Additional include directories" list
// (found in the project build settings). This is needed since the
// files in the Ultimate TCP/IP v4.2 source directory include the
// "stdafx.h" header file which does not exist in the source
// directory. Adding ".\" to the list of additional include
// directories tells the compiler to search the project directory
// for "stdafx.h" (in addition to the other standard include
// directories)

#ifndef _WINSOCK_2_0_
    // WINSOCK 1.1
    // When you you want to include winsock 1,1
    // the you need to link or load winsock.lib 
    // (for 16 bit apps)  or wsock32.lib ( 32 bit apps)
    #pragma comment(lib, "wsock32.lib")
    #include <winsock.h>        //use for Winsock v1.x
    #define WINSOCKVER  MAKEWORD(1,1)
#else
    // WINSOCK 2.0
    // When you you want to include winsock 2.0
    // the you need to link or load ws2_32.lib 
    // (There is only a 32 bit version of it )
    #pragma comment(lib, "ws2_32.lib")
    #include <winsock2.h>     //use for Winsock v2.x
    #define WINSOCKVER    MAKEWORD(2,0)
#endif

#include "stdutfx.h"	// standard ultimate TCP macros etc


#include <windows.h>

#endif // __STDAFX_H__INCLUDED


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Canada Canada
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.

Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
This is a Organisation

476 members

Comments and Discussions