OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
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
21
namespace
owl
{
22
23
#include <
owl/preclass.h
>
24
25
//
26
/// \class TSocketError
27
// ~~~~~ ~~~~~~~~~~~~
28
/// TSocketError converts Windows Sockets errors to string messages.
29
//
30
class
_OWLCLASS
TSocketError
{
31
public
:
32
TSocketError
(
int
error = 0,
unsigned
sizeToAllocate = 128);
33
virtual
~TSocketError
();
34
35
TSocketError
(
const
TSocketError
& src);
36
TSocketError
& operator =(
const
TSocketError
& src);
37
friend
bool
operator ==(
const
TSocketError
& socketError1,
38
const
TSocketError
& socketError2);
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);
47
tchar
*
AppendError
(
int
stringResourceToAppendErrorTo,
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
owl::TModule
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition
module.h:78
owl::TSocketError::GetErrorString
void GetErrorString()
Convert the error code to string.
Definition
wskerr.cpp:170
owl::TSocketError::GetReasonString
const tchar * GetReasonString() const
This function hands the pointer to the string to the caller.
Definition
wskerr.cpp:96
owl::TSocketError::GetReasonValue
int GetReasonValue() const
This function returns the error code.
Definition
wskerr.cpp:87
owl::TSocketError::Error
int Error
Error code.
Definition
wskerr.h:50
owl::TSocketError::SizeToAllocate
size_t SizeToAllocate
Size to allocate for String.
Definition
wskerr.h:51
owl::TSocketError::String
tchar * String
Error code converted to string.
Definition
wskerr.h:53
owl::TSocketError::TSocketError
TSocketError(int error=0, unsigned sizeToAllocate=128)
This function constructs the object with the error code and the size of the buffer to allocate.
Definition
wskerr.cpp:24
owl::TSocketError::Init
void Init(int error)
This function initializes the error code.
Definition
wskerr.cpp:78
owl::TSocketError::AppendError
tchar * AppendError(const tchar *stringToAppendErrorTo, tchar *destination=0)
This function appends the error string to whatever is in the string 'stringToAppendErrorTo' and put t...
Definition
wskerr.cpp:122
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::tchar
char tchar
Definition
defs.h:77
defs.h
General definitions used by all ObjectWindows programs.
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
include
owl
wskerr.h
Generated by
1.18.0