_MSC_FULL_VER
as well as _MSC_VER
via JETBYTE_LATEST_TESTED_FULL_COMPILER_VERSION
to determine compatibility. JETBYTE_DEPRECATE_BUFFER_LIST
which defaults to 1 and removes support for JetByteTools::IO::CBufferList. JETBYTE_DEPRECATE_HIXIE_WEBSOCKETS
which defaults to 1 and removes support for HIXIE76 support from JetByteTools::WebSocket. DEPRECATE_BUFFER_CHAIN_METHODS
which defaults to 1 and removes support for several methods in JetByteTools::IO::CBufferChain. DEPRECATE_BUFFER_PROCESSOR_METHODS
which defaults to 1 and removes support for several methods in JetByteTools::IO::CBufferProcessor. JETBYTE_DEPRECATE_NON_POOLED_BUFFER
from 0 to 1 so that JetByteTools::IO::CNonPooledBuffer is no longer available by default. JETBYTE_DEPRECATE_REGISTRY_CONFIGURATION
which defaults to 1 and removes support for JetByteTools::Win32::CRegistryConfiguration. JETBYTE_MULTIPLE_RANGE_REUSABLE_ID_MANAGER_VALIDATE_FREED_IDS
which defaults to 1 and enables validation. Some performance can be gained by disabling this. JETBYTE_SMART_POINTER_DUMP_ON_NULL_REFERENCE
which defaults to 0 and when set to 1 enables mini dump creation when a null smart pointer is dereferenced. JETBYTE_REFERENCE_COUNTED_SMART_POINTER_DUMP_ON_NULL_REFERENCE
which defaults to 0 and when set to 1 enables mini dump creation when a null reference counted smart pointer is dereferenced. VS2013_PREVIEW_BROKEN_ISPRINT
. override
rather than virtual
for implementations of virtual functions in derived classes. JETBYTE_DISABLE_POOLING_BUFFER_ALLOCATOR
which defaults to 0 and when set disables all pooling in buffer allocators. JETBYTE_CHECK_BUFFER_VALIDITY_ON_EVERY_ACCESS
which defaults to 0 and when set causes each access to a buffer to check for 'validity' (i.e. that the buffer is active and hasn't been released back to the allocator. JETBYTE_SHOW_ADMIN_CONFIG_DETAILS
which determines if Admin.cpp displays all of the config settings or just some. This defaults defaults to 0 which causes the more limited dispaly. JETBYTE_HAS_INTERLOCKED_64
as it's true on all supported platforms now. JETBYTE_WARN_ON_SOCKADDR_STORAGE_DEF
and JETBYTE_WARN_ON_WSPIAPI_COUNTOF_DEF
as these are no longer relevant. JETBYTE_PERF_STREAM_SOCKETS_SKIP_EVENT_ON_HANDLE
, JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_EVENT_ON_HANDLE
and JETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLE
as these are always enabled now. JETBYTE_PERF_STREAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
and JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
as these are always enabled now. Marshalling was only required to work around Windows XP's I/O cancellation on thread termination policy. JETBYTE_DEPRECATE_SHARED_CRITICAL_SECTIONS
, JETBYTE_DEPRECATE_SHARED_LOCK_SOCKETS
, JETBYTE_DEPRECATE_CRITICAL_SECTION_2
, JETBYTE_DEPRECATE_LOW_CONTENTION_BUFFER_ALLOCATOR
, and JETBYTE_DEPRECATE_TLS_BUFFER_ALLOCATOR
as these features are no longer available. SecureCRT.h
as it's no longer required. It was used to map differences between the Visual Studio 2005 CRT and the "new" secure CRT. SuppressLNK4221Warning()
, which can be put into a file in order suppress the MS Visual C++ Linker warning 4221 - "warning LNK4221: no public symbols found; archive member will be inaccessible" JETBYTE_INTRUSIVE_RED_BLACK_TREE_INTERNAL_STATE_FAILURE_EXCEPTIONS
by default. JETBYTE_INSTALL_PER_THREAD_ERROR_HANDLER_IN_CTHREAD
which defaults to 1 and when set installs a JetByteTools::Win32::CPerThreadErrorLog object onto all JetByteTools::Win32::CThread object's threads. JETBYTE_ILLEGAL_BUFFER_USER_DATA_EXCEPTIONS
which defaults to 0 and when set turns on range checking for user data indices in JetByteTools::IO::CBuffer and an index out of range exception is thrown if necessary. JETBYTE_DUMP_NAMED_INDEX_DETAILS_ON_LOCK
which defaults to 0 and when set causes the names of named indices to be dumped to the default debug trace log when the indices are locked for the first time. This can be useful in tracking down mismatches between different named index providers. JETBYTE_BREAK_SEH_EXCEPTION_TRANSLATOR_COMPATABILITY
which defaults to 1 and when set adds an unused int
to the signature of the constructor for JetByteTools::Win32::CSEHException::Translator. To continue using JetByteTools::Win32::CSEHException::Translator you should pass 0
to its constructor. Consider updating these handlers by using JetByteTools::Win32::CPerThreadErrorLog instead as it offers superior functionality. JETBYTE_TRACK_ADDRESS_REFERENCES
which defaults to 0 and when set enables reference tracking of JetByteTools::Socket::CAddressImpl objects in the same way that tracking can be enabled for sockets and buffers. JETBYTE_STREAM_SOCKETS_DISPATCH_OTHER_SOCKETS_DURING_COMPLETION_HANDLING
and JETBYTE_DATAGRAM_SOCKETS_DISPATCH_OTHER_SOCKETS_DURING_COMPLETION_HANDLING
which both default to 0 and this changes the default behaviour from previous releases. These control how we deal with dispatching operations from other sockets whilst dispatching events from a socket... This only affects designs where one connection can write to another connection. In such a design, in earlier versions, we would allow processing of operations from the 'other' connection whilst we're processing operations from the main connection. For example. If we're in the read completion handler for a connection and we issue a read on another connection and that read completes immediately, inline, then we would begin to handle the completion and end up in the read completion handler for the other socket. This could cause issues with lock inversions if each connection needs to take out locks. The new default is to NOT handle the inline completions for the 'other' socket inline but instead to queue them until after the current socket's operation handler completes. You can revert to the old behaviour by setting these to 1 in your Config.h file. JETBYTE_TRACE_STREAM_SOCKET_INTERNAL_ABORTS
which defaults to 0 and when set logs all calls to CStreamSocket::AbortConnection()
to the debug trace log. UINT_PTR
and ULONG_PTR
to Types.h std::min
and std::max
to support Visual Studio 2013. JETBYTE_BUFFER_TRACKING_INSTANCES
and JETBYTE_SOCKET_TRACKING_INSTANCES
which default to 1 but allow the reference tracking debug code to track details of reference counts across multiple instances (uses) of the same buffer or socket object. This can help track particularly gnarly reference count bugs. JETBYTE_SMART_POINTER_THROW_ON_NULL_REFERENCE
which causes TConditionalSmartPointer<T>
to throw exceptions if you attempt to dereference a null pointer. JETBYTE_PERF_STREAM_SOCKETS_LIMIT_IO_RECURSION_TO
as we now queue operations that complete inline and guarantee that recursion never occurs for stream sockets and datagram connection manager sockets. The datagram version of the define, JETBYTE_PERF_DATAGRAM_SOCKETS_LIMIT_IO_RECURSION_TO
, is still valid as we still use recursion prevention in the datagram socket server code. ENABLE_SOCKET_IDENTIFIERS
which causes JetByteTools::Socket::TAsyncSocket::GetIdentifier() to exist. This returns a string representation of a socket's "identifier" (a value that is unique for the life of the socket). This value can be used in traces to link the debug traces for a specific connection. Note that this is automatically defined if trace definitions that require it are defined. JETBYTE_CRASH_DUMP_ON_NEXT_BUFFER_REF_CHANGE_AFTER_ILLEGAL_CHANGE
and JETBYTE_CRASH_DUMP_ON_NEXT_SOCKET_REF_CHANGE_AFTER_ILLEGAL_CHANGE
which cause crash dumps to be created the next time AddRef()
or Release()
is called on a socket or buffer after an illegal ref count change (over-release or under-release) has been detected. JETBYTE_DEFAULT_PURE_CALL_HANDLER_INSTALL_ON_EARLY_COMPILERS
since we no longer support the compilers that required it. JETBYTE_DEPRECATE_IN_ORDER_BUFFER_LIST
which currently defaults to 0 and which, when defined to 1, removes the JetByteTools::IO::CInOrderBufferList from the source tree. You should replace usages of this class with one of the buffer processors, probably JetByteTools::IO::CSortedBufferProcessor. The define is currently only present to aid in locating and removing all usages of the list. It will actually be deprecated in the next release. JETBYTE_DEPRECATE_SEQUENTIAL_BUFFER_LIST
which defaults to 1 and which removes the JetByteTools::IO::CSequentialBufferList from the source tree. You should use JetByteTools::IO::CBufferChain instead. JETBYTE_DEPRECATE_SHARED_LOCK_SOCKETS
which defaults to 1 and which removes sockets which share locks based on a lock factory. The resource limits that were present in NT4 are long gone and this code is considerably less performant and more complex than using sockets which each have their own locks. JETBYTE_DEPRECATE_SHARED_CRITICAL_SECTIONS
which defaults to 1 and which removes the entire concept of shared locks from the source tree. Note that this requires JETBYTE_DEPRECATE_SHARED_LOCK_SOCKETS
to also be set to 1. JETBYTE_DEPRECATE_CRITICAL_SECTION
which defaults to 0 and which, when defined to 1, removes JetByteTools::Win32::CCriticalSection and associated interfaces from the source tree. You should replace usages of this class with one of the new lock classes, see Win32Tools for details; such as JetByteTools::Win32::CLockableObject or JetByteTools::Win32::CLockableObject, etc. The define is currently only present to aid in locating and removing all usages of the class though it will likely be deprecated in the next release. JETBYTE_DEPRECATE_CRITICAL_SECTION_2
which defaults to 1 and which removes the JetByteTools::Win32::CCriticalSection2 class from the source tree. Note that this class is no longer considered to be safe and usage should be replaced by one of the supported lock types. JETBYTE_DEPRECATE_LOW_CONTENTION_BUFFER_ALLOCATOR
which defaults to 1 and which removes the JetByteTools::IO::CLowContentionBufferAllocator class from the source tree. Use one of the other allocators and the per socket pooling functionality. JETBYTE_DEPRECATE_TLS_BUFFER_ALLOCATOR
which defaults to 1 and which removes the JetByteTools::IO::CLowContentionBufferAllocator class from the source tree. Use one of the other allocators and the per socket pooling functionality. JETBYTE_DEPRECATE_DEFLATING_STREAM_SOCKET_FILTER
which defaults to 1 and which removes the JetByteTools::Socket::CDeflatingStreamSocketConnectionFilter class from the source tree. This class is no longer required now that support for the WebSocket "deflate-stream" extension has been deprecated. If you require "deflate" functionality for a TCP server then use the JetByteTools::Socket::CCompressingStreamSocketConnectionFilter instead. JETBYTE_LOCKABLE_OBJECT_CHECK_FOR_REENTRANT_USE
which defaults to 0. If defined as 1 then JetByteTools::Win32::CLockableObject will throw an exception if it detects reentrant usage. If defined as 0 the the lock may simply deadlock itself (if its implementation is a SRW lock (Vista or later)). When defined to 1 the lock is less efficient as it needs to track the locking thread. JETBYTE_LOCKABLE_OBJECT_CHECK_FOR_REENTRANT_USE_DEBUG_BREAK
which defaults to 0. If defined as 1 then this causes JETBYTE_LOCKABLE_OBJECT_CHECK_FOR_REENTRANT_USE
to be defined as 1 if not already. If a reentrant use is detected a DebugBreak()
is executed. isprint()
. See here for details of the problem and fix it by defining VS2013_PREVIEW_BROKEN_ISPRINT
to 1 in your Config.h JETBYTE_TERMINATE_CRASH_DUMP_CREATION
and JETBYTE_UNEXPECTED_CRASH_DUMP_CREATION
which determine if JetByteTools::Win32::CGlobalErrorHandler will create crash dumps if std::terminate
or std::unexpected
are called. JETBYTE_WEBSOCKET_ALLOW_BAD_SPACES_IN_HIXIE76_HANDSHAKE
which allows our WebSocket code to deal with Hixie76 clients that don't strictly conform to the spec. JETBYTE_TRACE_STREAM_SOCKET_READ_ERRORS_TO_DEBUG_LOG
, and JETBYTE_TRACE_STREAM_SOCKET_WRITE_ERRORS_TO_DEBUG_LOG
. JETBYTE_CAN_ENABLE_SKIP_COMPLETION_PORT_ON_SUCCESS_DEBUG
with a default of 0. This displays debugging information as JetByteTools::Socket::CanEnableSkipCompletionPortOnSuccess() enumerates the installed network providers. JETBYTE_CAN_ENABLE_SKIP_COMPLETION_PORT_ON_SUCCESS_DISPLAY_FAILURE_REASON
with a default of 1. This causes JetByteTools::Socket::CanEnableSkipCompletionPortOnSuccess() to display the network provider that prevents FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
from being enabled. JETBYTE_TRACE_SOCKET_READ_AND_WRITE_DATA_TO_DEBUG_LOG
, JETBYTE_TRACE_STREAM_SOCKET_READ_TO_DEBUG_LOG
, JETBYTE_TRACE_STREAM_SOCKET_WRITE_TO_DEBUG_LOG
, JETBYTE_TRACE_DATAGRAM_SOCKET_READ_TO_DEBUG_LOG
and JETBYTE_TRACE_DATAGRAM_SOCKET_WRITE_TO_DEBUG_LOG
, all with a default of 0. These provide less debug output than the equivalent "DUMP" defines and were introduced in 6.5.2 JETBYTE_REFERENCE_TRACKING_DISPLAY_ONLY_NON_TOOLS_LIB_CHANGES
with a default of 0. When set to 1 any reference changes that occurred in JetByteTools code will be stripped from the report generated when JETBYTE_TRACK_IO_BUFFER_REFERENCES
or JETBYTE_TRACK_SOCKET_REFERENCES
are defined. JETBYTE_ZLIB_1_2_5
- enabled by default. From this release TinyXML version 2.6.2 is available and is used by default in XMLTools. If you would prefer to continue to use TinyXML 2.6.1, 2.5.3 or 2.5.2 then define JETBYTE_TINY_XML_2_6_2
to 0 in your Config.h JETBYTE_ZLIB_1_2_5
- enabled by default. From this release ZLib version 1.2.5 is available and is used by default in ZLibTools. If you would prefer to continue to use ZLib 1.2.3 then define JETBYTE_ZLIB_1_2_5
to 0 in your Config.h JETBYTE_DUMP_STREAM_SOCKET_READ_TO_DEBUG_LOG
, JETBYTE_DUMP_STREAM_SOCKET_WRITE_TO_DEBUG_LOG
, JETBYTE_DUMP_DATAGRAM_SOCKET_READ_TO_DEBUG_LOG
and JETBYTE_DUMP_DATAGRAM_SOCKET_WRITE_TO_DEBUG_LOG
which all default to the value set for JETBYTE_DUMP_SOCKET_READ_AND_WRITE_DATA_TO_DEBUG_LOG
and allow you to tune the data that is dumped by selectively enabling the dumping rather than enabling dumping of all data. JETBYTE_USE_TEMPLATE_TO_STRING
is no longer supported. JETBYTE_AUTOMATIC_SEH_CRASH_DUMP_CREATION
with a default of 0. When set to 1 all CSEHExceptions will generate a crash dump when they are created, so at the point where they are converted from Windows SEH exceptions to C++ exceptions. JETBYTE_PURE_CALL_CRASH_DUMP_CREATION
with a default of 0. When set to 1 purecalls will generate a crash dump. JETBYTE_PURE_CALL_CRASH_DUMP_CREATION
with a default of 0. When set to 1 purecalls will generate a crash dump. JETBYTE_ILLEGAL_BUFFER_REFERENCE_COUNT_CRASH_DUMP_CREATION
with a default of 0. When set to 1 any I/O buffer over-release will generate a crash dump. JETBYTE_ILLEGAL_SOCKET_REFERENCE_COUNT_CRASH_DUMP_CREATION
with a default of 0. When set to 1 any socket over-release or increment from 0 will generate a crash dump. JETBYTE_REENTRANT_SINGLE_WRITER_MULTIPLE_READER_LOCK_2_MAX_THREADS
with a default of 100. This is used to configure the number of threads that can be tracked by an instance of JetByteTools::Win32::CReentrantSingleWriterMultipleReaderLock2 JETBYTE_TRACK_THREAD_NAMES
with a default of 0. When set to 1 JetByteTools::Win32::CThread will keep track of all threads that are named using JetByteTools::Win32::CThread::SetThreadName() and return these details, thread Id and name, from a call to JetByteTools::Win32::CThread::GetThreadNames(). static_assert
if it's available and otherwise uses code that has been lifted from boost. JETBYTE_HAS_INTERLOCKED_64
, this was only being set if the code was being compiled for x64 rather than for any operating system after XP SP1. Note that this change doesn't affect you if you were explicitly setting this value in your Config.h only if you were relying on the defaults. JETBYTE_TINY_XML_2_6_1
- enabled by default. From this release TinyXML version 2.6.1 is available and is used by default in XMLTools. If you would prefer to continue to use TinyXML 2.5.3 or 2.5.2 then define JETBYTE_TINY_XML_2_6_1
to 0 in your Config.h JETBYTE_PERF_STREAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
to 0 to disable this option for stream sockets and JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
to disable this option for datagram sockets. JETBYTE_PERF_REUSE_DATAGRAM_SOCKET_AND_BUFFER_FOR_NEXT_READ_IF_POSSIBLE
to 1 in your Config.h JETBYTE_PERF_TIMER_QUEUE_MONITORING
and JETBYTE_PERF_TIMER_WHEEL_MONITORING
to 1 in Config.h. Monitoring of contention can also be enabled by setting JETBYTE_PERF_TIMER_CONTENTION_MONITORING
to 1. Contention monitoring is disabled by default as it adjusts how locks are taken and could reduce performance slightly. JETBYTE_PERF_NO_ACTIVE_BUFFER_LIST
to 1 in your Config.h and the allocator doesn't maintain an active buffer list. This improves performance fractionally. JETBYTE_PERF_BUFFER_ALLOCATION_CONTENTION_MONITORING
to 1 in your Config.h. JETBYTE_PERF_STREAM_SOCKETS_LIMIT_IO_RECURSION_TO
and JETBYTE_PERF_DATAGRAM_SOCKETS_LIMIT_IO_RECURSION_TO
which can be used to prevent uncontrolled recursion when JETBYTE_PERF_STREAM_SOCKETS_SKIP_COMPLETION_PORT_ON_SUCCESS
and JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_COMPLETION_PORT_ON_SUCCESS
are enabled. Config.h
and disabled by defining them to 0; the default state if you do not do anything in Config.h
is shown for each option: JETBYTE_TINY_XML_2_5_3
- enabled by default. From this release TinyXML version 2.5.3 is available and is used by default in XMLTools. If you would prefer to continue to use TinyXML 2.5.2 then define JETBYTE_TINY_XML_2_5_3
to 0 in your Config.h FILE_SKIP_SET_EVENT_ON_HANDLE
flag of SetFileCompletionNotificationModes() for stream sockets, datagram sockets, JetByteTools::IO::CAsyncFileWriter or JetByteTools::IO::CAsyncFileReader using the following configuration options: JETBYTE_PERF_STREAM_SOCKETS_SKIP_EVENT_ON_HANDLE
- enabled by default. JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_EVENT_ON_HANDLE
- enabled by default. JETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLE
- enabled by default. JETBYTE_PERF_FILE_READER_SKIP_EVENT_ON_HANDLE
- enabled by default.Config.h
. FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
flag of SetFileCompletionNotificationModes() for stream sockets, datagram sockets, JetByteTools::IO::CAsyncFileWriter or JetByteTools::IO::CAsyncFileReader. using the following configuration options: JETBYTE_PERF_STREAM_SOCKETS_SKIP_COMPLETION_PORT_ON_SUCCESS
- enabled by default. JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_COMPLETION_PORT_ON_SUCCESS
- DISABLED by default. JETBYTE_PERF_FILE_WRITER_SKIP_COMPLETION_PORT_ON_SUCCESS
- DISABLED by default. JETBYTE_PERF_FILE_READER_SKIP_COMPLETION_PORT_ON_SUCCESS
- enabled by default.Config.h
. Config.h
BUT there is a known bug with enabling this option for UDP sockets on Windows Vista and Windows 7 which may cause resource leaks and we have been unable to exercise the new code for the JetByteTools::IO::CAsyncFileWriter during testing and so have not enabled the code at this time. JETBYTE_DEBUG_BREAK_ON_CONNECTIONS_ACTIVE_DURING_DESTRUCTION
- enabled by default. If enabled a breakpoint is triggered if you are in the debugger and there are connections active when a connection manager is destroyed. The connection manager base class cannot wait for these connections to complete as the callback that it uses to notify your code that connections have completed will likely have been destroyed by the time this code is executed. You should always have waited for a shutdown to complete and not created any connections again after that point before destroying your connection manager. You CAN and SHOULD wait for shutdown in your own derived class's destructor! Enabling this option helps you spot situations where you are NOT waiting correctly in your own code. JETBYTE_DUMP_SOCKET_READ_AND_WRITE_DATA_TO_DEBUG_LOG
- disabled by default. When enabled the low level socket I/O code dumps complete details of all data sent and received to the default debug trace log. This can be useful when developing connection filters. Note that this should not be left enabled as the debug generation is time consuming. JETBYTE_DISABLE_VS2005_DEBUG_UUIDLIB_CHECK
- has been removed. It was too difficult to detect installations that needed it and you can fix the problem that it tried to work around with the hotfix that I link to from here. DWORD
and BYTE
in Types.h. This means that we don't need to include <wtypes.h> quite so often.Config.h
and disabled by defining them to 0; the default state if you do not do anything in Config.h
is shown for each option: JETBYTE_USE_CAPTURE_STACK_BACK_TRACE
- enabled by default. Define to 0 to prevent the use of CaptureStackBackTrace()
when building for platforms later than Windows XP. Normally we assume that CaptureStackBackTrace()
is available on Windows XP SP1 and later, however if you're building using the default Platform SDK that came with Visual Studio 2005 this does not include CaptureStackBackTrace()
and so our platform version check wrongly includes code that cannot build. JETBYTE_ADDITIONAL_BUFFER_TRACKING_CONTEXT
and JETBYTE_ADDITIONAL_SOCKET_TRACKING_CONTEXT
- by default the buffer and socket reference tracking code keeps one level of call stack context outside of the actual call within the library code that caused the reference to change. This is often enough context to track down the problem and keeps the amount of memory required for storing call stacks down. Sometimes, however, you need a little more context, in those situations you should define JETBYTE_ADDITIONAL_BUFFER_TRACKING_CONTEXT
and/or JETBYTE_ADDITIONAL_SOCKET_TRACKING_CONTEXT
to a value that represents the additional number of stack frames that you want saved and displayed. Note that each additional level of call stack that is stored requires a DWORD64
of space per call so these additional stack frames can soon add up. Warnings.h
. Config.h
and disabled by defining them to 0; the default state if you do not do anything in Config.h
is shown for each option: JETBYTE_TRANSLATE_SEH_EXCEPTIONS
- enabled by default. When enabled each thread that is created within the libraries may contain a structured exception translator which will translate Windows structured exceptions into instances of JetByteTools::Win32::CSEHException which can be caught in a normal C++ exception handler. See here http://www.lenholgate.com/archives/000852.html for more details. JETBYTE_TRANSLATE_SEH_EXCEPTIONS_IN_DEBUGGER
- enabled by default. If disabled then structured exception transaltion that is controlled by JETBYTE_TRANSLATE_SEH_EXCEPTIONS
will not occur if the code is running under a debugger. JETBYTE_CATCH_UNHANDLED_EXCEPTIONS_IN_DESTRUCTORS
- enabled by default. Some destructors have catch(...)
handlers present to prevent exceptions leaking from them. When disabled all catch(...)
handlers in destructors are removed from library code. JETBYTE_CATCH_UNHANDLED_EXCEPTIONS_AT_THREAD_BOUNDARY
- enabled by default. Most threads that the libraries create have catch(...)
handlers present to prevent exceptions leaking from them. When disabled all catch(...)
handlers in threads are removed from library code. JETBYTE_CATCH_UNHANDLED_EXCEPTIONS_IN_NOTHROW_FUNCTIONS
- enabled by default. Most functions that are marked with a 'no throw' (throw()
) exception specification to indicate that the function does not throw exceptions also contain a catch(...)
handler to ensure that they don't. When disabled all catch(...)
handlers in 'nothrow' functions are removed from library code. JETBYTE_CATCH_UNHANDLED_EXCEPTIONS
- enabled by default. When disabled all catch(...)
handlers that haven't been explicitly enabled by one of the three settings above are removed from the code. See here: http://www.lenholgate.com/archives/000854.html for more details. JETBYTE_EXCEPTION_STACK_TRACES
- disabled by default. Enable to capture the stack trace when an exception derived from JetByteTools::Win32::CException is thrown. Enables the use of JetByteTools::Win32::CException::GetCallStack() to report the call stack at the point of the exception. JETBYTE_EXCEPTION_WHERE_INCLUDES_STACK_TRACE
- disabled by default. Only valid if JETBYTE_EXCEPTION_STACK_TRACES
is defined to 1. Causes JetByteTools::Win32::CException::Where() to also return the call stack of where the exception was thrown. JETBYTE_TRACK_IO_BUFFER_REFERENCES
- disabled by default. Enable to track where JetByteTools::IO::CBuffer::AddRef() and JetByteTools::IO::CBuffer::Release() are called from for all instances of JetByteTools::IO::CBuffer. If a buffer is over released (i.e. release is called on a buffer where the reference count is currently zero) then a trace of all calls to JetByteTools::IO::CBuffer::AddRef() and JetByteTools::IO::CBuffer::Release() will be printed to the debug trace output. If a buffer is destroyed and the reference count is not zero then a trace is also printed. Note that there is a considerable run-time cost for this functionality. JETBYTE_TRACK_SOCKET_REFERENCES
- disabled by default. Enable to track where JetByteTools::Socket::TAsyncSocket<T>::AddRef() and JetByteTools::Socket::TAsyncSocket<T>::Release() are called from for instances of JetByteTools::Socket::TAsyncSocket derived classes. If a socket is over released (i.e. release is called on a socket where the reference count is currently zero) then a trace of all calls to JetByteTools::Socket::TAsyncSocket::AddRef() and JetByteTools::Socket::TAsyncSocket<T>::Release() will be printed to the debug trace output. If a socket is destroyed and the reference count is not zero then a trace is also printed. Note that there is a considerable run-time performance cost for this functionality. JETBYTE_REFERENCE_TRACKING_DISPLAY_LOADED_PDBS
- disabled by default. Enable to display a list of the pdb files that were loaded to provide the callstacks uses by the socket reference tracker, the buffer reference tracker and the exception call stack code. JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE
- disabled by default. Enable to throw exceptions from JetByteTools::Win32::TReferenceCountedSmartPointer<T>::GetRef() if the reference is null. Normally we simply return the null reference and the calling code goes boom... JETBYTE_DISABLE_VS2005_DEBUG_UUIDLIB_CHECK
- disabled by default. Enable to turn off the fatal build error in projects that require uuid.lib and that are being built in debug mode using VS2005 with the Windows SDK version v7.0. Some example servers require uuid.lib and the version supplied with the Windows SDK v7.0 contains some debug information that the VS2005 linker can't understand. These projects include CheckVS2005DebugUuidlibVersion.h
which has a go at checking to see if you're using the Windows SDK v7.0 and if so produces an error message. If you enable this configuration setting the error message becomes a warning and, in all likelyhood, the build will instead fail at the link stage.Admin\VC6Compatibility
directory with sal.h
for VS.Net (2002) and VS 2003. The directory is now called Admin\Compatibility
and you need to copy sal.h
to your compiler's include directory if it complains about it being missing. Admin.h
works. Admin.h
now requires that a file called Config.h
exists in the Admin
directory. Config.h
is used to store all of your library settings. Admin.h
now simply includes TargetWindowsVersion.h
and Config.h
and validates that all the settings are acceptable. We're doing it this way so that you actually have to think about what settings you want to build with when you first install the code rather than simply taking our current defaults. Also this makes it considerably easier for us to run automated builds with different settings, and to adjust settings without continually checking them in to source control by mistake. There are some example Config.h
files in the Admin\ExampleConfigHeaders
subdirectory. Simply copy one into the Admin
directory, rename it to Config.h
and edit it as you wish. Likewise there are examples of TargetWindowsVersion.h
files and again you need to copy one into the Admin
directory and rename it before your first build. Admin\DetectPlatformSDKVersion.h
which can be included in your Admin\Config.h
file to automatically set the correct defines for the version of the Platform SDK that you have installed. Note that it only works with the latest versions of the Platform SDK that include sdkddkver.h
. Admin.h
now raises an error if you try. CompilerName.h
, which gives you a textual representation of the value of _MSC_VER
. We use the long version of these in Admin.cpp
and the short version to provide compiler specific directory names in test code. SecureCRT.h
, compilers earlier than VS2005 now use _snsprintf
for sprintf_s
and we support swprintf_s
as _snwprintf
. Admin\WinsockWrapper.h
for compilers earlier than VS2005 compiling with Windows SDK v6.1; we now use JETBYTE_MESSAGE
to output the warning message. Admin\MsCoreE.h
which was only required for VC6. You should now include mscoree.h
directly. JETBYTE_
, so there's JETBYTE_TODO
, etc. This is to prevent name clashes with user code. _WIN32_WINNT >= 0x0600
and JETBYTE_PLATFORM_SDK_VERSION < 0x060A
as targetting Vista or later means we enable stuff that's only available in the v6.0a Windows SDK. sal.h
for VS.Net (2002) and VS 2003. A copy can be found in Admin\VC6Compatibility
and you need to copy it to your compiler's include directory if it complains about it being missing. WinsockWrapper.h
for when JETBYTE_PLATFORM_SDK_VERSION == 0x0610
and we're building with anything earlier than VS2005 as version 6.1 of the Windows SDK defines a 'clever' template version of _WSPIAPI_COUNTOF
from WSPIAPI.H
and the earlier compilers can't deal with... JETBYTE_MINIMUM_SUPPORTED_WINDOWS_VERSION
and JETBYTE_MINIMUM_SUPPORTED_NTDDI_VERSION
to Admin.h. These are currently set to _WIN32_WINNT_WIN2K
and NTDDI_WIN2K
. JETBYTE_PLATFORM_SDK_VERSION
which you can use to tell the libraries which version of the Windows SDK you're using. This allows us to work around some of the breaking changes that are introduced by some versions of the Widows SDK and the earlier Platform SDKs. sal.h
to the Admin\VC6Compatibility
directory as it doesn't ship as part of the Windows SDK but some versions of the Windows SDK require it; this effectively means that VC6 can't be used with the latest versions of the Windows SDK. If you find that you're compiling with VC6 and you get errors about not being able to find sal.h
then you can copy the file from Admin\VC6Compatibility
to your VC6 include directory. TargetWindowsVersion.h
and associated target specific files. Either edit TargetWindowsVersion.h
and change the values of JETBYTE_MINIMUM_SUPPORTED_WINDOWS_VERSION
and JETBYTE_MINIMUM_SUPPORTED_NTDDI_VERSION
or copy TargetWindowsVersion_Vista.h
or whatever over the top of TargetWindowsVersion.h
to build for a specific windows version. We've done it this way so that our continuous integration build server can build for various targets simply by having a file copy job that copies the correct version over the top of TargetWindowsVersion.h
after extracting the code from source control. SecureCRT.h
header again. WinsockWrapper.h
for when JETBYTE_PLATFORM_SDK_VERSION == 0x0610
as version 6.1 of the Windows SDK does not define a SOCKADDR_STORAGE
typedef for Windows versions of less than 0x0501. We warn about this and include our own typedef if this is the case. Admin\UsingMFC.h
so that it works for dynamic linking with MFC for all compilers rather than just working with VC6. Admin.cpp
file which displays details of the settings from Admin.h
during a build. SecureCRT.h
header which is used to provide the "secure" string functions on compilers prior to the VS2005. Warnings.h
and SecureCRT.h
to fix issues. Types.h
, at present it only contains JetByteTools::Milliseconds
. JETBYTE_HAS_INTERLOCKED_64
to Admin.h
it is used to determin if the platform on which you will be running has an implementation of the 64 bit versions of the 'Interlocked' functions. If you set it to 1 then code can assume it's OK to use these functions, if you set it to 0 then alternative methods will be used...