OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
wskerr.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Winsock for OWL subsystem.
7/// Based on work by Paul Pedriana, 70541.3223@compuserve.com
8//----------------------------------------------------------------------------
9
10#if !defined(OWL_WSKERR_H)
11#define OWL_WSKERR_H
12
13#include <owl/private/defs.h>
14#if defined(BI_HAS_PRAGMA_ONCE)
15# pragma once
16#endif
17
18#include <owl/defs.h>
19
20
21namespace owl {
22
23#include <owl/preclass.h>
24
25//
26/// \class TSocketError
27// ~~~~~ ~~~~~~~~~~~~
28/// TSocketError converts Windows Sockets errors to string messages.
29//
31 public:
32 TSocketError(int error = 0, unsigned sizeToAllocate = 128);
33 virtual ~TSocketError();
34
37 friend bool operator ==(const TSocketError& socketError1,
39
40 void Init(int error);
41 int GetReasonValue() const;
42 const tchar* GetReasonString() const;
43
44 // !CQ this seems like too much general policy. Maybe in TXOwl? Or remove.
45 // Default to our own string (NULL argument).
46 tchar* AppendError(const tchar* stringToAppendErrorTo, tchar* destination = 0);
48
49 protected:
50 int Error; ///< Error code
51 size_t SizeToAllocate; ///< Size to allocate for String.
52 ///< Usually bigger than String so we can append to it.
53 tchar* String; ///< Error code converted to string
54 void GetErrorString(); ///< Convert the error code to string
55
56 private:
57 static TModule& GetModule(); ///< used for LoadString()
58};
59
60#include <owl/posclass.h>
61
62
63} // OWL namespace
64
65
66#endif // OWL_WSKERR_H
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TSocketError converts Windows Sockets errors to string messages.
Definition wskerr.h:30
int Error
Error code.
Definition wskerr.h:50
size_t SizeToAllocate
Size to allocate for String.
Definition wskerr.h:51
tchar * String
Error code converted to string.
Definition wskerr.h:53
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
char tchar
Definition defs.h:77
General definitions used by all ObjectWindows programs.
#define _OWLCLASS
Definition defs.h:338