WiFi Framework C++ Edition
wclCommon Namespace Reference

Classes

class  CwclAudioCategoryMessage
 The Audio category messages base class. More...
 
class  CwclBluetoothCategoryMessage
 The Bluetooth category messages base class. More...
 
class  CwclConnectionCategoryMessage
 The Connection category messages base class. More...
 
class  CwclCustomMemoryStream
 The base class for memory streams. More...
 
class  CwclErrorInformation
 The class provides methods to get human readable information about Wireless Communication Library errors. More...
 
class  CwclFileStream
 The class represents a file stream. More...
 
class  CwclHandleStream
 The base class for handle based streams. More...
 
class  CwclHardwareChangeMessage
 The Hardware Changed message is broadcast to all subscribers when changes in the hardware configuration have been detected. The message ID is wclCommon::WCL_MSG_ID_SYS_HARDWARE_CHANGED. More...
 
class  CwclMemoryStream
 The memory stream. More...
 
class  CwclMessage
 The message object. More...
 
class  CwclMessageBroadcaster
 The message broadcaster manages broadcast messages between subscribers (message receivers subscribed for broadcast messages). Also the message broadcaster monitors changes in the hardware configuration and notifies subscribers about the changes. More...
 
class  CwclMessageReceiver
 The Wireless Communication Library message receiver. More...
 
class  CwclOsVersion
 The class provides information about OS version. More...
 
class  CwclPowerCategoryMessage
 The Power Monitoring category messages base class. More...
 
class  CwclPowerEventsMonitor
 The class allows an application to receive power state changes notifications. More...
 
class  CwclSerialCategoryMessage
 The Serial category messages base class. More...
 
class  CwclStream
 The base class for WCL streams. More...
 
class  CwclStreamAdapter
 The class implements the IStream interface on a CwclStream object. More...
 
class  CwclSystemCategoryMessage
 The System category messages base class. More...
 
class  CwclUsbCategoryMessage
 The USB category messages base class. More...
 
class  CwclUserDefinedCategoryMessage
 The User Defined messages base class. More...
 
class  CwclWiFiCategoryMessage
 The WiFi category messages base class. More...
 
class  CwclWiiRemoteCategoryMessage
 The Wii Remote category messages base class. More...
 
class  wclEFileOpenFailed
 Failed to open file. More...
 
class  wclEInvalidArgument
 One or more arguments passed into constructor are invalid. More...
 
class  wclEOutOfMemory
 Not enough system memory. More...
 
class  wclEPowerEvents
 The Power Events Monitor exceptions class. More...
 
struct  wclErrorDetails
 The structure contains detailed information about Wireless Communication Library error code. More...
 
class  wclException
 The base WCL exceptions class. More...
 
struct  wclPowerStatus
 Contains information about the power status of the system. More...
 

Typedefs

typedef std::wstring tstring
 Defines the string type as UNICODE string.
 
typedef std::set< wclBatteryChargeStatus > wclBatteryChargeStatusFlags
 The battery charge status.
 
typedef UINT(__stdcall * PwclThreadProc) (void *Param)
 

Enumerations

enum  wclMessageCategory {
  mcAudio , mcBluetooth , mcConnection , mcPower ,
  mcSerial , mcSystem , mcUsb , mcUser ,
  mcWiFi , mcWiiRemote
}
 The message categories. More...
 
enum  wclMessageProcessingMethod { mpAsync , mpSync }
 Message processing methods used in inter-threading notifications. More...
 
enum  wclOsType {
  osUnknown = 0 , osMacOS = 1 , osWinXP = 2 , osWinVista = 3 ,
  osWin7 = 4 , osWin8 = 5 , osWin81 = 6 , osWin10 = 7 ,
  osWin11 = 8
}
 Operating System type. More...
 
enum  wclSeekOrigin { soBeginning , soCurrent , soEnd }
 Stream origins. More...
 
enum  wclStreamOwnership { soReference , soOwned }
 The enumeration indicates whether a stream object should be freed by the object that uses it. More...
 
enum  wclPowerState {
  psPowerStatusChanged , psResumeAutomatic , psResume , psSuspend ,
  psUnknown
}
 The enumeration defines the system power states. More...
 
enum  wclACLineStatus { lsOffline , lsOnline , lsBackup , lsUnknown }
 The AC power status. More...
 
enum  wclBatteryChargeStatus {
  csCapacityHigh , csCapacityLow , csCapacityCritical , csCharging ,
  csNoSystemBattery , csUnknown
}
 The battery charge statuses. More...
 

Functions

tstring wclUTF8Decode (const PCHAR lpszUTF8, const DWORD Len)
 Converts UTF8 string to WCL string.
 
tstring wclUTF8Decode (const PCHAR lpszUTF8)
 Converts UTF8 string to WCL string.
 
void wclUTF8Encode (const tstring &str, const PCHAR lpszUTF8, const DWORD dwUTF8Len)
 Converts WCL (UNICODE) string to UTF8 encoded string.
 
std::string wclUnicodeToAnsi (const std::wstring &s)
 Converts UNICODE string to ANSI string.
 
std::wstring wclAnsiToUnicode (const std::string &s)
 Converts ANSI string to UNICODE string.
 
DWORD wclGetCurrentProcessId ()
 
DWORD wclGetCurrentThreadId ()
 
HANDLE wclCreateThread (PwclThreadProc Proc, void *const Param, unsigned int &ThreadId)
 
HANDLE wclCreateThread (PwclThreadProc Proc, void *const Param, const bool Suspend)
 
HANDLE wclCreateThread (PwclThreadProc Proc, void *const Param)
 
void wclResumeThread (const HANDLE Thread)
 
UINT wclGetThreadResult (const HANDLE Thread)
 
void wclWaitThread (const HANDLE Thread)
 
void wclCloseThread (HANDLE &Thread)
 
void wclWaitAndCloseThread (HANDLE &Thread)
 

Variables

const int WCL_E_SUCCESS = 0x00000000
 Operation completed with success.
 
const int WCL_E_BASE = 0x00010000
 The base error code for the WCL system/common errors.
 
const int WCL_E_INVALID_ARGUMENT = WCL_E_BASE + 0x0000
 One or more arguments passed into the method or function are invalid.
 
const int WCL_E_OUT_OF_MEMORY = WCL_E_BASE + 0x0001
 Out of system memory.
 
const int WCL_E_MR_BASE = WCL_E_BASE + 0x1000
 The base error code for the message receiver.
 
const int WCL_E_MR_CLOSED = WCL_E_MR_BASE + 0x0000
 A message receiver has already been closed or not opened.
 
const int WCL_E_MR_OPENED = WCL_E_MR_BASE + 0x0001
 A message receiver has already been opened.
 
const int WCL_E_MR_NOT_OPENED = WCL_E_MR_BASE + 0x0002
 A message receiver was not opened yet.
 
const int WCL_E_MR_UNABLE_SYNCHRONIZE = WCL_E_MR_BASE + 0x0003
 A message receiver can not synchronize threads and notify a "main" thread about new received message.
 
const int WCL_E_MR_UNABLE_REGISTER_SYNC_OBJ = WCL_E_MR_BASE + 0x0004
 A message receiver can not register for threads synchronization.
 
const int WCL_E_MR_UNABLE_CREATE_SYNC_OBJ = WCL_E_MR_BASE + 0x0005
 A message receiver can not create a thread synchronization object.
 
const int WCL_E_MR_SYNC_OBJ_NOT_CREATED = WCL_E_MR_BASE + 0x0006
 A thread synchronization object has not been created.
 
const int WCL_E_MR_INVALID_THREAD = WCL_E_MR_BASE + 0x0007
 An invalid thread used to call the method.
 
const int WCL_E_MR_UNABLE_CREATE_TERM_EVENT = WCL_E_MR_BASE + 0x0008
 Unable to create asynchronous message processing thread termination event.
 
const int WCL_E_MR_INVALID_MESSAGE_PROCESSING_METHOD = WCL_E_MR_BASE + 0x0009
 Invalid or unsupported message processing method.
 
const int WCL_E_MB_BASE = WCL_E_BASE + 0x2000
 The base error code for the message broadcaster.
 
const int WCL_E_MB_RECEIVER_ALREADY_SUBSCRIBED = WCL_E_MB_BASE + 0x0000
 A message receiver has already been subscribed.
 
const int WCL_E_MB_RECEIVER_NOT_SUBSCRIBED = WCL_E_MB_BASE + 0x0001
 A message receiver has not been subscribed.
 
const int WCL_E_MB_CAN_NOT_INIT_HW_THREAD = WCL_E_MB_BASE + 0x0002
 The message broadcaster can not initialize the hardware monitoring thread.
 
const int WCL_E_MB_CAN_NOT_START_HW_THREAD = WCL_E_MB_BASE + 0x0003
 The message broadcaster can not start the hardware monitoring thread.
 
const int WCL_E_MB_UNABLE_CREATE_HW_OBJ = WCL_E_MB_BASE + 0x0004
 The message broadcaster can not create the hardware monitoring object.
 
const int WCL_E_MB_UNABLE_REGISTER_HW_NOTIFY = WCL_E_MB_BASE + 0x0005
 The message broadcaster can not register for hardware changes notifications.
 
const int WCL_E_MB_UNABLE_CREATE_MUTEX = WCL_E_MB_BASE + 0x0006
 The message broadcaster can not create a mutex synchronization object.
 
const int WCL_E_MB_NOT_CREATED = WCL_E_MB_BASE + 0x0007
 The message broadcaster was not created.
 
const int WCL_E_MB_REF_COUNT_ERROR = WCL_E_MB_BASE + 0x0008
 There is the error with the references counter.
 
const int WCL_E_MB_RUNNING = WCL_E_MB_BASE + 0x0009
 The messaging subsystem is already running.
 
const int WCL_E_MB_INVALID_SYNC_METHOD = WCL_E_MB_BASE + 0x000A
 Invalid or unknown synchronization method.
 
const int WCL_E_MB_WAIT_TIMEOUT = WCL_E_MB_BASE + 0x000B
 A timeout appeared during wait operation.
 
const int WCL_E_MB_WAIT_FAILED = WCL_E_MB_BASE + 0x000C
 Wait operation failed.
 
const int WCL_E_MB_RECEIVER_NOT_FOUND = WCL_E_MB_BASE + 0x000D
 A message receiver with given ID was not found.
 
const int WCL_E_WINRT_BASE = WCL_E_BASE + 0x3000
 The base WinRT subsystem error code.
 
const int WCL_E_WINRT_UNABLE_CREATE_MUTEX = WCL_E_WINRT_BASE + 0x0000
 Unable to create synchronization mutex for WinRT control.
 
const int WCL_E_WINRT_UNABLE_LOAD_CORE_DLL = WCL_E_WINRT_BASE + 0x0001
 unable to load WinRT core DLL.
 
const int WCL_E_WINRT_UNABLE_LOAD_STRING_DLL = WCL_E_WINRT_BASE + 0x0002
 unable to load WinRT string DLL.
 
const int WCL_E_WINRT_INIT_FAILED = WCL_E_WINRT_BASE + 0x0003
 WinRT initialization failed.
 
const int WCL_E_WINRT_UNABLE_CREATE_STRING = WCL_E_WINRT_BASE + 0x0004
 Unable to create string.
 
const int WCL_E_WINRT_UNABLE_ACTIVATE_INSTANCE = WCL_E_WINRT_BASE + 0x0005
 Unable to active instance of the required class.
 
const int WCL_E_WINRT_UNABLE_CREATE_INTERFACE = WCL_E_WINRT_BASE + 0x0006
 Unable to create interface of the required class.
 
const int WCL_E_WINRT_ASYNC_OPERATION_FAILED = WCL_E_WINRT_BASE + 0x0007
 Failed to read asynchronous operation status.
 
const int WCL_E_WINRT_ASYNC_OPERATION_CANCELLED = WCL_E_WINRT_BASE + 0x0008
 An asynchronous operation canceled.
 
const int WCL_E_WINRT_ASYNC_OPERATION_ERROR = WCL_E_WINRT_BASE + 0x0009
 An asynchronous operation completed with error.
 
const int WCL_E_WINRT_DETACH_BUFFER_FAILED = WCL_E_WINRT_BASE + 0x000A
 Unable to detach raw buffer.
 
const int WCL_E_WINRT_ASYNC_OPERATION_TIMEOUT = WCL_E_WINRT_BASE + 0x000B
 An asynchronous operation timed out.
 
const int WCL_E_WINUSB_BASE = WCL_E_BASE + 0x4000
 The base error code for all WinUSB subsystem errors.
 
const int WCL_E_WINUSB_UNABLE_CREATE_MUTEX = WCL_E_WINUSB_BASE + 0x0000
 Unable create WinSUB subsystem synchronization mutex.
 
const int WCL_E_WINUSB_UNABLE_LOAD = WCL_E_WINUSB_BASE + 0x0001
 WinUSB subsystem is not available on your system.
 
const int WCL_E_WINUSB_NOT_LOADED = WCL_E_WINUSB_BASE + 0x0002
 WinUSB subsystem was not loaded.
 
const int WCL_E_WINUSB_UNEXPECTED = WCL_E_WINUSB_BASE + 0x0003
 Unknown or unexpected WinUSB error.
 
const int WCL_E_WINUSB_DEVICE_OPENED = WCL_E_WINUSB_BASE + 0x0004
 A WinUSB device is already opened.
 
const int WCL_E_WINUSB_DEVICE_CLOSED = WCL_E_WINUSB_BASE + 0x0005
 A WinUSB device is closed.
 
const int WCL_E_WINUSB_DEVICE_NOT_OPENED = WCL_E_WINUSB_BASE + 0x0006
 A WinUSB device is not opened.
 
const int WCL_E_WINUSB_OPEN_DEVICE_FAILED = WCL_E_WINUSB_BASE + 0x0007
 Unable to open specified WinUSB device.
 
const int WCL_E_WINUSB_INIT_DEVICE_FAILED = WCL_E_WINUSB_BASE + 0x0008
 Initialize WinUSB device failed.
 
const int WCL_E_WINUSB_CONTROL_TRANSFER_FAILED = WCL_E_WINUSB_BASE + 0x0009
 Control transfer failed.
 
const int WCL_E_WINUSB_READ_PIPE_FAILED = WCL_E_WINUSB_BASE + 0x000A
 Read data from pipe (endpoint) failed.
 
const int WCL_E_PEM_BASE = WCL_E_BASE + 0x5000
 The base error code for Power Events monitor error codes.
 
const int WCL_E_PEM_OPENED = WCL_E_PEM_BASE + 0x0000
 The power events monitor is already opened.
 
const int WCL_E_PEM_CLOSED = WCL_E_PEM_BASE + 0x0001
 The power events monitor is already closed.
 
const int WCL_E_PEM_FEATURE_NOT_SUPPORTED = WCL_E_PEM_BASE + 0x0002
 The power state monitoring feature is supported on Windows 8 and above.
 
const int WCL_E_PEM_GET_POWER_STATUS_FAILED = WCL_E_PEM_BASE + 0x0003
 Unable to get system power status.
 
const int WCL_E_PEM_CREATE_INIT_EVENT_FAILED = WCL_E_PEM_BASE + 0x0004
 Unable to create Power Events Window initialization event.
 
const int WCL_E_PEM_CREATE_WND_THREAD_FAILED = WCL_E_PEM_BASE + 0x0005
 Unable to create and start Power Event Window thread.
 
const int WCL_E_PEM_CREATE_WND_FAILED = WCL_E_PEM_BASE + 0x0006
 Unable to create Power Events Window.
 
const int WCL_E_CFGMGR_BASE = WCL_E_BASE + 0x6000
 The base error code for Configuration Manager error codes.
 
const int WCL_E_CFGMGR_LOAD_FAILED = WCL_E_CFGMGR_BASE + 0x0000
 Unable to load Configuration Manager API.
 
const int WCL_E_LAF_BASE = WCL_E_BASE + 0x7000
 The base error code for Limited Access Feature errors.
 
const int WCL_E_LAF_NOT_FOUND = WCL_E_LAF_BASE + 0x0000
 The LAF ID was not found.
 
const int WCL_E_LAF_OPEN_KEY_FAILED = WCL_E_LAF_BASE + 0x0001
 Unable to access the LAF key information.
 
const int WCL_E_LAF_KEY_NOT_FOUND = WCL_E_LAF_BASE + 0x0002
 The LAF key was not found.
 
const int WCL_E_LAF_DLL_LOAD_FAILED = WCL_E_LAF_BASE + 0x0003
 Unable to load encryption DLL.
 
const int WCL_E_LAF_FUNC_NOT_FOUND = WCL_E_LAF_BASE + 0x0004
 Encryption functions not found.
 
const int WCL_E_LAF_ACQUIRE_CONTEXT_FAILED = WCL_E_LAF_BASE + 0x0005
 Unable to acquire encryption context.
 
const int WCL_E_LAF_CREATE_HASH_FAILED = WCL_E_LAF_BASE + 0x0006
 Unable to build hash.
 
const int WCL_E_LAF_CRYPT_HASH_FAILED = WCL_E_LAF_BASE + 0x0007
 Unable to crypt the hash.
 
const int WCL_E_LAF_GET_CRYPTED_HASH_FAILED = WCL_E_LAF_BASE + 0x0008
 Unable to get crypted hash.
 
const int WCL_E_LAF_IDENTITY_NOT_FOUND = WCL_E_LAF_BASE + 0x0009
 An application file does not contain the identity resource.
 
const int WCL_E_LAF_IDENTITY_READ_FAILED = WCL_E_LAF_BASE + 0x000A
 Unable to read the identity.
 
const int WCL_E_LAF_IDENTITY_INVALID = WCL_E_LAF_BASE + 0x000B
 The identity has invalid format.
 
const int WCL_E_LAF_IDENTITY_EMPTY = WCL_E_LAF_BASE + 0x000C
 The identity is empty.
 
const int WCL_E_LAF_IDENTITY_INVALID_FORMAT = WCL_E_LAF_BASE + 0x000D
 The identity has invalid format.
 
const int WCL_E_LAF_UNLOCK_REQUEST_FAILED = WCL_E_LAF_BASE + 0x000E
 Request to unlock limited feature failed.
 
const int WCL_E_LAF_GET_REQUEST_STATUS_FAILED = WCL_E_LAF_BASE + 0x000F
 Unable to get unlock request status.
 
const int WCL_E_LAF_LOCKED = WCL_E_LAF_BASE + 0x0010
 The LAF is locked.
 
const int WCL_E_LAF_UNAVAILABLE = WCL_E_LAF_BASE + 0x0011
 The LAF unavailable because was not found.
 
const int WCL_E_LAF_STATUS_UNKNOWN = WCL_E_LAF_BASE + 0x0012
 Unknown or undefined LAF status.
 
const int WCL_E_LAF_MANAGER_OPENED = WCL_E_LAF_BASE + 0x0013
 The LAF manager has already been opened.
 
const int WCL_E_LAF_MANAGER_NOT_OPENED = WCL_E_LAF_BASE + 0x0014
 The LAF manager was not opened.
 
const int WCL_E_LAF_MANAGER_CLOSED = WCL_E_LAF_BASE + 0x0015
 The LAF manager is closed.
 
const int WCL_E_LAF_MANAGER_CREATE_INIT_EVENT_FAILED = WCL_E_LAF_BASE + 0x0016
 Create LAF manager initialization event failed.
 
const int WCL_E_LAF_MANAGER_CREATE_TERM_EVENT_FAILED = WCL_E_LAF_BASE + 0x0017
 Create LAF manager termination event failed.
 
const int WCL_E_LAF_MANAGER_START_THREAD_FAILED = WCL_E_LAF_BASE + 0x0018
 Unable to start the LAF manager working thread.
 
const int WCL_E_LAF_MANAGER_FEATURE_NOT_SUPPORTED = WCL_E_LAF_BASE + 0x0019
 The LAF feature is not supported on this platform.
 
const int WCL_E_LAF_MANAGER_GET_LAF_LIST_FAILED = WCL_E_LAF_BASE + 0x001A
 Unable to access the LAF list.
 
const unsigned char WCL_MSG_ID_SYS_HARDWARE_CHANGED = 1
 The Hardware Change message ID.
 
CwclOsVersion wclOsVersion
 Global instance of the OS version reader class.