Archive

Archive for November, 2017

SocksSvc v1.07

November 30, 2017 Comments off

Just to let everyone know that v1.07 of SocksSvc has been released. Updates for this version include:

  • Replaced CString::operator LPC*STR() calls with CString::GetString calls
Categories: Web Site Updates

HIDWrappers v1.01 & CTemperDevice v1.01

November 28, 2017 Comments off

Just to let everyone know that v1.01 of HIDWrappers & CTemperDevice has been released. Updates for this version include:

  • Updated copyright details.
  • Replaced BOOL throughout the codebase with bool.
  • Replaced CString::operator LPC*STR() calls with CString::GetString calls
Categories: Web Site Updates

CTrayNotifyIcon v1.67

November 26, 2017 Comments off

Just to let everyone know that v1.67 of CTrayNotifyIcon has been released. Updates for this version include:

  • Updated copyright details.
  • Fixed a number of compilation errors when compiled with VC 2017
  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined.
  • Replaced NULL throughout the codebase with nullptr. This means that the minimum requirement for the framework is now VC 2010.
  • Replaced BOOL throughout the codebase with bool.
  • Removed all functionality for pre Vista versions of Windows.
Categories: Web Site Updates

AppSettings v1.15

November 25, 2017 Comments off

Just to let everyone know that v1.15 of AppSettings has been released. Updates for this version include:

  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined.
Categories: Web Site Updates

MFCSensor v1.04

November 25, 2017 Comments off

Just to let everyone know that v1.04 of MFCSensor has been released. Updates for this version include:

  • Updated copyright details.
  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined.
  • Replaced NULL throughout the codebase with nullptr.
Categories: Web Site Updates

JSON++ v1.0

November 25, 2017 Comments off

I have been working with JSON recently in a number of C++ projects and wanted to learn it by understanding the JSON specification by writing my own JSON parser / encoder. There are a number of nice JSON libraries for C++ out there such as SimpleJSON and JSON for Modern C++. I particularly liked the SimpleJSON library which was able to implement a nice JSON parser / encoder in c. 1300 lines of code. I decided to write my own class based on SimpleJSON but using some modern C++ features such as r-value references, move constructors and operator=. Thus was born JSON++. The main class provided is CValue and is implemented in a JSONPP namespace. All the constructors of the CValue class allow a JSON value object to be constructed directly from other C++ types such as bool, double, long, STL strings, STL vectors, STL maps etc. Standard C++ operator= methods are also provided which mirror the constructor methods. The class also supports construction and assignment from C++ r-value references. A "Parse" method of CValue allows a JSON encoded string (either UTF8 or UTF16) to be parsed into the CValue instance. An "Encode" method allows a JSON encoded string in the form of a std::wstring to be created from a CValue instance. Various other CValue methods are modelled on the SimpleJSON classes.

Features

  • Provides a complete JSON parser and encoder in c. 1300 lines of C++.
  • All the code is provided in a single C++ Header only module of "JSON++.h" .
  • All the code clean compiles at warning level 4, is /analyze and /permissive- clean and includes ASCII, Unicode, x86 and x64 built configurations.
  • The class supports both UTF8 and UTF16 encoded JSON.
  • Performance testing of the code has shown that JSON++ is about 50% faster than SimpleJSON for parsing. This is mainly achieved through the use of r-value references and placement new to avoid use of explicit heap memory allocations which SimpleJSON is forced to use. The encoding speed of JSON++ is the same as SimpleJSON, although support is provided in JSON++ for pretty printing the resulting JSON.
  • Performance testing for parsing of a c. 400 character UTF16 JSON string on my Core I7 quad core 4Ghz development machine indicates a performance of about 30 MB / second.
  • Encoding performance works out at about 50,000 encodes per second for a c. 400 character JSON string on my Core I7 machine.
  • If a parsing error occurs during a call to the CValue::Parse method, then a JSONPP::CParseException will be thrown. This class provides a "m_Reason" enum value which specifies why the parsing failed and a "m_nIndex" value which specifies where the parsing error occurred in the JSON encoded text.
  • All the functionality of JSON++ is implemented using standard C++. This includes UTF8 to UTF16 string conversion.
  • The classes have been tested only on VC 2017 but should be compilable on earlier versions of Visual C++. The sample app uses some VC specific classes but again should be easily converted to support running on non Windows operating systems. If you think this would be useful, then please let me know.
Categories: Web Site Updates

CSortedArray / CSortedArrayEx v1.49

November 19, 2017 Comments off

Just to let everyone know that v1.49 of CSortedArray / CSortedArrayEx has been released. Updates for this version include:

  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined
  • Replaced NULL with nullptr throughout the codebase. This means that the code now requires VC 2010 at a minimum to compile.
Categories: Web Site Updates

MfcSMS v1.09

November 19, 2017 Comments off

Just to let everyone know that v1.09 of MfcSMS has been released. Updates for this version include:

  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined.
Categories: Web Site Updates

CEnumerateSerial v1.33

November 15, 2017 Comments off

Just to let everyone know that v1.33 of CEnumerateSerial has been released. Updates for this version include:

  • Updated the code to compile cleanly when _ATL_NO_AUTOMATIC_NAMESPACE is defined.
Categories: Web Site Updates

SCardWrappers v1.06

November 12, 2017 Comments off

Just to let everyone know that v1.06 of SCardWrappers has been released. Updates for this version include:

  • Renamed the CSCARDWRAPPERS_MFC_EXTENSIONS define to "SCARDWRAPPERS_MFC_EXTENSIONS" to be consistent with the author’s other code.
  • Replaced CString::operator LPC*STR() calls with CString::GetString calls
  • Replaced NULL with nullptr throughout the codebase. This means that the code now requires VC 2010 at a minimum to compile.
  • Replaced BOOL with bool throughout the codebase.
  • Removed unnecessary AccessStartedEvent & ReleaseStartedEvent methods from CContext
  • Updated parameters to CContext::GetProviderName & CContext2::GetProviderName to match the SDK
  • Removed redundant CCard & CCard2 methods which call CContext::GetAttrib
  • Reviewed all the SAL annotations to make sure they are in sync with the latest Windows 10 SDK
  • Reviewed the code and made sure it supports everything in the latest Windows 10 SDK
  • Moved IntToHex, HexToInt, BinaryToString, AttributeBinaryToString, AttributeBinaryStringToString, AttributeASCIIBinaryStringToString & StringToBinary functions from SCardWrappers.h to the test.cpp demo app module.
Categories: Web Site Updates