53 static WORD
packVersion(
int major,
int minor) {
return MAKEWORD(major, minor); }
56 void CWSAStartup::init();
62 bool m_bVersionSupported;
64 BYTE m_requestedMajorVersion;
65 BYTE m_requestedMinorVersion;
CWSAStartup()
Calls WSAStartup to initialize Winsock for the default version: 2.1.
Definition: WSAStartup.cpp:8
static WORD packVersion(BYTE major, BYTE minor)
Definition: WSAStartup.h:52
std::wstring ErrorMessage() const
returns the error message text if there was an error, or an empty string if there was no error...
Definition: WSAStartup.cpp:136
bool initialized() const
returns true if Winsock was successfully initialized, false otherwise.
Definition: WSAStartup.cpp:67
Definition: WSAStartup.h:17
static BYTE minorVersion(WORD version)
Definition: WSAStartup.h:51
BYTE negotiatedMinorVersion() const
Definition: WSAStartup.cpp:106
~CWSAStartup()
Calls WSACleanup, if necessary.
Definition: WSAStartup.cpp:53
static WORD packVersion(int major, int minor)
Definition: WSAStartup.h:53
const WSADATA & WsaData() const
Definition: WSAStartup.cpp:124
WORD negotiatedVersion() const
returns the loaded version of Winsock support.
Definition: WSAStartup.cpp:96
BYTE negotiatedMajorVersion() const
Definition: WSAStartup.cpp:101
bool wasRequestedVersionNegotiated() const
returns true if Winsock was successfully initialized to use the requested version, false otherwise.
Definition: WSAStartup.cpp:61
int ErrorCode() const
returns the error code returnd from WSAStartup, 0 on success.
Definition: WSAStartup.cpp:130
static BYTE majorVersion(WORD version)
Definition: WSAStartup.h:50
WORD highestSupportedVersion() const
Definition: WSAStartup.cpp:76
static const int default_major_version
The application is written and built for this verion of Winsock.
Definition: WSAStartup.h:22
const long BYTE
Definition: File.h:147
static const int default_minor_version
Definition: WSAStartup.h:23
static const int default_version
Definition: WSAStartup.h:24