VBCorLib

VBCorLib

VB.EXT: VBCorLib 2.2 Version: 2.2.1 (VB.EXT Core Class Library 2.2)
Copyright 2007 Kelly Ethridge Kelly Ethridge

VB.EXT Core Class Library

VBCorLib

Classes:

ApplicationException | Defines the base class for predefined exceptions in the user program.
ArgumentException | The exception that is thrown when one of the arguments provided to a method is not valid.
ArgumentNullException | The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.
ArgumentOutOfRangeException | The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
ArithmeticException | This exception is used when a mathematical error has occurred.
ArrayList | A list that dynamically increases in size to hold a number of items.
ArrayListStatic | Represents the static methods of the ArrayList class.
ArrayTypeMismatchException | Represents an exception caused by two arrays not being compatible.
ASCIIEncoding | Provides a set of methods used to encode and decode chars to and from bytes in ASCII format.
AsymmetricAlgorithm | Provides a common interface to be implemented by all Asymmetrical algorithm classes.
AsyncCallback | Used as a means for asynchronous operations to notify when a procedure is finished.
BigInteger | Represents an unlimited size signed integer value.
BigIntegerStatic | Provides methods used to manipulate BigInteger objects.
BinaryReader | Provides a set of methods to read typed information from a Stream.
BinaryWriter | Provides methods to write typed information to a stream.
BitArray | Manages a compact array of bit values. Each bit represents a boolean, where True = 1, and False = 0.
BitArrayEnumerator | This class is used to enumerate the individual bits being managed by a BitArray object.
BitArrayStatic | Provides creation methods from various types of arrays.
BitConverter | Provides a means to convert value datatypes to and from arrays of bytes.
Buffer | This class provides methods for copying manipulating arrays as byte arrays.
Calendar | Represents various systems of time in which the beginning, length, and divisions of a year are defined.
CalendarStatic | Provides static methods for the Calendar class.
cArray | Provides methods for manipulating, searching and sorting arrays.
CaseInsensitiveComparer | Provides a comparer that is case-insensitive when comparing strings.
CaseInsensitiveHashCodePrvdr | Generates hashcodes for values as normal, but ignores the case for strings.
cDateTime | Represents a point in time.
cDateTimeStatic | Represents methods to create cDateTime objects from various data sources.
CharEnumerator | Used to enumerate the characters in a string from start to end.
Comparer | Provides a default mechanism to compare two values. The values must be of the same datatype to be compared. Otherwise an exception will be thrown.
ComparerStatic | Provides static functions to access the default comparer.
Console | Provides a mechanism for handling input and output for either a screen or Stream.
ConsoleKeyInfo | Represents the information contained in a console key press.
Constructors | Functions used to create fully inititalized objects.
Convert | Provides methods used to encode and decode byte arrays to and from base-64 encoded characters.
CryptoAPIHash | Wraps the CryptoAPI hash functions to be used in the HashAlgorithmBase callback methods.
CryptoAPITransform | Utilizes the Windows CryptoAPI cryptography services to perform data transformations.
CryptoConfig | Used to access cryptography information.
CryptographicException | An exception that represents an error occuring during some form of cryptographic operation.
CryptoStream | Provides a streaming mechanism for ciphering data.
CspKeyContainerInfo | Represents information about a Crypto Service Providers Key Container.
CspParameters | Contains parameter values that can be passed on to cryptography providers.
cString | Provides static functions to format and manipulate string values.
CultureInfo | Represents information about a culture, such as number and date formatting.
CultureInfoStatic | Provides a set of static methods retrieve CultureInfo objects.
DateTimeFormatInfo | Provides a repository of formatting information to be used in formatting cDateTime and Date values to match that of a specific locale.
DateTimeFormatInfoStatic | Provides static methods to retrieve various DateTimeFormatInfo objects.
DayLightTime | Represents the start and end times for a daylight savings period, and the difference between daylight savings time and standard time.
Decoder | Provides an interface to be used in converting blocks of bytes into unicode characters.
DES | Represents a base interface that all DES algorithms should implement.
DESCryptoServiceProvider | Defines a wrapper class around a DES cryptographic service provider.
DESStatic | Provides static methods relating to the DES crypto service provider.
DictionaryEntry | A DictionaryEntry is used to contain a key/value pair. This enables collections to keep the two values together throughout an operation.
Directory | Provides a set of static methods for manipulating and retrieving directory information.
DirectoryInfo | Represents a directory to modify and retrieve information about.
DirectoryNotFoundException | An exception that is thrown when a specified directory was not found.
DriveInfo | Provides methods to access information about a drive.
DriveInfoStatic | Provides static methods for manipulating DriveInfo objects.
DSA | Represents a base interface all DSA implementations must implement.
DSACryptoServiceProvider | Provides a wrapper to access a DSA crypto service provider.
DSAParameters | Represents the DSA key parameters.
Encoder | Provides an interface for encoding unicode characters into bytes.
Encoding | Provides an interface for a provider to encode and decode unicode characters to and from bytes. Also contains information on the ability to use the encoded characters in certain situations without integerity loss.
EncodingInfo | Contains information about a specific encoding.
EncodingStatic | Provides static methods used to retrieve existing encodings and convert between encodings.
EndOfStreamException | An exception that is thrown when an attempt to read passed the end of a stream occurs.
Environment | The Environment class provides functions for retrieving information about the local machine
EventArgs | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory. This should be overriden for different forms of equality. An example would be if this class contained a Name property and equality is determined by the names.
EventArgsStatic | Represents an event with no data.
Exception | This is the base class from which all exception derive their interface.
ExceptionBase | This is a helper class to easily manage an exception type class.
ExceptionMethods | Defines public exception management functions Throw and Catch.
ExternalException | Returns a key/value collection used to contain user-defined specific information about the exception.
File | Provides methods for manipulating and retrieving file information.
FileInfo | Provides methods for manipulating, setting and retrieving information for the specified file.
FileNotFoundException | An exception thrown when a specified file was not found.
FileStream | Represents a file as a Stream.
FileSystemInfo | The FileSystemInfo interface is used to access both FileInfo and DirectoryInfo objects using the same code. This allows for similar properties and methods to be used on both files and directories with a single routine.
FormatException | The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method.
FromBase64Transform | Transforms data from base-64 to plain text.
GregorianCalendar | Provides methods for manipulating dates using the Gregorian calendar mathematics.
GregorianCalendarStatic | Provides static methods for the GregorianCalendar class.
Guid | Represents a globally unique identifier (GUID).
GuidStatic | Provides static methods used to create and manipulate Guid objects.
HashAlgorithm | Represents a common interface implemented by all hashing algorithms.
HashAlgorithmBase | Provides a base implementation for implementing hash algorithms.
Hashtable | The Hashtable represents a repository of key/value pairs.
HebrewCalendar | Provides methods for manipulating Hebrew (Jewish) dates.
HebrewCalendarStatic | Provides static methods for the HebrewCalendar class.
HijriCalendar | Provides methods for manipulating Hijri dates.
HijriCalendarStatic | Provides static methods to support the Hijri calendar.
HMAC | Provides a common Hash-based Message Authentication Code (HMAC) interface to be implemented by all HMAC classes.
HMACBase | Provides the base functionality to perfrom Hash Message Authentication Code operations.
HMACMD5 | Represents an MD5 implementation of an HMAC algorithm.
HMACRIPEMD160 | Represents a RIPEMD160 hash impelemntation of the HMAC algorithm.
HMACSHA1 | Represents an SHA-1 implementation of the HMAC algorithm.
HMACSHA256 | Represents an SHA-256 implementation of the HMAC algorithm.
HMACSHA384 | Represents an SHA-384 implementation of the HMAC algorithm.
HMACSHA512 | Represents an SHA-512 implementation of the HMAC algorithm.
HMACStatic | Provides static methods associated to the HMAC class.
IAsyncResult |
ICloneable | Supports cloning, which creates a new instance of a class with the same value as an existing instance.
ICollection | Provides an interface to access size and enumeration capabilities of collections.
IComparable | Provides a standard interface used to compare an object to a value.
IComparer | A standard interface used to implement custom comparers.
ICryptoTransform | A common interface implemented by all crypto transform classes.
ICspAsymmetricAlgorithm | Provices methods to allow access to Key container information and Crypto API blob import/export ability for Asymmetric algorithmes.
ICustomFormatter | The ICustomFormatter interface is used to allow user-defined classes to be the formatting service for values.
IDictionary | This provides a standard interface to be impelments by key-value list collection.
IDictionaryEnumerator | An interface used to enumerate a dictionary style collections (Hashtable.)
IEnumerable | An interface that can be used to get an enumerator for an object.
IEnumerator | This interface is used to allow for custom enumerators to be built.
IFormatProvider | Provides a mechanism for retrieving an object to control formatting.
IFormattable | Provides functionality to format the value of an object into a string representation.
IHashAlgorithm | Provides an interface all hash algorithm callbacks must implement.
IHashcodeProvider | Provides an interface to allow for a custom hashcode generator.
IList | An interface that provides methods for accessing and manipulating values at specified indexes within a list.
IndexOutOfRangeException | The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array.
INIFile | Provides methods for manipulating an INI initialization file.
INISectionWriter | Creates an entire section at once in an INI file.
InvalidCastException | The exception that is thrown for invalid casting or explicit conversion.
InvalidOperationException | The exception that is thrown when a method call is invalid for the objects current state.
IObject | This is the base interface to allow objects to be utilized throughout most of VBCorLib.
IOException | This exception is thrown when an I/O error occurs.
IResourceDecoder | Provides an interface to allow a ResourceReader to decode resource types found within a .RES file.
IResourceEncoder | Provides an interface for classes to be used to encode data into byte arrays used by the ResourceWriter.
IResourceReader | Provides a standard interface for resource readers
IResourceWriter | Provides an interface for resource writers.
JapaneseCalendar | Provides functions for manipulate Japanese dates.
JulianCalendar | Provides methods to manipulate Julian dates.
JulianCalendarStatic | Provides static methods for the JulianCalendar class.
KeyedHashAlgorithm | Provides a common interface to be implementated by all keyed hash implentations.
KeySizes | Represents a set of key sizes.
KoreanCalendar | Provides functions to manipulate Korean dates.
KoreanCalendarStatic | Provides static methods for the KoreanCalendar class.
MACTripleDES | Represents a TripleDES implementation of an HMAC algorithm.
MACTripleDESStatic | Provides static methods associated with the MACTripleDES class.
MathExt | Provides extended math functionality.
MD5 | Represents a base interface to be implemented by all MD5 hash algorithms.
MD5CryptoServiceProvider | Provides MD5 hashing services through the CryptoAPI interface.
MemoryMappedFile | Represents a simple file-to-memory mapping.
MemoryStream | Provides an in-memory stream of data that can be read/written and modified using Stream methods.
NotSupportedException | The exception that is thrown when an invoked method is not supported.
NullStream | Provides a stream with no backing. Data can be written, but nothing will be stored.
NumberFormatInfo | Provides numeric formatting information.
NumberFormatInfoStatic | Provides methods to retrieve the various types of NumberFormatInfo objects.
ObjectDisposedException | This exception is thrown when an operation is attempted on a disposed object.
ObjectStatic | Provides default implementations of the IObject interface.
OperatingSystem | Provides information about the currently running operating system.
OutOfMemoryException | This the exception thrown when a memory error occurs.
OverflowException | This exception is thrown when a mathimatical operation causes a value outside the valid range of values for the destination object.
Path | Provides functions to locate and format path information.
PathTooLongException | An exception that is caused by a path being longer than Windows can handle.
PlatformNotSupportedException | This exception is thrown when an operation is to be performed, but the current operating system does not support the action.
PublicFunctions | Provides some helper functions.
Queue | Provides a collections that maintains a list of items in a First-in-First-Out sequence.
QueueEnumerator | Class derived from IObject.
Random | Provides a sequence of pseudo-random generated numbers.
RandomNumberGenerator | A common interface to be implemented by random number generators.
RandomNumberGeneratorStatic | Provides static methods associated with the RandomNumberGenerator class.
RankException | The exception that is thrown when an array with the wrong number of dimensions is passed to a method.
RC2 | Represents a standard interface implemented by all RC2 crypto service providers.
RC2CryptoServiceProvider | Provides cryptography services using the RC2 symmetric algorithm.
RC2Static | Provides static methods associated with the RC2 algorithm.
Registry | Supplies the base Registrykeys that access values and subkeys in the registry.
RegistryKey | Represents a key level node inside the Windows Registry.
RegistryKeyStatic | Provides static methods for the RegistryKey class.
ResBitmapDecoder | Decodes bitmap byte data from a byte array and produces a StdPicture. Usually the byte array comes from a .RES file file.
ResBitMapEncoder | This encodes a multiple StdPicture bitmaps into individual arrays of bytes.
ResByteEncoder | This will accept a byte array to be encoded into a .RES file.
ResCursorDecoder | Decodes cursor byte data from a .RES formatted byte array.
ResCursorEncoder | Encodes a StdPicture Cursor to byte data used in .RES files.
ResCursorGroupDecoder | Decodes a CursorGroup resource.
ResCursorGroupEncoder | Encodes a ResPictureGroup object to a .RES byte array.
ResIconDecoder | Decodes an icon from a .RES formatted byte array.
ResIconEncoder | Encodes the StdPicture icon.
ResIconGroupDecoder | Decodes an IconGroup resource.
ResIconGroupEncoder | Encodes a ResPictureGroup object to a .RES byte array.
ResourceKey | This class represents a Resource key by containing the 3 primary identifiers for a Windows resource.
ResourceManager | Provides convenient access to culture-specific resources at runtime.
ResourceManagerStatic | Provides static methods for the ResourceManager object.
ResourceReader | Provides a means to iterate through the resources in a .RES file.
ResourceSet | Stores all the resources localized for one particular culture, ignoring all other cultures.
ResourceWriter | Writes encoded resources out to a .RES file.
ResPictureGroup | This class represents a group of Icons or Cursors.
ResPictureGroupInfo | Represents a picture resource that is part of a group of pictures.
ResStringTableDecoder | Decodes a resource String table containing up to 16 strings.
ResStringTableEncoder | Encodes strings into string tables.
Rfc2898DeriveBytes | Provides a methods to derive Byte array keys from string passwords.
Rijndael | Provides a standard interface implemented by all Rijndael cryptographic service providers.
RijndaelManaged | Represents an implementation of the Rijndael symmetric block cipher algorithm
RijndaelManagedTransform | Performs cryptographic operations on data using the Rijndael algorithm.
RijndaelStatic | Provides static methods associated with the Rijndael class.
RIPEMD160 | Provides a common interface to be implemented by all RIPEMD160 implementations.
RIPEMD160Managed | Represents an implementation of the RIPEMD160 hashing algorithm.
RNGCryptoServiceProvider | Provides random number generation that is a bit more random than the regular Visual Basic method by using a Cryptographic Service Provider.
RSA | Represents the base interface from which all RSA class implementations must implement.
RSACryptoServiceProvider | Provides RSA encryption services using the Windows Crypto API methods.
RSAParameters | Represents the Key information for an RSA implementation.
RSAStatic | Represents methods associated with the RSA class.
SecurityElement | Provides simple XML text management capabilities.
SecurityElementStatic | Provides static functions associated to the SecurityElement class.
SerializationException | This exception is thrown when an error occurs reading or writing a propertybag and a value cannot be serialized.
SHA1 | Represents a standard interface for SHA-1 class implementations.
SHA1CryptoServiceProvider | Provides services to compute the SHA-1 hash values of data.
SHA1Managed | Provides services to compute the SHA-1 hash value.
SHA1Static | Provides methods specific to the SHA-1 class.
SHA256 | Represents a standard interface for SHA-256 class implementations.
SHA256Managed | Provides services to compute the SHA-256 hash value.
SHA256Static | Provides methods associated with the SHA-256 class.
SHA384 | Represents a standard interface for SHA-384 class implementations.
SHA384Managed | Provides services to compute the SHA-384 hash value.
SHA384Static | Provides methods associated with the SHA-384 class.
SHA512 | Represents a standard interface for SHA-512 class implementations.
SHA512Managed | Provides services to compute the SHA-512 hash value.
SHA512Static | Provides methods associated with the SHA-512 class.
SortedList | Provides a means to maintain a list of sorted items based on an associated key.
Stack | Represents a first-in-last-out collection of values.
StaticClasses | Provides direct access to static class methods.
StopWatch | Provides a timing mechanism using QueryPerformanceCounter if available, otherwise the system time is used.
StopWatchStatic | Provides methods that are related to the StopWatch class.
Stream | Provides a set of standard methods for using a Stream object.
StreamReader | Reads characters from a byte array in a particular encoding.
StreamStatic | Provides static methods for the Stream class.
StreamWriter | Writes characters to a byte stream using the specific encoding.
StringBuilder | Allows easy manipulation, concatenation and removal of strings and characters.
StringReader | Provides methods to read portions of a string.
StringWriter | Provides a set of functions for writing to a string.
SymmetricAlgorithm | Provides a standard interface for utilizing symmetric algorithms.
SymmetricAlgorithmBase | Provides a common base of functionality for SymmetricAlgorithm derived classes.
SystemException | Defines the base class for predefined exceptions in the VBCorLib library.
TaiwanCalendar | Provides functions for manipulating Taiwanese dates.
TextReader | Provides an interface to read text characters from a stream.
TextReaderStatic | Provides static functions to be accesses using TextReader.* calling convention.
TextWriter | Provides an interface used to write text characters to a stream.
ThaiBuddhistCalendar | Provides methods for manipulating ThaiBuddhist dates.
ThaiBuddhistCalendarStatic | Provides static methods of the ThaiBuddhistCalendar class.
Ticker | Provides a recurring timer event.
TimeSpan | This class represents an amount of time.
TimeSpanStatic | Provides severs static functions to help in creating TimeSpan objects.
TimeZone | Represents timezone information for the local machine.
TimeZoneStatic | Represents static methods for the TimeZone class.
ToBase64Transform | A class used to transform byte data to Base 64 data.
TripleDES | Represents the interface for Triple Data Encryption Standard classes to implement.
TripleDESCryptoServiceProvider | Provides cryptographic services using the TripleDES cryptographic service provider.
TripleDESStatic | Provides static methods used with the Triple Data Encryption Standard algorithm.
UnauthorizedAccessException | This exception is thrown when an operation attempted to access a secured value or location without proper authorization.
UnicodeEncoding | A set of functions used to convert unicode characters to and from byte arrays.
UTF7Encoding | A set of functions used to convert unicode characters to and from byte arrays.
UTF8Encoding | A set of functions to be used to convert character arrays to and from byte arrays.
Version | Represents a version number.
VersionStatic | Provides static methods to help create Version objects.
WaitHandle |
WeakReference | Provides a reference to an object, but does not keep that object alive.
WinResourceReader | A class that reads resources out of EXE and DLL files.
XmlSyntaxException | Represents an exception caused by invalid XML syntax.
Build on Monday, October 22, 2007 by Kelly Ethridge
Copyright © 2004-2005


ApplicationException

ApplicationException

Defines the base class for predefined exceptions in the user program.

Remarks

This class is used to help differenciate between exceptions raised by VBCorLib and the executing application. Instead of directly instantiating an ApplicationException object, a new class should be derived from ApplicationExceptionBase to easily specify the exception type.

ApplicationException uses the HResult COR_E_APPLICATION, which is &H80131600.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ApplicationException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview | Exception


ApplicationException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview | Exception


ApplicationException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ApplicationException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ApplicationException Overview


ArgumentException

ArgumentException

The exception that is thrown when one of the arguments provided to a method is not valid.

Remarks

ArgumentException is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method. When throwing an ArgumentException a meaningful error message describing the invalid argument, the name of the argument, as well as the expected range of values for the argument should be defined.

New exception classes derived from ArgumentException can be created starting with the ArgumentExceptionBase template class and modifying it accordingly.

ArgumentException uses the HResult COR_E_ARGUMENT, which is &H5.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception | ArgumentNullException | ArgumentOutOfRangeException

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
ParamName (get) | Returns the parameter name that caused the exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ArgumentException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview | Exception


ArgumentException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview | Exception


ArgumentException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: ParamName (get)

ParamName

Returns the parameter name that caused the exception.

 Public Property Get ParamName ( ) As String

Return Values

String - The name of the parameter that caused the exception.

Remarks

Every ArgumentException should contain the name of the parameter that caused the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentException Overview | Exception


ArgumentException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ArgumentException Overview


ArgumentNullException

ArgumentNullException

The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.

Remarks

ArgumentNullException is thrown in cases where an object reference is Nothing and is required, or an Array is unitialized and is required.

ArgumentNullException works the same as ArgumentException and provides no additional functionality. This exception is used to distinguish Null reference exceptions from other argument exceptions.

ArgumentNullException uses the HResult E_POINTER, which is &H5B.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception | ArgumentException | SystemException

Implements:

ArgumentException
Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
ParamName (get) | Returns the parameter name that caused the exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ArgumentNullException: ArgumentException

ArgumentException

 Implements ArgumentException

Return Values

ArgumentException -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview | Exception


ArgumentNullException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview | Exception


ArgumentNullException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentNullException.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: ParamName (get)

ParamName

Returns the parameter name that caused the exception.

 Public Property Get ParamName ( ) As String

Return Values

String - The name of the parameter that caused the exception.

Remarks

Every ArgumentNullException should contain the name of the parameter that caused the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview | Exception


ArgumentNullException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentNullException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ArgumentNullException Overview


ArgumentOutOfRangeException

ArgumentOutOfRangeException

The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.

Remarks

ArgumentOutOfRangeException is thrown when an argument is not Null and is outside of the allowable range of values.

An ArgumentOutOfRangeException works the same as an ArgumentException. It is used to distinguish between other argument exceptions and those that are out of a valid range.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception | ArgumentException | SystemException

Implements:

ArgumentException
Exception
IObject
SystemException

Public:

Properties:

Name | Description
ActualValue (get) | Returns the actual value that caused the exception to be thrown.
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
ParamName (get) | Returns the parameter name that caused the exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ArgumentOutOfRangeException: ActualValue (get)

ActualValue

Returns the actual value that caused the exception to be thrown.

 Public Property Get ActualValue ( ) As Variant

Return Values

Variant - A value of the parameter that caused the exception.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: ArgumentException

ArgumentException

 Implements ArgumentException

Return Values

ArgumentException -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview | Exception


ArgumentOutOfRangeException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview | Exception


ArgumentOutOfRangeException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentNullException.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: ParamName (get)

ParamName

Returns the parameter name that caused the exception.

 Public Property Get ParamName ( ) As String

Return Values

String - The name of the parameter that caused the exception.

Remarks

Every ArgumentNullException should contain the name of the parameter that caused the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview | Exception


ArgumentOutOfRangeException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArgumentOutOfRangeException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ArgumentOutOfRangeException Overview


ArithmeticException

ArithmeticException

This exception is used when a mathematical error has occurred.

Remarks

This exception is generally thrown by VBCorLib during mathematical operations, or value conversions from one datatype to another datatype. Such exceptions could be a Divide-By-Zero error or Overflow error.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ArithmeticException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview | Exception


ArithmeticException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview | Exception


ArithmeticException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArithmeticException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ArithmeticException Overview


ArrayList

ArrayList

A list that dynamically increases in size to hold a number of items.

Remarks

This class contains an internal array of Variants. As new items are added to the list, the capacity will increase as necessary.

The capacity of the list is the current number of elements in the internal array.

To lower the capacity to save memory, use the TrimToSize method, or set Capacity directly.

The default capacity is 16. The Item index is zero based.

This class is persistable.

See Also

Project VBCorLib Overview | Constructors | ArrayListStatic | IList

Implements:

ICloneable
ICollection
IEnumerable
IList
IObject

Public:

Properties:

Name | Description
Capacity (get) | Returns the total number of elements in the the internal array.
Capacity (let) | Sets the number of allocated elements in the array.
Count (get) | Returns the number of items in the list.
IsFixedSize (get) | Returns if the list is fixed-size.
IsReadOnly (get) | Returns if the list is read-only.
Item (get) | Returns an item from the list.
Item (let) | Sets an item in the list to a value.
Item (set) | Sets an item in the list to a value.
Version (get) | Returns the current version of the instance.

Methods:

Name | Description
Add | Adds a new item to the end of the list.
AddRange | Adds the items from a collection to the list.
BinarySearch | Performs a binary search for the value in the internal list.
Clear | Clears the list of all values.
Clone | Returns an ArrayList object containing a copy of the array in the original ArrayList.
Contains | Returns if the list contains a specific value.
CopyTo | Copies all of the items to an array.
CopyToEx | Copies a specified number of the items to an Array.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator for an ArrayList.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetRange | Returns an ArrayList object that is a windowed view into the original ArrayList.
IndexOf | Returns the index of the first occurrence of the value in the list.
Insert | Inserts a value into the list at the specified index.
InsertRange | Inserts a collection of items into the list.
LastIndexOf | Returns the last occurrence of a value in the list.
Remove | Removes a value from the list.
RemoveAt | Removes a value from the list at a specific index.
RemoveRange | Remove a set of items from the list.
Reverse | Reverses the list of items in the list.
SetRange | Sets the items in the list to a collection of items.
Sort | Sorts the items in the list.
ToArray | Returns an array of the items in the list.
ToString | Returns a string representation of this object instance.
TrimToSize | Sets the capacity to the number of items in the list.


ArrayList: Add

Add

Adds a new item to the end of the list.

 Public Function Add(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The item to be added to the list.

Return Values

Long - The index at which the item was added.

Remarks

As items are added, the capacity is increased as necessary. The items are appended to the end of the list and maintain the order they were added, provided no other method is used to change the order, such as Insert or Remove.

Exceptions

Exception Type | Condition
NotSupportedException | The ArrayList is Read-Only - or - The ArrayList is Fixed-Size.

Example

In the following example, several items are added to an ArrayList object and then iterated over, displaying the items in the list.
Private Sub Main()
    Dim list As New ArrayList

    ' add several elements to the ArrayList
    list.Add "Humpty"
    list.Add "Dumpty"
    list.Add "sat"
    list.Add "on"
    list.Add "a"
    list.Add "wall."

    ' Display the contents of the ArrayList
    PrintValues list

    ' Wait for user to press return key
    Console.ReadLine

End Sub

Private Sub PrintValues(ByVal en As IEnumerable)
    Const Space As String = " "

    Dim value As Variant

    ' Iterate over the list
    For Each value In en
        ' Write each value onto the same line
        Console.WriteValue value
        Console.WriteValue Space
    Next value
End Sub

' This code produces the following output.
'
' Humpty Dumpty sat on a wall.
The items are added to the list, then a For..Each statement is used to iterate over the list, displaying the name in the Console window.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: AddRange

AddRange

Adds the items from a collection to the list.

 Public Sub AddRange(
      ByRef c As Variant )

Parameters

c
[ByRef] Variant. The collection of items to add. The collection can be a VBA.Collection, ICollection object, or an Array.

Remarks

The elements in the collection added by using For..Each to iterate each element. The elements are added to the end of the list in the same order as the For..Each loop produces them.

If the number of elements to be added is more than the available capacity in the ArrayList, then the capacity is increased to accommodate the collection of elements.

Exceptions

Exception Type | Condition
ArgumentNullException | c is an uninitialized array. - or - c is Nothing.
NotSupportedException | The ArrayList is Read-Only - or - The ArrayList is Fixed-Size.
InvalidCastException | c is not a VBA.Collection, ICollection object, or an Array.

Example

The following example shows how to add the elements from an existing collection to the ArrayList using the AddRange method.

An ArrayList is created and filled with an initial set of elements, then a Queue is filled with additional elements that will be added to the ArrayList using AddRange.

Private Sub Main()
    Dim list As New ArrayList

    ' add several elements to the ArrayList
    list.Add "Humpty"
    list.Add "Dumpty"
    list.Add "sat"
    list.Add "on"
    list.Add "a"
    list.Add "wall."

    ' Display the contents of the ArrayList
    Console.WriteLine "The ArrayList initially contains:"
    PrintValues list

    Dim que As New Queue
    que.Enqueue "Humpty"
    que.Enqueue "Dumpty"
    que.Enqueue "had"
    que.Enqueue "a"
    que.Enqueue "great"
    que.Enqueue "fall."

    ' Display the contents of the Queue
    Console.WriteLine "The Queue initially contains:"
    PrintValues que

    ' Add the elements in the Queue to the ArrayList
    list.AddRange que

    ' Display the new contents of the ArrayList
    Console.WriteLine "The ArrayList with the elements from the Queue:"
    PrintValues list

    ' Wait for user to press return key
    Console.ReadLine

End Sub

Private Sub PrintValues(ByVal en As IEnumerable)
    Const Space As String = " "

    Dim value As Variant

    Console.WriteValue vbTab

    ' Iterate over the list
    For Each value In en
        ' Write each value onto the same line
        Console.WriteValue value
        Console.WriteValue Space
    Next value
    Console.WriteLine
End Sub

' This code produces the following output.
'
' The ArrayList initially contains:
'     Humpty Dumpty sat on a wall.
' The Queue initially contains:
'     Humpty Dumpty had a great fall.
' The ArrayList with the elements from the Queue:
'     Humpty Dumpty sat on a wall. Humpty Dumpty had a great fall.

See Also

Project VBCorLib Overview | Class ArrayList Overview | ICollection


ArrayList: BinarySearch

BinarySearch

Performs a binary search for the value in the internal list.

 Public Function BinarySearch(
      ByRef Value As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Value
[ByRef] Variant. The value to search for.
Index
[ByRef] Optional. Variant. The starting index to begin the search.
Count
[ByRef] Optional. Variant. The number of elements to search in from the startindex.
Comparer
[ByVal] Optional. IComparer. A comparer to perform user-defined comparison logic.

Return Values

Long - The index at which the value was found, or a negative value indicating the value was not found.

Remarks

The search assumes the ArrayList is sorted.

The default comparison method requires the values to be of the same intrinsic Visual Basic datatype. A vbLong will fail to compare against a vbInteger, for instance. Objects must implement the IComparable interface or an exception will be thrown.

The comparison behaviour can be overridden by supplying a custom IComparer compatible object.

The search can be limited to a specific range within the list instead of over the entire list.

If the return value is negative, then the value was not found in the list. To determine where the value should have been found, negate (Not) the return value.

Exceptions

Exception Type | Condition
ArgumentException | Neither value nor the elements in the list support the IComparable interface.
InvalidOperationException | value and the elements in the array are not of the same datatype.

Example

The following code demonstrates how to search for a value in an ArrayList using BinarySearch.
Private Sub Main()
    Dim list As New ArrayList
    Dim i As Integer

    For i = 1 To 5
        list.Add i * 2
    Next i

    ' Display the current values in the list
    Console.WriteLine "The ArrayList contains:"
    PrintValues list

    ' Find a non-existing value
    FindValue list, 7

    ' Find an existing value
    FindValue list, 4

    Console.ReadLine
End Sub

Private Sub PrintValues(ByVal en As IEnumerable)
    Dim v As Variant

    Console.WriteValue vbTab

    For Each v In en
        Console.WriteValue "{0} ", v
    Next v
    Console.WriteLine
End Sub

Private Sub FindValue(ByVal list As ArrayList, ByVal value As Variant)
    Dim Index As Long

    Index = list.BinarySearch(value)

    If Index < 0 Then
        Console.WriteLine "The value ({0}) was not found in the list. The next largest value was found at index {1}.", value, Not Index
    Else
        Console.WriteLine "the value ({0}) was found at index {1}.", value, Index
    End If
End Sub

' This code produces the following output.
'
' The ArrayList contains:
'     2 4 6 8 10
' The value (7) was not found in the list. the next largest value was found at index 3.
' The value (4) was found at index 1.

See Also

Project VBCorLib Overview | Class ArrayList Overview | IComparer | IComparable


ArrayList: Capacity (get)

Capacity

Returns the total number of elements in the the internal array.

 Public Property Get Capacity ( ) As Long

Return Values

Long - The number of elements allocated internally.

Remarks

This is not the same as Count. Count returns the number of items that have been added to the list.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Capacity (let)

Capacity

Sets the number of allocated elements in the array.

 Public Property Let Capacity(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of elements to set the array to.

Remarks

The capacity cannot be set less than the number of items in the list. If the capacity is set to zero, then it is set to the default capacity (16).

Exceptions

Exception Type | Condition
ArgumentException | The Capacity was set to a value that is less than Count.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Clear

Clear

Clears the list of all values.

 Public Sub Clear ( )

Remarks

The internal array is cleared of values. The count is reset to zero, but the capacity remains the same. To lower the number of elements in the array, use TrimToSize or set Capacity directly.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Clone

Clone

Returns an ArrayList object containing a copy of the array in the original ArrayList.

 Public Function Clone ( ) As ArrayList

Return Values

ArrayList - A copy of the original object.

Remarks

When the list of elements is cloned, elements that are reference types are not cloned. The cloned list will contain reference pointers to the same objects as the original list has.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Contains

Contains

Returns if the list contains a specific value.

 Public Function Contains(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer ) As Boolean

Parameters

Value
[ByRef] Variant. The value to search for.
Comparer
[ByVal] Optional. IComparer. A user-defined comparer to performs custom compare logic on the array elements.

Return Values

Boolean - A boolean value indicating the value was found in the list.

Remarks

This method performs a linear search of all elements in the list comparing each element with the value being searched for. If the value is an object, then if it implements the cObject interface, then the Equals method is used to test equality, otherwise the Is operator is use to compare two objects.

If there is special compare logic necessary, then a comparer object can be supplied. The compare object must implement the IComparer interface.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: CopyTo

CopyTo

Copies all of the items to an array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      Optional ByRef ArrayIndex As Variant )

Parameters

DstArray
[ByRef] Variant. The array to copy the items to.
ArrayIndex
[ByRef] Optional. Variant. The index to start copying items to in the destination array.

Remarks

The destination array must be large enough to hold all of the items. If an arrayindex is specified, then the destination array must be large enough to hold all of the items from that index on.

Exceptions

Exception Type | Condition
ArgumentNullException | The destination array is a null array.
ArgumentException | dstArray is Multi-Dimension. - or - The number of elements in the ArrayList is greater than the destination array can contain.
InvalidCastException | Elements in the ArrayList cannot be converted to a compatible datatype of the dstArray.

Example

This example shows how to copy elements from an ArrayList into an existing array, replacing any elements in the destination array.
Private Sub Main()

    ' Create our initial story in a regular String array.
    Dim story() As String
    story = cArray.NewArray(ciString, "Humpty", "Dumpty", "sat", "on", "a", "wall.")

    ' Display the current story.
    Console.WriteLine "The initial story is:"
    PrintValues story

    ' Create a new story in an ArrayList.
    Dim words As New ArrayList
    words.Add "Peter"
    words.Add "Rabbit"
    words.Add "slept"
    words.Add "under"
    words.Add "a"
    words.Add "tree."

    ' Copies the third word to same word location in the array.
    words.CopyToEx 2, story, 2, 1

    ' Display the new story.
    Console.WriteLine "The story with 'sat' substituted by 'slept' is:"
    PrintValues story

    ' Copies the first two elements to the first
    ' two elements in the array.
    words.CopyToEx 0, story, 0, 2

    ' Display the story with the new name.
    Console.WriteLine "The story with the name changed is:"
    PrintValues story

    ' Increase the size of the story array.
    ReDim Preserve story(0 To 11)

    ' Append the words to the end of the current story.
    words.CopyTo story, 6

    ' Display the final story.
    Console.WriteLine "The final story is:"
    PrintValues story

    ' Wait for a user presses Return.
    Console.ReadLine
End Sub

Private Sub PrintValues(ByRef s() As String)
    Dim i As Long

    Console.WriteValue vbTab
    For i = LBound(s) To UBound(s)
        Console.WriteValue "{0} ", s(i)
    Next i
    Console.WriteLine
End Sub

' This code produces the following output.
'
' The initial story is:
'     Humpty Dumpty sat on a wall.
' The story with 'sat' substituted by 'slept' is:
'     Humpty Dumpty slept on a wall.
' The story with the name changed is:
'     Peter Rabbit slept on a wall.
' The final story is:
'     Peter Rabbit slept on a wall. Peter Rabbit slept under a tree.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: CopyToEx

CopyToEx

Copies a specified number of the items to an Array.

 Public Sub CopyToEx(
      ByVal Index As Long,
      ByRef DstArray As Variant,
      ByVal ArrayIndex As Long,
      ByVal Count As Long )

Parameters

Index
[ByVal] Long. The starting index in the list to start copying from.
DstArray
[ByRef] Variant. The array to copy the items to.
ArrayIndex
[ByVal] Long. The index in the destination array to start copying items to.
Count
[ByVal] Long. The number of items to copy.

Remarks

The destination array must be large enough to hold the number of elements being copied.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Count (get)

Count

Returns the number of items in the list.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of items in the list.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview | IObject


ArrayList: GetEnumerator

GetEnumerator

Returns an enumerator for an ArrayList.

 Public Function GetEnumerator(
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As Object

Parameters

StartIndex
[ByRef] Optional. Variant. The index in the list to being enumeration.
Count
[ByRef] Optional. Variant. The number of items in the list to enumerate over.

Return Values

Object - An ArrayList enumerator

Remarks

This enumerator can be used in For..Each loops. To access the optional parameters, the GetEnumerator must be called instead of simply passing the object to the For..Each. This allows for a portion of the list to be enumerated.

Example

This example shows several methods of enumerating over an ArrayList object.
Private Sub Main()
    Dim list As New ArrayList

    list.Add "The"
    list.Add "quick"
    list.Add "brown"
    list.Add "fox"

    ' Display the words using the standard For..Each method.
    Console.WriteLine "Using For..Each"
    IterateUsingForEach list

    ' Display the words using the enumerator manually.
    Console.WriteLine "Using an Enumerator"
    IterateUsingEnumerator list

    ' Display a subset of the list using For..Each.
    Console.WriteLine "Itertate Subset"
    IterateSubset list, 1, 2

End Sub

Private Sub IterateUsingForEach(ByVal list As ArrayList)
    Dim word As Variant

    For Each word In list
        Console.WriteValue vbTab & word
    Next word
    Console.WriteLine
End Sub

Private Sub IterateUsingEnumerator(ByVal list As ArrayList)
    Dim en As IEnumerator

    Set en = list.GetEnumerator
    Do While en.MoveNext
        Console.WriteValue vbTab & en.Current
    Loop
    Console.WriteLine
End Sub

Private Sub IterateSubset(ByVal list As ArrayList, ByVal StartIndex As Long, ByVal Count As Long)
    Dim word As Variant

    For Each word In list.GetEnumerator(StartIndex, Count)
        Console.WriteLine "word is {0}", word
    Next word
End Sub

' The following output is produced by this code.
'
' Using For..Each
'     The    quick    brown    fox
' Using an Enumerator
'     The    quick    brown    fox
' Iterate Subset
' word is quick
' word is brown

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview | IObject


ArrayList: GetRange

GetRange

Returns an ArrayList object that is a windowed view into the original ArrayList.

 Public Function GetRange(
      ByVal Index As Long,
      ByVal Count As Long ) As ArrayList

Parameters

Index
[ByVal] Long. The index in the original list to start the new view.
Count
[ByVal] Long. The number of elements in the original list to show in the view.

Return Values

ArrayList - An ArrayList that represents a subset view of the original list.

Remarks

This windowed view is the only way to then modify the original ArrayList. If the original list is modified some other way, then an exception is thrown the next time the ranged view is accessed.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IList

IList

 Implements IList

Return Values

IList -

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IndexOf

IndexOf

Returns the index of the first occurrence of the value in the list.

 Public Function IndexOf(
      ByRef Value As Variant,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Value
[ByRef] Variant. The value to search the list for.
StartIndex
[ByRef] Optional. Variant. The index to begin the search in the list.
Count
[ByRef] Optional. Variant. The number of items in the list to search.
Comparer
[ByVal] Optional. IComparer. A custom comparer to perform any special compare logic.

Return Values

Long - The index of the first occurrence of value, or -1 if the value was not found.

Remarks

If there is special compare logic necessary, then a comparer object can be supplied. The compare object must implement the IComparer interface.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Insert

Insert

Inserts a value into the list at the specified index.

 Public Sub Insert(
      ByVal Index As Long,
      ByRef Value As Variant )

Parameters

Index
[ByVal] Long. The index in which the value is to be inserted.
Value
[ByRef] Variant. The value to be inserted into the list.

Remarks

When a value is inserted, all items starting at the insertion point are moved out by one space. If capacity is reached, the list will be reallocated.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: InsertRange

InsertRange

Inserts a collection of items into the list.

 Public Sub InsertRange(
      ByVal Index As Long,
      ByRef c As Variant )

Parameters

Index
[ByVal] Long. The index at which the items will be inserted.
c
[ByRef] Variant. The collection of items to be inserted into the list.

Remarks

When the items are inserted, the items starting at the index will be moved out a number of spaced equal to the number of items to be inserted. If the capacity is reached, the list will be reallocated.

The collection can be a VBA.Collection,ICollection object, or an Array.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IsFixedSize (get)

IsFixedSize

Returns if the list is fixed-size.

 Public Property Get IsFixedSize ( ) As Boolean

Return Values

Boolean - Value indicating if the list is fixed-size.

Remarks

All operations on the list can be executed as long as the number of items dont change, this includes the capacity of the underlying array.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: IsReadOnly (get)

IsReadOnly

Returns if the list is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Value indicating if the list is read-only.

Remarks

All operations on the list can be executed as long as the number of items dont change, and the items aren't changed in the list.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Item (get)

Item

Returns an item from the list.

 Public Property Get Item(
      ByVal Index As Long ) As Variant

Parameters

Index
[ByVal] Long. The index in the list from which to return the item.

Return Values

Variant - The item as the specified index.

Remarks

This property is set as the Default property for this class. Items can be accessed parentheses:

var = list(index)

The index is zero-based.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Item (let)

Item

Sets an item in the list to a value.

 Public Property Let Item(
      ByVal Index As Long,
      ByRef RHS As Variant )

Parameters

Index
[ByVal] Long. The index in the list to set the value.
RHS
[ByRef] Variant. The value to set in the list.

Remarks

This property is set as the Default property for this class. Items can be accessed using parentheses:

list(index) = value

The index is zero-based.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Item (set)

Item

Sets an item in the list to a value.

 Public Property Set Item(
      ByVal Index As Long,
      ByRef RHS As Variant )

Parameters

Index
[ByVal] Long. The index in the list to set the value.
RHS
[ByRef] Variant. The value to set in the list.

Remarks

This property is set as the Default property for this class. Items can be accessed parentheses:

Set list(index) = value

The index is zero-based.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: LastIndexOf

LastIndexOf

Returns the last occurrence of a value in the list.

 Public Function LastIndexOf(
      ByRef Value As Variant,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Value
[ByRef] Variant. The value to search for in the list.
StartIndex
[ByRef] Optional. Variant. The index to start searching from.
Count
[ByRef] Optional. Variant. The number of items to be searched.
Comparer
[ByVal] Optional. IComparer. A custom comparer to perform any special compare logic.

Return Values

Long - The index of the last occurrence of the value, or -1 if not found.

Remarks

The search is performed from the end of the list towards the beginning. If a startindex

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Remove

Remove

Removes a value from the list.

 Public Sub Remove(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer )

Parameters

Value
[ByRef] Variant. The value to be removed.
Comparer
[ByVal] Optional. IComparer. A custom comparer used to find the value.

Remarks

If the value is an object, then it must be the same instance of the object to be removed. This behaviour can be overriden with a custom comparer.

When removing an item, the remaining items maintain there current order relative to the other items.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: RemoveAt

RemoveAt

Removes a value from the list at a specific index.

 Public Sub RemoveAt(
      ByVal Index As Long )

Parameters

Index
[ByVal] Long. The index in the list to remove the item.
The index is zero-based.

Remarks

When removing an item, the remaining items maintain there current order relative to the other items.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: RemoveRange

RemoveRange

Remove a set of items from the list.

 Public Sub RemoveRange(
      ByVal Index As Long,
      ByVal Count As Long )

Parameters

Index
[ByVal] Long. The index to start removing items.
Count
[ByVal] Long. The number of items to remove.

Remarks

The index is zero-based.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Reverse

Reverse

Reverses the list of items in the list.

 Public Sub Reverse(
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant )

Parameters

Index
[ByRef] Optional. Variant. The index to start reversing items.
Count
[ByRef] Optional. Variant. The number of items to include in the reverse.

Remarks

If no parameters are supplied, then then entire list will be reversed.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: SetRange

SetRange

Sets the items in the list to a collection of items.

 Public Sub SetRange(
      ByVal Index As Long,
      ByRef c As Variant )

Parameters

Index
[ByVal] Long. The index at which to start setting items.
c
[ByRef] Variant. A collection of items to set in the list.

Remarks

The number of items in the list is not changed, nor is the size of the list increased. Only existing items in the list can be set to the items in the collection. This basically overlays new items onto existing items.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Sort

Sort

Sorts the items in the list.

 Public Sub Sort(
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer )

Parameters

StartIndex
[ByRef] Optional. Variant. The index to start sorting the items.
Count
[ByRef] Optional. Variant. The number of items to include in the sort.
Comparer
[ByVal] Optional. IComparer. A custom comparer used to compare items in the list.

Remarks

The list is sorted in ascending order by default. By providing a custom comaprer, the list can be sorted in special ways, such as descending order.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: ToArray

ToArray

Returns an array of the items in the list.

 Public Function ToArray(
      Optional ByVal ArrayType As ciArrayTypes = ciVariant ) As Variant

Parameters

ArrayType
[ByVal] Optional. ciArrayTypes. The specific array type to return.

Default: ciVariant

Return Values

Variant - An array of items in the list.

Remarks

If an array type other than variant is specified, then the list attempts to convert each item in the list to the specific array type requested. If an item cannot be converted, then an exception is thrown.

No items will be narrowed in the conversion. For example, a Double will not be converted to a Long. An exception will be thrown.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ArrayList Overview | IObject


ArrayList: TrimToSize

TrimToSize

Sets the capacity to the number of items in the list.

 Public Sub TrimToSize ( )

Remarks

This will decrease the size of the internal array. This can save memory if you know that no more items will be added to the list.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayList: Version (get)

Version

Returns the current version of the instance.

 Public Property Get Version ( ) As Long

Return Values

Long - Version count.

Remarks

This is used to track if the list has been modified. Wrappers for an ArrayList may need to keep in sync with the list. An example would be the ArrayListEnumerator. If the list is modified during enumeration, then the enumerator throws an error by checking to see if the version has changed since the enumeration began. Since other objects implement the ArrayList interface and need to be enumerated using the same ArrayListEnumerator, the enumerator cant access a Friend method of ArrayList.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayList Overview


ArrayListStatic

ArrayListStatic

Represents the static methods of the ArrayList class.

Remarks

This class cannot be directly instantiated. In order to access the method of this class, use the ArrayList.* syntax.

 Set ReadOnlyList = ArrayList.ReadOnly(list)

See Also

Project VBCorLib Overview | ArrayList

Public:

Methods:

Name | Description
FixedSize | Returns an ArrayList object that is wrapped in a fixedsize object.
ReadOnly | Returns an ArrayList object wrapped inside a readonly object.
Repeat | Creates a new ArrayList and fills it with the supplied value the specified number of times.


ArrayListStatic: FixedSize

FixedSize

Returns an ArrayList object that is wrapped in a fixedsize object.

 Public Function FixedSize(
      ByVal list As ArrayList ) As ArrayList

Parameters

list
[ByVal] ArrayList. The ArrayList to be wrapped.

Return Values

ArrayList - The wrapped ArrayList.

Remarks

Passing this object around provides access to the underlying ArrayList, however, prevents the list from changing size. The current values in the list can be modified, but the size of the list cannot change.

See Also

Project VBCorLib Overview | Class ArrayListStatic Overview


ArrayListStatic: ReadOnly

ReadOnly

Returns an ArrayList object wrapped inside a readonly object.

 Public Function ReadOnly(
      ByVal list As ArrayList ) As ArrayList

Parameters

list
[ByVal] ArrayList. The ArrayList to wrap

Return Values

ArrayList - The readonly ArrayList wrapper.

Remarks

Passing the object around provides access to the underlying ArrayList, however, the list cannot be changed in size or content.

See Also

Project VBCorLib Overview | Class ArrayListStatic Overview


ArrayListStatic: Repeat

Repeat

Creates a new ArrayList and fills it with the supplied value the specified number of times.

 Public Function Repeat(
      ByRef Value As Variant,
      ByVal Count As Long ) As ArrayList

Parameters

Value
[ByRef] Variant. The value to fill the ArrayList with.
Count
[ByVal] Long. The number of times the value is to be added to the list.

Return Values

ArrayList - A new ArrayList.

Remarks

See Also

Project VBCorLib Overview | Class ArrayListStatic Overview


ArrayTypeMismatchException

ArrayTypeMismatchException

Represents an exception caused by two arrays not being compatible.

Remarks

Generally this exception is thrown when elements in one array cannot be converted to elements in a second array.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception | SystemException

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ArrayTypeMismatchException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview | Exception


ArrayTypeMismatchException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview | Exception


ArrayTypeMismatchException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ArrayTypeMismatchException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ArrayTypeMismatchException Overview


ASCIIEncoding

ASCIIEncoding

Provides a set of methods used to encode and decode chars to and from bytes in ASCII format.

Remarks

Encoding characters to bytes using ASCII encoding will produce a 1:1 ratio for each character-to-byte encoding. If the character is greater than 127, then it will be replaced with character 63 (?).

To create a new ASCIIEncoding use the New function.

 Set en = New ASCIIEncoding

See Also

Project VBCorLib Overview | Encoding | UTF8Encoding | UTF7Encoding | UnicodeEncoding

Implements:

Encoding
IObject

Public:

Properties:

Name | Description
BodyName (get) | Returns the encoding name to be used in with the mail agent body tags.
CodePage (get) | Returns the code page identifier for this encoding.
EncodingName (get) | The name of this encoding.
HeaderName (get) | Returns the encoding name to be used in with the mail agent header tags.
IsBrowserDisplay (get) | Indicates if this encoding can be used by browsers to display text.
IsBrowserSave (get) | Indicates if this encoding can be used to save data with this encoding.
IsMailNewsDisplay (get) | Indicates if this encoding can be used to display mail and news by mail and news clients.
IsMailNewsSave (get) | Indicates if this encoding can be used to save date by mail and news clients.
IsSingleByte (get) | Returns if the current encoding uses single-byte code points.
WebName (get) | Returns the encoding name registered with the Internet Assigned Numbers Authority.
WindowsCodePage (get) | Returns the Windows Operating Systems code page for this encoding.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByteCount | Returns the number of bytes that would be produced from the set of characters using this encoding.
GetBytes | Encodes a set of characters into an array of bytes.
GetBytesEx | Encodes a set of characters into an array of bytes, returning the number of bytes produced.
GetCharCount | Returns the number of characters that would be produced by decoding a byte array.
GetChars | Decodes a set of bytes into a set of characters.
GetCharsEx | Decodes a set of bytes into the supplied Integer array.
GetDecoder | Returns a decoder that maintains state.
GetEncoder | Returns an encoder that maintains state.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMaxByteCount | Returns the maximum number of bytes that can be created from a specific number of characters.
GetMaxCharCount | Returns the maximum number of characters than can be decoded from the number of bytes specified.
GetPreamble | Returns an array of bytes that represents this encoding.
GetString | Decodes a set of bytes into a String.
ToString | Returns a string representation of this object instance.


ASCIIEncoding: BodyName (get)

BodyName

Returns the encoding name to be used in with the mail agent body tags.

 Public Property Get BodyName ( ) As String

Return Values

String - The body tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: CodePage (get)

CodePage

Returns the code page identifier for this encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - Code page identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: Encoding

Encoding

 Implements Encoding

Return Values

Encoding -

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview


ASCIIEncoding: EncodingName (get)

EncodingName

The name of this encoding.

 Public Property Get EncodingName ( ) As String

Return Values

String - The encodings name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | IObject


ASCIIEncoding: GetByteCount

GetByteCount

Returns the number of bytes that would be produced from the set of characters using this encoding.

 Public Function GetByteCount(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Chars
[ByRef] Variant. A set of characters used to calculated the number of bytes once encoded with this encoding.
Index
[ByRef] Optional. Variant. The starting index of the first character to be used.
Count
[ByRef] Optional. Variant. The number of characters to include in the calculation.

Return Values

Long - The number of bytes that would be produced by encoding the set of characters.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetBytes

GetBytes

Encodes a set of characters into an array of bytes.

 Public Function GetBytes(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Chars
[ByRef] Variant. The set of characters to be encoded into an array of bytes. This can be either an Integer array or a String.
Index
[ByRef] Optional. Variant. The index of the first character to begin encoding from.
Count
[ByRef] Optional. Variant. The number of characters to be encoded.

Return Values

Byte() - A byte array containing the encoded characters as bytes.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetBytesEx

GetBytesEx

Encodes a set of characters into an array of bytes, returning the number of bytes produced.

 Public Function GetBytesEx(
      ByRef Chars As Variant,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long ) As Long

Parameters

Chars
[ByRef] Variant. the set of characters to be encoded into bytes. This can be either an Integer array or a String.
CharIndex
[ByVal] Long. The index of the first character to begin encoding from.
CharCount
[ByVal] Long. The number of characters to be encoded.
Bytes
[ByRef] Byte. The destination for the encoded characters.
ByteIndex
[ByVal] Long. The index of the first byte stored in the destination array.

Return Values

Long - The number of bytes produce by the encoding.

Remarks

The Bytes array cannot be null and must be large enough to hold the encoded set of characters. To obtain the size required, use GetByteCount to find the necessary size. Or, use GetMaxByteCount to get the largest size that could be produced. The largest size is not the perfect size, only the maximum number of bytes that could ever be produced by a number of characters. Resizing of the resultant Bytes array may be necessary.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetCharCount

GetCharCount

Returns the number of characters that would be produced by decoding a byte array.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to use when calculating the number of characters.
Index
[ByRef] Optional. Variant. The starting index in Bytes to being calculating from.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the calculation.

Return Values

Long - The number of characters that would be decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetChars

GetChars

Decodes a set of bytes into a set of characters.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Integer ( )

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
Index
[ByRef] Optional. Variant. The index of the first byte to be used in decoding.
Count
[ByRef] Optional. Variant. The number of bytes to be used in decoding.

Return Values

Integer() - An array of characters decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetCharsEx

GetCharsEx

Decodes a set of bytes into the supplied Integer array.

 Public Function GetCharsEx(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
ByteIndex
[ByVal] Long. The index of the first byte to begin decoding from.
ByteCount
[ByVal] Long. The number of bytes to be used in decoding.
Chars
[ByRef] Integer. The destination character array for the decoded bytes.
CharIndex
[ByVal] Long. The first index to begin storing decoded bytes in Chars.

Return Values

Long - The number of characters decoded from the array of bytes.

Remarks

The Chars array must be large enough to handle all the bytes that will be decoded. To ensure the Chars array is large enough, use either GetCharCount or GetMaxCharCount to determine a size that will hold the decoded bytes.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetDecoder

GetDecoder

Returns a decoder that maintains state.

 Public Function GetDecoder ( ) As Decoder

Return Values

Decoder - The stateful decoder.

Remarks

Unlike UnicodeEncoding, the decoder maintains state between decoding calls. Since a single unicode character required exactly 2 bytes to be decoded, it is possible that an odd number of bytes may be attempted to be decoding, creating an orphaned byte which represents only half of a unicode character. The remaining byte is held until the next decoding call, and the byte is then inserted at the beginning of the next set of bytes to be decoded, picking up byte decoding where the orphaned byte left off.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetEncoder

GetEncoder

Returns an encoder that maintains state.

 Public Function GetEncoder ( ) As Encoder

Return Values

Encoder - The stateful encoder.

Remarks

Since encoding Unicode characters equates to exactly 2 bytes per character, there is no state that is maintained between calls. This method functions identically to GetBytes.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | IObject


ASCIIEncoding: GetMaxByteCount

GetMaxByteCount

Returns the maximum number of bytes that can be created from a specific number of characters.

 Public Function GetMaxByteCount(
      ByVal CharCount As Long ) As Long

Parameters

CharCount
[ByVal] Long. The number of characters to be encoded.

Return Values

Long - The maximum number of bytes that can be generated from the specified number of characters.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetMaxCharCount

GetMaxCharCount

Returns the maximum number of characters than can be decoded from the number of bytes specified.

 Public Function GetMaxCharCount(
      ByVal ByteCount As Long ) As Long

Parameters

ByteCount
[ByVal] Long. The number of bytes to be decoded.

Return Values

Long - The maximum number of characters that can be decoded from the specified number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetPreamble

GetPreamble

Returns an array of bytes that represents this encoding.

 Public Function GetPreamble ( ) As Byte ( )

Return Values

Byte() - A byte array containg the bytes to be used to identify this encoding type.

Remarks

If the encoding was created setting the BigEndian paramter to true, then this will return the Unicode byte array identifer &HFEFF otherwise &HFFFE for a non-bigEndian encoding. If no identifier is to be emitted, then an empty byte array is returned (not a null array).

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: GetString

GetString

Decodes a set of bytes into a String.

 Public Function GetString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into a string.
Index
[ByRef] Optional. Variant. The index of the first byte to be decoded.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the decoding.

Return Values

String - A string containing the decoded set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: HeaderName (get)

HeaderName

Returns the encoding name to be used in with the mail agent header tags.

 Public Property Get HeaderName ( ) As String

Return Values

String - The header tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview


ASCIIEncoding: IsBrowserDisplay (get)

IsBrowserDisplay

Indicates if this encoding can be used by browsers to display text.

 Public Property Get IsBrowserDisplay ( ) As Boolean

Return Values

Boolean - The indication for browser display capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: IsBrowserSave (get)

IsBrowserSave

Indicates if this encoding can be used to save data with this encoding.

 Public Property Get IsBrowserSave ( ) As Boolean

Return Values

Boolean - The indication for the browser saving capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: IsMailNewsDisplay (get)

IsMailNewsDisplay

Indicates if this encoding can be used to display mail and news by mail and news clients.

 Public Property Get IsMailNewsDisplay ( ) As Boolean

Return Values

Boolean - Indication for mail and news client capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: IsMailNewsSave (get)

IsMailNewsSave

Indicates if this encoding can be used to save date by mail and news clients.

 Public Property Get IsMailNewsSave ( ) As Boolean

Return Values

Boolean - Indication for the mail and news clients to use this encoding for saving.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: IsSingleByte (get)

IsSingleByte

Returns if the current encoding uses single-byte code points.

 Public Property Get IsSingleByte ( ) As Boolean

Return Values

Boolean - Returns True for single-byte, False for multi-byte code points.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview


ASCIIEncoding: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | IObject


ASCIIEncoding: WebName (get)

WebName

Returns the encoding name registered with the Internet Assigned Numbers Authority.

 Public Property Get WebName ( ) As String

Return Values

String - The registered encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


ASCIIEncoding: WindowsCodePage (get)

WindowsCodePage

Returns the Windows Operating Systems code page for this encoding.

 Public Property Get WindowsCodePage ( ) As Long

Return Values

Long - The Windows code page for this encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ASCIIEncoding Overview | Encoding


AsymmetricAlgorithm

AsymmetricAlgorithm

Provides a common interface to be implemented by all Asymmetrical algorithm classes.

See Also

Project VBCorLib Overview RSACryptoServiceProvider | DSACryptoServiceProvider

Public:

Properties:

Name | Description
KeyExchangeAlgorithm (get) | Returns the exchange algorithm used for key exchanges.
KeySize (get) | Returns the key size of the current algorithm instance.
KeySize (let) | Sets the key size to be used by the current algorithm instance.
LegalKeySizes (get) | Returns an array of KeySizes representing all legal and valid key sizes for the current instance of the algorithm.
SignatureAlgorithm (get) | Returns the name of the algorithm used for signing data and hashes.

Methods:

Name | Description
Clear | Releases all resources used by the current algorithm instance.
Equals | Returns if the value and this object instance are equal.
FromXmlString | Initializes an Asymmetric Algorithm instance from an XML string.
GetHashCode | Returns a semi-unique value genetated for this instance.
ToString | Returns a string representation of this instance.
ToXmlString | Returns an XML representation of the Asymmetrice Algorithm.


AsymmetricAlgorithm: Clear

Clear

Releases all resources used by the current algorithm instance.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: Equals

Equals

Returns if the value and this object instance are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean - Returns True if the value and this object instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: FromXmlString

FromXmlString

Initializes an Asymmetric Algorithm instance from an XML string.

 Public Sub FromXmlString(
      ByVal XmlString As String )

Parameters

XmlString
[ByVal] String. The string to initialize the instance from.

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: GetHashCode

GetHashCode

Returns a semi-unique value genetated for this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: KeyExchangeAlgorithm (get)

KeyExchangeAlgorithm

Returns the exchange algorithm used for key exchanges.

 Public Property Get KeyExchangeAlgorithm ( ) As String

Return Values

String - A string name of the key exchange algorithm.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: KeySize (get)

KeySize

Returns the key size of the current algorithm instance.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size being used by the current algorithm instance.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: KeySize (let)

KeySize

Sets the key size to be used by the current algorithm instance.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The new key size value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: LegalKeySizes (get)

LegalKeySizes

Returns an array of KeySizes representing all legal and valid key sizes for the current instance of the algorithm.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A array of KeySizes objects.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: SignatureAlgorithm (get)

SignatureAlgorithm

Returns the name of the algorithm used for signing data and hashes.

 Public Property Get SignatureAlgorithm ( ) As String

Return Values

String - The name of the algorithm used for signing.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string describing this instance.

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsymmetricAlgorithm: ToXmlString

ToXmlString

Returns an XML representation of the Asymmetrice Algorithm.

 Public Function ToXmlString(
      ByVal IncludePrivateParameters As Boolean ) As String

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portion of the key should be included in the XML string.

Return Values

String - An XML string.

Remarks

See Also

Project VBCorLib Overview | Class AsymmetricAlgorithm Overview


AsyncCallback

AsyncCallback

Used as a means for asynchronous operations to notify when a procedure is finished.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Execute | The method called by an asynchronous operation when it has completed.


AsyncCallback: Execute

Execute

The method called by an asynchronous operation when it has completed.

 Public Sub Execute(
      ByVal ar As IAsyncResult )

Parameters

ar
[ByVal] IAsyncResult. The result of the operation.

Remarks

This interface should be implemented in a class that is to respond to the asynchronous operation.

See Also

Project VBCorLib Overview | Class AsyncCallback Overview


BigInteger

BigInteger

Represents an unlimited size signed integer value.

Remarks

The BigInteger can represent a positive or negative value limited in size by only by memory. Negative values are represented in a Twos Complement fashion mimicking the way the hardware and VB uses signed integer values.

The value is represented internally as an array of Integers. This was selected over Bytes because of the speed increase with working with multiple bytes simultaneously. However, Integers are never revealed outside of the class, only byte arrays.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
Precision (get) | Returns the number of bytes being used to represent the number.
Sign (get) | Returns the sign of the number this instance represents.

Methods:

Name | Description
Absolute | Returns the absolute (positive or zero) value of this instance.
Add | Adds a value to this instance of BigInteger.
AndBits | Peforms a bitwise AND of this BigInteger instance and the value passed in.
AndNotBits | Peforms a bitwise AND of this BigInteger instance and the NOT value passed in.
ClearBit | Clears the specified bit of the BigInteger instance to 0.
CompareTo | Compares two BigInteger instance to each other returning their relation.
Divide | Divides this BigInteger instance by the supplied divisor.
DivRem | Divides this value by the value, returning the quotient and remainding.
Equals | Determines if this BigInteger instance is equal to the other value.
Factorial | Returns the factorial of this BigInteger value.
FlipBit | Flips the specified bit, toggling between True and False.
GreatestCommonDivisor | Returns the greatest common divisor between this instance and the passed in value.
Max | Returns the maximum of this instance and a second BigInteger instance.
Min | Returns the mininum of this instance and a second BigInteger instance.
Modulus | Performs a modulus operation, returning the remainder.
Multiply | Multiplies this instance of BigInteger by the supplied multiplier.
Negate | Returns the opposite signed value of this BigInteger instance.
NotBits | Peforms a bitwise NOT of this BigInteger instance and the value passed in.
OrBits | Performs a bitwise OR of this BigInteger instance and the value passed in.
Pow | Raises the BigInteger value to the specified power.
SetBit | Sets the specified bit of the BigInteger instance to 1.
ShiftLeft | Performs a left shift operation on the BigInteger instance.
ShiftRight | Performs a bit shifting operation to the the right.
SquareRoot | Returns the integer square root of a BigInteger.
Subtract | Subtracts a value to this instance of BigInteger.
TestBit | Tests a specific bit in the number to determine if it is set (1) or not (0).
ToArray | Returns a byte array representing the number.
ToString | Returns a human readable string of characters representing the number.
XorBits | Performs a bitwise XOR of this BigInteger instance and the value passed in.


BigInteger: Absolute

Absolute

Returns the absolute (positive or zero) value of this instance.

 Public Function Absolute ( ) As BigInteger

Return Values

BigInteger - Returns a positive (or zero) value of the current BigInteger instance.

Remarks

If the value is already positive or zero, then the same object instance is returned. If the value is negative, then the negated value is returned.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Add

Add

Adds a value to this instance of BigInteger.

 Public Function Add(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to be added to this instance.

Return Values

BigInteger - A new instance of BigInteger containing the summed value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = b.Add(BInt(150))
 Debug.Print b.ToString ' 250

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: AndBits

AndBits

Peforms a bitwise AND of this BigInteger instance and the value passed in.

 Public Function AndBits(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. The value to perform the bitwise AND with.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise AND result.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: AndNotBits

AndNotBits

Peforms a bitwise AND of this BigInteger instance and the NOT value passed in.

 Public Function AndNotBits(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. The value that will be NOTted to perform the bitwise AND with.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise AND/NOT result.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: ClearBit

ClearBit

Clears the specified bit of the BigInteger instance to 0.

 Public Function ClearBit(
      ByVal bit As Long ) As BigInteger

Parameters

bit
[ByVal] Long. The bit to be set to 0.

Return Values

BigInteger - A new BigInteger value with the bit set to 0.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: CompareTo

CompareTo

Compares two BigInteger instance to each other returning their relation.

 Public Function CompareTo(
      ByVal other As BigInteger ) As Long

Parameters

other
[ByVal] BigInteger. The right handed value to compare this instance against.

Return Values

Long - Returns the relation between this instance and the other number.

Remarks

If Nothing is passed in, it is treated as zero.
If this instance < other then -1 is returned
If this instance = other then 0 is returned
If this instance > other then 1 is returned.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Divide

Divide

Divides this BigInteger instance by the supplied divisor.

 Public Function Divide(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to divide this instance by.

Return Values

BigInteger - A new instance of BigInteger containing the quotient value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = b.Divide(BInt(40))
 Debug.Print b.ToString ' 2

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: DivRem

DivRem

Divides this value by the value, returning the quotient and remainding.

 Public Function DivRem(
      ByVal value As BigInteger,
      ByRef remainder As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to divide this instance by.
remainder
[ByRef] BigInteger. A reference to the variable to receive the remainder as a result of the division.

Return Values

BigInteger - A new instance of BigInteger containing the quotient value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Dim r As BigInteger
 Dim q As BigInteger
 Set b = BInt(100)
 Set q = b.DivRem(BInt(40), r)
 Debug.Print q.ToString ' 2
 Debug.Print r.ToString ' 20

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Equals

Equals

Determines if this BigInteger instance is equal to the other value.

 Public Function Equals(
      ByVal other As BigInteger ) As Boolean

Parameters

other
[ByVal] BigInteger. The other value to determine if this instance is equal to.

Return Values

Boolean - Returns True if this object and the other value are equal, False otherwise.

Remarks

The other value accepts a String, Number, Byte Array, or BigInteger object. The BInt function is called to convert the other value to a BigInteger object before comparison.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Factorial

Factorial

Returns the factorial of this BigInteger value.

 Public Function Factorial ( ) As BigInteger

Return Values

BigInteger - The factorial of this BigInteger instance value.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: FlipBit

FlipBit

Flips the specified bit, toggling between True and False.

 Public Function FlipBit(
      ByVal bit As Long ) As BigInteger

Parameters

bit
[ByVal] Long. The bit to toggle.

Return Values

BigInteger - A new BigInteger with the specified bit flipped.

Remarks

If the bit specified is larger than the current instance of the BigInteger value, then the new value will be extended to include the bit being flipped.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: GreatestCommonDivisor

GreatestCommonDivisor

Returns the greatest common divisor between this instance and the passed in value.

 Public Function GreatestCommonDivisor(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. The other value used to determine the greatest common divisor between.

Return Values

BigInteger - Returns the greatest common divisor for the two values.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Max

Max

Returns the maximum of this instance and a second BigInteger instance.

 Public Function Max(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. One of the two values to be tested.

Return Values

BigInteger - If this instance is equal to or greater than value, then this instance is returned, otherwise value is returned.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Min

Min

Returns the mininum of this instance and a second BigInteger instance.

 Public Function Min(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. One of the two values to be tested.

Return Values

BigInteger - If this instance is less than or equal to value, then this instance is returned, otherwise value is returned.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Modulus

Modulus

Performs a modulus operation, returning the remainder.

 Public Function Modulus(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to divide this instance by.

Return Values

BigInteger - The modulus (remainder) of the division.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = b.Modulus(BInt(40))
 Debug.Print b.ToString ' 20

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Multiply

Multiply

Multiplies this instance of BigInteger by the supplied multiplier.

 Public Function Multiply(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to multiply this instance by.

Return Values

BigInteger - A new instance of BigInteger containing the product value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = b.Multiply(BInt(150))
 Debug.Print b.ToString ' 15000

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Negate

Negate

Returns the opposite signed value of this BigInteger instance.

 Public Function Negate ( ) As BigInteger

Return Values

BigInteger - Returns a BigInteger instance containing the opposite signed value.

Remarks

Negative values are represented as a Twos Complement number, unlike other systems used to represent a negative value. Any negation requires the Twos Complement algorithm to be applied to the number. This keeps in step with how users of VB already deal with negative numbers, helping to ease the transition to using BigInteger values.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: NotBits

NotBits

Peforms a bitwise NOT of this BigInteger instance and the value passed in.

 Public Function NotBits ( ) As BigInteger

Return Values

BigInteger - A new BigInteger value containing the performed bitwise NOT result.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: OrBits

OrBits

Performs a bitwise OR of this BigInteger instance and the value passed in.

 Public Function OrBits(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. The value to perform the bitwise OR with.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise OR result.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Pow

Pow

Raises the BigInteger value to the specified power.

 Public Function Pow(
      ByVal exponent As BigInteger ) As BigInteger

Parameters

exponent
[ByVal] BigInteger. The value to raise the BigInteger value to.

Return Values

BigInteger - Returns the BigInteger value raised to the specified power.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Precision (get)

Precision

Returns the number of bytes being used to represent the number.

 Public Property Get Precision ( ) As Long

Return Values

Long - The number of bytes being used to represent the number.

Remarks

There may be additional bytes allocated, but not considered as part of the number. Those bytes are not represented in the precision.

Since a negative value can have an infinite number of leading &HFFFF values, only 1 (2 bytes) is counted if it is needed.

Read Only.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: SetBit

SetBit

Sets the specified bit of the BigInteger instance to 1.

 Public Function SetBit(
      ByVal bit As Long ) As BigInteger

Parameters

bit
[ByVal] Long. The bit to be set to 1.

Return Values

BigInteger - A new BigInteger value with the bit set to 1.

Remarks

If the bit specified is larger than the current instance of the BigInteger value, then the new value will be extended to include the bit being set.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: ShiftLeft

ShiftLeft

Performs a left shift operation on the BigInteger instance.

 Public Function ShiftLeft(
      ByVal bitCount As Long ) As BigInteger

Parameters

bitCount
[ByVal] Long. The number of bits the value is to be shifted left.

Return Values

BigInteger - Returns a new BigInteger instance containing the shifted value.

Remarks

If bitCount is negative, then a right shift is performed.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: ShiftRight

ShiftRight

Performs a bit shifting operation to the the right.

 Public Function ShiftRight(
      ByVal bitCount As Long ) As BigInteger

Parameters

bitCount
[ByVal] Long. The number of bits the BigInteger value is to be shifted.

Return Values

BigInteger - Returns a new BigInteger instance containing the bit shifted value.

Remarks

If bitCount is negative, then a left shift is performed.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Sign (get)

Sign

Returns the sign of the number this instance represents.

 Public Property Get Sign ( ) As Sign

Return Values

Sign - The value of type Sign representing the sign of the number.

Remarks

Returns -1 for negative, 0 for zero, 1 for positive.

Read Only.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: SquareRoot

SquareRoot

Returns the integer square root of a BigInteger.

 Public Function SquareRoot ( ) As BigInteger

Return Values

BigInteger - The integer square root of the value.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: Subtract

Subtract

Subtracts a value to this instance of BigInteger.

 Public Function Subtract(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. A numeric representation of the value to be subtracted to this instance.

Return Values

BigInteger - A new instance of BigInteger containing the differenced value.

Remarks

This method accepts a BigInteger, one of VBs numeric values or a string to be parsed.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = b.Subtract(BInt(150))
 Debug.Print b.ToString ' -50

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: TestBit

TestBit

Tests a specific bit in the number to determine if it is set (1) or not (0).

 Public Function TestBit(
      ByVal bit As Long ) As Boolean

Parameters

bit
[ByVal] Long. The bit to be tested.

Return Values

Boolean - Returns True if the bit is set (1), false if it is not (0).

Remarks

The max value for bit is 2147483647. If the bit value is larger than the BigInteger instance, then the sign of the number is used. This will represent a negative number with infinite sign extension bits.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: ToArray

ToArray

Returns a byte array representing the number.

 Public Function ToArray ( ) As Byte ( )

Return Values

Byte() - A byte array the same length as Precision that represents the number.

Remarks

To represent a byte array for a negative value, the highest bit must be set. To ensure this, a pair of bytes with the value of &HFF may be part of the return value.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: ToString

ToString

Returns a human readable string of characters representing the number.

 Public Function ToString(
      Optional ByVal format As String ) As String

Parameters

format
[ByVal] Optional. String. The specific numerical format wish to have the number displayed as.

Return Values

String - The numeric value of the number in the specified format.

Remarks

"X" and "x" for hex in either upper or lowercase. "B" or "b" for a binary representation of 1s and 0's. Everything else defaults to a decimal display.

The specifier can also contain a number of mininum digits to be displayed. If the value isnt long enough to reach the mininum digits, then leading 0's, 1's, or FFs will be added to the beginning of the output.

 Dim b As BigInteger
 Set b = BInt(-200)
 Debug.Print b.ToString("d8") ' -00000200
 Debug.Print b.ToString("d")  ' -200
 Debug.Print b.ToString("x8") ' ffffff38
 Debug.Print b.ToString("x")  ' ff38
 Debug.Print b.ToString("b8") ' 1111111100111000
 Debug.Print b.ToString("b")  ' 1111111100111000

If no format is specified, the default of "d" is used.

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigInteger: XorBits

XorBits

Performs a bitwise XOR of this BigInteger instance and the value passed in.

 Public Function XorBits(
      ByVal value As BigInteger ) As BigInteger

Parameters

value
[ByVal] BigInteger. The value to perform the bitwise XOR with.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise XOR result.

Remarks

See Also

Project VBCorLib Overview | Class BigInteger Overview


BigIntegerStatic

BigIntegerStatic

Provides methods used to manipulate BigInteger objects.

Remarks

The methods provided by this class are accessed through the convention of BigInteger.MethodName.

 Dim b As BigInteger
 Set b = BigInteger.Rnd(128)
 Set b = BigInteger.Pow(b, BInt(3))

Most of these methods exist in the BitInteger class and can be used directly with BigInteger objects. The primary advantage of using the methods defined in this class is that a value of Nothing can be passed in and will be treated as a value of 0.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
MinusOne (get) | Returns a shared BigInteger instance with the value of -1.
One (get) | Returns a shared BigInteger instance with the value of 1.
Ten (get) | Returns a shared BigInteger instance with the value of 10.
Zero (get) | Returns a shared BigInteger instance with the value of 0.

Methods:

Name | Description
Absolute | Returns the absolute (positive or zero) value of this instance.
Add | Adds two BigInteger value instances together, returning the sum.
AndBits | Peforms a bitwise AND operation, returning the result.
AndNotBits | Peforms a bitwise AND operation after NOTting the second operand, returning the result.
ClearBit | Clears the specified bit of the BigInteger instance to 0.
Compare | Compares two BigInteger instance to each other returning their relation.
Divide | Divides one BigInteger value by another, returning the quotient.
DivRem | Divides one BigInteger value by another, returning both the quotient and remainder.
Equals | Returns the equality of two BigInteger values.
Factorial | Calculates the factorial of an integer value.
FlipBit | Flips the specified bit, toggling between True and False.
GreatestCommonDivisor | Returns the greatest common divisor between the two BigInteger values.
Max | Returns the maximum of the two BigInteger values.
Min | Returns the mininum of the two BigInteger values.
ModPow | Performs a modulo on a BigInteger value raised to a power. b = (x^y) mod z.
Modulus | Returns the modulus (remainder) of division between two BigInteger values.
Multiply | Multiplies BigInteger values, returning their product.
Negate | Returns the opposite signed value of this BigInteger instance.
NotBits | Peforms a bitwise NOT of this BigInteger instance.
OrBits | Peforms a bitwise OR operation, returning the result.
Parse | Attemps to parse a string of characters of the specified base type.
Pow | Raise a base value to the specified power.
Randomize | Randomizes the Rnd function.
Rnd | Generates a random BigInteger number of the specified size.
SeedRnd | Sets the seeding of the Rnd function.
SetBit | Sets the specified bit of the BigInteger instance to 1.
ShiftLeft | Performs a left shift operation on the BigInteger instance.
ShiftRight | Performs a bit shifting operation to the the right.
SquareRoot | Returns the integer square root of a BigInteger.
Subtract | Subtracts one BigInteger value from another, returning the difference.
TestBit | Tests a specific bit in the BigInteger number to determine if it is set (1) or not (0).
ToString | Returns a human readable string of characters representing the number.
TryParse | Attemps to parse a string of characters of the specified base type.
XorBits | Peforms a bitwise XOR operation, returning the result.


BigIntegerStatic: Absolute

Absolute

Returns the absolute (positive or zero) value of this instance.

 Public Function Absolute(
      ByVal x As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger value to return the absolute value of.

Return Values

BigInteger - Returns a positive (or zero) value of the current BigInteger instance.

Remarks

If the value is already positive or zero, then the same object instance is returned. If the value is negative, then the negated value is returned.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Add

Add

Adds two BigInteger value instances together, returning the sum.

 Public Function Add(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The augend to be added to.
y
[ByVal] BigInteger. The addend to add to the augend.

Return Values

BigInteger - The sum of the two values.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Set b = BigInteger.Add(BInt(100), BInt(150))
 Debug.Print b.ToString ' 250

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: AndBits

AndBits

Peforms a bitwise AND operation, returning the result.

 Public Function AndBits(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The left hand value of the AND operation.
y
[ByVal] BigInteger. The right hand value of the AND operation.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise AND result.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: AndNotBits

AndNotBits

Peforms a bitwise AND operation after NOTting the second operand, returning the result.

 Public Function AndNotBits(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The left hand value of the operation.
y
[ByVal] BigInteger. The right hand value to be NOTted for the operation.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise result.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: ClearBit

ClearBit

Clears the specified bit of the BigInteger instance to 0.

 Public Function ClearBit(
      ByVal x As BigInteger,
      ByVal bit As Long ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger value to clear the bit on.
bit
[ByVal] Long. The bit to be set to 0.

Return Values

BigInteger - A new BigInteger value with the bit set to 0.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Compare

Compare

Compares two BigInteger instance to each other returning their relation.

 Public Function Compare(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As Long

Parameters

x
[ByVal] BigInteger. The left handed value to be compared to.
y
[ByVal] BigInteger. The right handed value to be compared to.

Return Values

Long - Returns the relation between to the two numbers.

Remarks

If Nothing is passed in, it is treated as zero.
If x < y then -1 is returned
If x = y then 0 is returned
If x > y then 1 is returned.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Divide

Divide

Divides one BigInteger value by another, returning the quotient.

 Public Function Divide(
      ByVal dividend As BigInteger,
      ByVal divisor As BigInteger ) As BigInteger

Parameters

dividend
[ByVal] BigInteger. The BigInteger value to be divided.
divisor
[ByVal] BigInteger. The BigInteger value to divide by.

Return Values

BigInteger - The quotient of the division.

Remarks

Values of Nothing will be treated as zero.

Integer division is applied, there is no rounding values. This method discards the remainder.

 Dim b As BigInteger
 Set b = BigInteger.Divide(BInt(100), BInt(40))
 Debug.Print b.ToString ' 2

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: DivRem

DivRem

Divides one BigInteger value by another, returning both the quotient and remainder.

 Public Function DivRem(
      ByVal dividend As BigInteger,
      ByVal divisor As BigInteger,
      ByRef remainder As BigInteger ) As BigInteger

Parameters

dividend
[ByVal] BigInteger. The BigInteger value to be divided.
divisor
[ByVal] BigInteger. The BigInteger value to divide by.
remainder
[ByRef] BigInteger. A variable to place the remainder in to.

Return Values

BigInteger - The quotient of the division.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Dim r As BigInteger
 Dim q As BigInteger
 Set b = BInt(100)
 Set q = BigInteger.DivRem(b, BInt(40), r)
 Debug.Print q.ToString ' 2
 Debug.Print r.ToString ' 20

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Equals

Equals

Returns the equality of two BigInteger values.

 Public Function Equals(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As Boolean

Parameters

x
[ByVal] BigInteger. The left handed value to test for equality.
y
[ByVal] BigInteger. The right handed value to test for equality.

Return Values

Boolean - Returns True if the values are equal, False otherwise.

Remarks

If Nothing is passed in, it is treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Factorial

Factorial

Calculates the factorial of an integer value.

 Public Function Factorial(
      ByVal x As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The value to calculate the factorial of.

Return Values

BigInteger - A BigInteger value of the factorial.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: FlipBit

FlipBit

Flips the specified bit, toggling between True and False.

 Public Function FlipBit(
      ByVal x As BigInteger,
      ByVal bit As Long ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger value to flip the bit on.
bit
[ByVal] Long. The bit to toggle.

Return Values

BigInteger - A new BigInteger with the specified bit flipped.

Remarks

If the bit specified is larger than the current instance of the BigInteger value, then the new value will be extended to include the bit being flipped.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: GreatestCommonDivisor

GreatestCommonDivisor

Returns the greatest common divisor between the two BigInteger values.

 Public Function GreatestCommonDivisor(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. One of the values to find the GCD of.
y
[ByVal] BigInteger. One of the values to find the GCD of.

Return Values

BigInteger - Returns the GCD for two given values.

Remarks

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Max

Max

Returns the maximum of the two BigInteger values.

 Public Function Max(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. One of the two values to be tested.
y
[ByVal] BigInteger. One of the two values to be tested.

Return Values

BigInteger - If x is equal or greater than y, then x is returned, otherwise y is returned.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Min

Min

Returns the mininum of the two BigInteger values.

 Public Function Min(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. One of the two values to be tested.
y
[ByVal] BigInteger. One of the two values to be tested.

Return Values

BigInteger - If x is less or equal to y, then x is returned, otherwise y is returned.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: MinusOne (get)

MinusOne

Returns a shared BigInteger instance with the value of -1.

 Public Property Get MinusOne ( ) As BigInteger

Return Values

BigInteger - Returns a shared instance of the value of -1.

Remarks

This is to reduce the creation of multiple instances of values that are commonly used.

Read Only.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: ModPow

ModPow

Performs a modulo on a BigInteger value raised to a power. b = (x^y) mod z.

 Public Function ModPow(
      ByVal baseValue As BigInteger,
      ByVal exponent As BigInteger,
      ByVal m As BigInteger ) As BigInteger

Parameters

baseValue
[ByVal] BigInteger. The value to be raised to the power of the exponent.
exponent
[ByVal] BigInteger. The power to raise the baseValue to.
m
[ByVal] BigInteger. The modulus value to perform on the raised baseValue.

Return Values

BigInteger - Returns the modulus of the raised baseValue.

Values of Nothing are treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Modulus

Modulus

Returns the modulus (remainder) of division between two BigInteger values.

 Public Function Modulus(
      ByVal dividend As BigInteger,
      ByVal divisor As BigInteger ) As BigInteger

Parameters

dividend
[ByVal] BigInteger. The value to be divided.
divisor
[ByVal] BigInteger. The value to divide by.

Return Values

BigInteger - Returns the remainder portion of the division operation.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Set b = BInt(100)
 Set b = BigInteger.Modulus(b, BInt(40))
 Debug.Print b.ToString ' 20

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Multiply

Multiply

Multiplies BigInteger values, returning their product.

 Public Function Multiply(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The multiplicand to be multiplied.
y
[ByVal] BigInteger. The multiplier to multiply by.

Return Values

BigInteger - The product of the two values.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Set b = BigInteger.Multiply(BInt(100), BInt(150))
 Debug.Print b.ToString ' 15000

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Negate

Negate

Returns the opposite signed value of this BigInteger instance.

 Public Function Negate(
      ByVal x As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The value to be negated.

Return Values

BigInteger - Returns a BigInteger instance containing the opposite signed value.

Remarks

Negative values are represented as a Twos Complement number, unlike other systems used to represent a negative value. Any negation requires the Twos Complement algorithm to be applied to the number. This keeps in step with how users of VB already deal with negative numbers, helping to ease the transition to using BigInteger values.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: NotBits

NotBits

Peforms a bitwise NOT of this BigInteger instance.

 Public Function NotBits(
      ByVal x As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger to perform the NOT operation on.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise NOT result.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: One (get)

One

Returns a shared BigInteger instance with the value of 1.

 Public Property Get One ( ) As BigInteger

Return Values

BigInteger - Returns a shared instance of the value of 1.

Remarks

This is to reduce the creation of multiple instances of values that are commonly used.

Read Only.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: OrBits

OrBits

Peforms a bitwise OR operation, returning the result.

 Public Function OrBits(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The left hand value of the OR operation.
y
[ByVal] BigInteger. The right hand value of the OR operation.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise OR result.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Parse

Parse

Attemps to parse a string of characters of the specified base type.

 Public Function Parse(
      ByVal s As String ) As BigInteger

Parameters

s
[ByVal] String. The string of characters to attempt to be parsed.

Return Values

BigInteger - Returns an instance of BigInteger containing the parsed value.

Remarks

If the string could not be parsed, an exception is thrown.

3 base types are supported for parsing (Decimal, Hex, Binary.) The string must include a base type specifier for Hex and Binary. Decimal is the default.

Hex Specifiers: 0x, 0X, &H, &H - (0xFF, 0XFF, &HFF, &HFF)
Binary Specifiers: 0b, 0B - (0b00001111, 0B000011111)

Anything else will default to Decimal.
"-" is supported for all types of parsing.
 Dim b As BigInteger
 Set b = BigInteger.Parse("-&H7FFF")
 Debug.Print b.ToString("X") ' 8001

Parsing is not case sensitive.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Pow

Pow

Raise a base value to the specified power.

 Public Function Pow(
      ByVal baseValue As BigInteger,
      ByVal exponent As BigInteger ) As BigInteger

Parameters

baseValue
[ByVal] BigInteger. The value to be raised to a specified power.
exponent
[ByVal] BigInteger. The power to raise the value to.

Return Values

BigInteger - Returns the baseValue^exponent result.

Remarks

Values of Nothing are treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Randomize

Randomize

Randomizes the Rnd function.

 Public Sub Randomize(
      Optional ByVal num As Variant )

Parameters

num
[ByVal] Optional. Variant. The number used to randomize the Rnd method.

Remarks

This is provided because the VB Rnd function runs independently for each component.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Rnd

Rnd

Generates a random BigInteger number of the specified size.

 Public Function Rnd(
      ByVal size As Long,
      Optional ByVal isNegative As Boolean = False ) As BigInteger

Parameters

size
[ByVal] Long. The size of the number in bytes.
isNegative
[ByVal] Optional. Boolean. Indicates if a negative random number should be generated.

Default: False

Return Values

BigInteger - A new BigInteger of a random value.

Values of Nothing will be treated as zero.

A positive value is always generated.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: SeedRnd

SeedRnd

Sets the seeding of the Rnd function.

 Public Sub SeedRnd(
      Optional ByVal seed As Variant )

Parameters

seed
[ByVal] Optional. Variant. The number to be used as the seed.

Remarks

This is provided because the VB Rnd function runs independently for each component.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: SetBit

SetBit

Sets the specified bit of the BigInteger instance to 1.

 Public Function SetBit(
      ByVal x As BigInteger,
      ByVal bit As Long ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger value to set the bit on.
bit
[ByVal] Long. The bit to be set to 1.

Return Values

BigInteger - A new BigInteger value with the bit set to 1.

Remarks

If the bit specified is larger than the current instance of the BigInteger value, then the new value will be extended to include the bit being set.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: ShiftLeft

ShiftLeft

Performs a left shift operation on the BigInteger instance.

 Public Function ShiftLeft(
      ByVal x As BigInteger,
      ByVal bitCount As Long ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger to shift left.
bitCount
[ByVal] Long. The number of bits the value is to be shifted left.

Return Values

BigInteger - Returns a new BigInteger instance containing the shifted value.

Remarks

If bitCount is negative, then a right shift is performed.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: ShiftRight

ShiftRight

Performs a bit shifting operation to the the right.

 Public Function ShiftRight(
      ByVal x As BigInteger,
      ByVal bitCount As Long ) As BigInteger

Parameters

x
[ByVal] BigInteger. The BigInteger to shift right.
bitCount
[ByVal] Long. The number of bits the BigInteger value is to be shifted.

Return Values

BigInteger - Returns a new BigInteger instance containing the bit shifted value.

Remarks

If bitCount is negative, then a left shift is performed.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: SquareRoot

SquareRoot

Returns the integer square root of a BigInteger.

 Public Function SquareRoot(
      ByVal x As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The value to calculate the integer square root for.

Return Values

BigInteger - The integer square root of the value.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Subtract

Subtract

Subtracts one BigInteger value from another, returning the difference.

 Public Function Subtract(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The minuend value to be subracted from.
y
[ByVal] BigInteger. The subtrahend value to subtract from the minuend value.

Return Values

BigInteger - The difference of the two values.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Set b = BigInteger.Subtract(BInt(100), BInt(150))
 Debug.Print b.ToString ' -50

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Ten (get)

Ten

Returns a shared BigInteger instance with the value of 10.

 Public Property Get Ten ( ) As BigInteger

Return Values

BigInteger - Returns a shared instance of the value of 10.

Remarks

This is to reduce the creation of multiple instances of values that are commonly used.

Read Only.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: TestBit

TestBit

Tests a specific bit in the BigInteger number to determine if it is set (1) or not (0).

 Public Function TestBit(
      ByVal x As BigInteger,
      ByVal bit As Long ) As Boolean

Parameters

x
[ByVal] BigInteger. The BigInteger number to test the bit of.
bit
[ByVal] Long. The bit to be tested.

Return Values

Boolean - Returns True if the bit is set (1), false if it is not (0).

Remarks

The max value for bit is 2147483647. If the bit value is larger than the BigInteger instance, then the sign of the number is used. This will represent a negative number with infinite sign extension bits.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: ToString

ToString

Returns a human readable string of characters representing the number.

 Public Function ToString(
      ByVal x As BigInteger,
      Optional ByVal format As String ) As String

Parameters

x
[ByVal] BigInteger. The BigInteger to create a string from.
format
[ByVal] Optional. String. The specific numerical format wish to have the number displayed as.

Return Values

String - The numeric value of the number in the specified format.

Remarks

"X" and "x" for hex in either upper or lowercase. "B" or "b" for a binary representation of 1s and 0's. Everything else defaults to a decimal display.

The specifier can also contain a number of mininum digits to be displayed. If the value isnt long enough to reach the mininum digits, then leading 0's, 1's, or FFs will be added to the beginning of the output.

 Dim b As BigInteger
 Set b = BInt(-200)
 Debug.Print b.ToString("d8") ' -00000200
 Debug.Print b.ToString("d")  ' -200
 Debug.Print b.ToString("x8") ' ffffff38
 Debug.Print b.ToString("x")  ' ff38
 Debug.Print b.ToString("b8") ' 1111111100111000
 Debug.Print b.ToString("b")  ' 1111111100111000

If no format is specified, the default of "d" is used.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: TryParse

TryParse

Attemps to parse a string of characters of the specified base type.

 Public Function TryParse(
      ByVal s As String,
      ByRef b As BigInteger ) As Boolean

Parameters

s
[ByVal] String. The string of characters to attempt to be parsed.
b
[ByRef] BigInteger. The returning BigInteger object if the string was successfully parsed.

Return Values

Boolean - Returns True if the string was parsed, False otherwise.

Remarks

3 base types are supported for parsing (Decimal, Hex, Binary.) The string must include a base type specifier for Hex and Binary. Decimal is the default.

Hex Specifiers: 0x, 0X, &H, &H - (0xFF, 0XFF, &HFF, &HFF)
Binary Specifiers: 0b, 0B - (0b00001111, 0B000011111)

Anything else will default to Decimal.
"-" is supported for all types of parsing.
 Dim b As BigInteger
 Debug.Print BigInteger.TryParse("-&H7FFF", b) ' True
 Debug.Print b.ToString("X") ' 8001

Parsing is not case sensitive.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: XorBits

XorBits

Peforms a bitwise XOR operation, returning the result.

 Public Function XorBits(
      ByVal x As BigInteger,
      ByVal y As BigInteger ) As BigInteger

Parameters

x
[ByVal] BigInteger. The left hand value of the XOR operation.
y
[ByVal] BigInteger. The right hand value of the XOR operation.

Return Values

BigInteger - A new BigInteger value containing the performed bitwise XOR result.

Values of Nothing will be treated as zero.

Remarks

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BigIntegerStatic: Zero (get)

Zero

Returns a shared BigInteger instance with the value of 0.

 Public Property Get Zero ( ) As BigInteger

Return Values

BigInteger - Returns a shared instance of the value of 0.

Remarks

This is to reduce the creation of multiple instances of values that are commonly used.

Read Only.

See Also

Project VBCorLib Overview | Class BigIntegerStatic Overview


BinaryReader

BinaryReader

Provides a set of methods to read typed information from a Stream.

Remarks

The bytes from a stream can be read and cast to a specific datatype. Each datatype will determine the number of bytes to be read from the stream. Once the number of bytes have been read, they are assembled into the requested datatype, advancing the position in the stream the required number of bytes.

Characters can be read from the Stream using the provided Encoding system. The default encoding system is equal to New UTF8Encoding.

To create a new BinaryReader use the public constructor.

 Set reader = Cor.NewBinaryReader(MyFileStream)

 - or -

 Set reader = NewBinaryReader(MyFileStream)

See Also

Project VBCorLib Overview | Constructors | BinaryWriter

Implements:

IObject

Public:

Properties:

Name | Description
BaseStream (get) | Returns the underlying Stream being read by the Reader.

Methods:

Name | Description
CloseReader | Closes the reader and underlying Stream.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
PeekChar | Returns the next character to be decoded from the byte stream. The position in the stream is not advanced after the read.
Read | Fills either a Byte array or Integer array with the specified number of elements. Or returns the next character to be decoded from the stream.
ReadBoolean | Returns a boolean from the stream.
ReadByte | Reads the next byte in the stream, and advances the position one byte.
ReadBytes | Reads the specified number of bytes from the stream and returns them in an array.
ReadChar | Reads the next decode character in the stream, and advances the position the number of bytes requirece to assemble a single character.
ReadChars | Returns a specified number of characters decoded from the stream.
ReadCurrency | Reads 8 bytes from the stream and returns them as a Currency datatype.
ReadDate | Reads 8 bytes from the stream and returns them as a Date datatype.
ReadDecimal | Reads 16 bytes from the stream and returns them as a Variant Decimal datatype.
ReadDouble | Reads 8 bytes from the stream and returns them as a Double datatype.
ReadInteger | Reads 2 bytes from the stream and returns them as an Integer datatype.
ReadLong | Reads 4 bytes from the stream and returns them as a Long datatype.
ReadSingle | Reads 4 bytes from the stream and returns them as a Single datatype.
ReadString | Reads a String from the stream.
ToString | Returns a string representation of this object instance.


BinaryReader: BaseStream (get)

BaseStream

Returns the underlying Stream being read by the Reader.

 Public Property Get BaseStream ( ) As Stream

Return Values

Stream - The underlying Stream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: CloseReader

CloseReader

Closes the reader and underlying Stream.

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: PeekChar

PeekChar

Returns the next character to be decoded from the byte stream. The position in the stream is not advanced after the read.

 Public Function PeekChar ( ) As Long

Return Values

Long - The next character to be Read, or -1 if no more characters are in the stream.

Remarks

This function requires the stream to support Seeking. If it does not, then -1 will always be returned.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: Read

Read

Fills either a Byte array or Integer array with the specified number of elements. Or returns the next character to be decoded from the stream.

 Public Function Read(
      Optional ByRef Buffer As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Buffer
[ByRef] Optional. Variant. The array to write the data to.
Index
[ByRef] Optional. Variant. The first index in Buffer to start writing data.
Count
[ByRef] Optional. Variant. The number of elements to be written to the array.

Return Values

Long - The actual number of elements written to the array. This could be less than the requested amount.

Remarks

If a Byte array is passed in, then the bytes from the underlying stream are copied to the array. If an Integer array is passed in, then enough bytes are read from the stream to produce the requested number of decoded characters. The decoded characters are placed in the array starting at Index.

If all parameters are missing then a single character will be decoded from the stream and returned.

All parameters must either be missing or supplied or an exception is thrown.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadBoolean

ReadBoolean

Returns a boolean from the stream.

 Public Function ReadBoolean ( ) As Boolean

Return Values

Boolean - A boolean value.

Remarks

A single byte is read from the stream. If the byte is non-zero, then True is returned, otherwise False.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadByte

ReadByte

Reads the next byte in the stream, and advances the position one byte.

 Public Function ReadByte ( ) As Byte

Return Values

Byte - The next byte in the stream.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadBytes

ReadBytes

Reads the specified number of bytes from the stream and returns them in an array.

 Public Function ReadBytes(
      ByVal Count As Long ) As Byte ( )

Parameters

Count
[ByVal] Long. The number of bytes to read from the stream.

Return Values

Byte() - A byte array containing the bytes read from the stream.

Remarks

If not enough bytes are in the stream, then the remaining bytes are returned. If there are no bytes in the stream, then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadChar

ReadChar

Reads the next decode character in the stream, and advances the position the number of bytes requirece to assemble a single character.

 Public Function ReadChar ( ) As Long

Return Values

Long - The next character in the stream.

Remarks

If no characters are left in the stream, and EndOfStreamException is thrown.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadChars

ReadChars

Returns a specified number of characters decoded from the stream.

 Public Function ReadChars(
      ByVal Count As Long ) As Integer ( )

Parameters

Count
[ByVal] Long. The number of characters to decode from the stream.

Return Values

Integer() - The array of characters decoded from the stream.

Remarks

If not enough characters could be decoded from the stream, then only the remaining characters are returned. If no characters could be decoded, then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadCurrency

ReadCurrency

Reads 8 bytes from the stream and returns them as a Currency datatype.

 Public Function ReadCurrency ( ) As Currency

Return Values

Currency - A Currency datatype.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadDate

ReadDate

Reads 8 bytes from the stream and returns them as a Date datatype.

 Public Function ReadDate ( ) As Date

Return Values

Date - A Date datatype read from the stream.

Remarks

It is possible to read a combination of 8 bytes that convert into an invalid Date. This will cause and Overflow error.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadDecimal

ReadDecimal

Reads 16 bytes from the stream and returns them as a Variant Decimal datatype.

 Public Function ReadDecimal ( ) As Variant

Return Values

Variant - A Variant Decimal datatype.

Remarks

The Decimal datatype is created from 16 bytes with the same layout as used in .NET. The layout is different than that of VB.

VB Decimal layout
bytes 0-1: Variant datatype information
bytes 2: precision
bytes 3: sign (&H80 is negative)
bytes 4-7: the 32 highest bits in the 96bit value
bytes 8-11: the 32 lowest bits in the 96bit value
bytes 12-15: the 32 middle bits in the 96bit value

.NET Decimal layout
bytes 0-3: the 32 lowest bits in the 96bit value
bytes 4-7: the 32 middle bits in the 96bit value
bytes 8-11: the 32 highest bits in the 96bit value
bytes 12-13: unused (zero)
bytes 14: precision
bytes 15: sign (&H80 is negative)

If the sign byte is non-zero, then the Decimal will be set as negative.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadDouble

ReadDouble

Reads 8 bytes from the stream and returns them as a Double datatype.

 Public Function ReadDouble ( ) As Double

Return Values

Double - A Double datatype read from the stream.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadInteger

ReadInteger

Reads 2 bytes from the stream and returns them as an Integer datatype.

 Public Function ReadInteger ( ) As Integer

Return Values

Integer - An Integer datatype read from the stream.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadLong

ReadLong

Reads 4 bytes from the stream and returns them as a Long datatype.

 Public Function ReadLong ( ) As Long

Return Values

Long - A Long datatype read from the stream.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadSingle

ReadSingle

Reads 4 bytes from the stream and returns them as a Single datatype.

 Public Function ReadSingle ( ) As Single

Return Values

Single - A Single datatype.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ReadString

ReadString

Reads a String from the stream.

 Public Function ReadString ( ) As String

Return Values

String - The string datatype.

Remarks

The string is stored in the stream with the number of encoded bytes preceding the actual string data. The bytes are not the typical 4 bytes as is used by VB when representing the length of the string. The bytes represent a value encoded as 7bits per byte. While the next read byte has the high bit set (&H80), then the following byte is also part of the length value. For each byte read, first 7 bits of that byte is pushed out 7 bits multiplied by the current byte number - 1 in the sequence. This is not the normal shifting of the current sum of the values. Each read byte must be shifted left individually, as each byte represents a higher set of bits in the resulting number.

We AND the byte with &H3f because we only want the lower 7 bits.
byte 1: (byte and &H3f) << shifted 0 bits added to the sum
byte 2: (byte and &H3f) << shifted 7 bits added to the sum
byte 3: (byte and &H3f) << shifted 14 bits added to the sum

.. this continues until a byte is less than 128. At which point, it is shifted and summed like the rest, but no more bytes are to be read in. The sum now contains the number of bytes to be read in and decoded into the string. The same Encoding type must be used to retrieve the correct string value. Using a different Encoding method will create the wrong string.

Once the length is determined, then enough bytes are read in that can be decoded to the string using the current Encoding system.

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryReader: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class BinaryReader Overview


BinaryWriter

BinaryWriter

Provides methods to write typed information to a stream.

Remarks

The datatypes that are written to the stream are written in their binary form. The value are written as they are represented in memory. For example, as datatype of vbLong is written as 4 bytes, regardless of the actual value of the vbLong variable.

See Also

Project VBCorLib Overview | Constructors | BinaryReader

Implements:

IObject

Public:

Properties:

Name | Description
BaseStream (get) | Returns the underlying stream this writer is writing to.

Methods:

Name | Description
CloseWriter | Closes the writer, flushing any data.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Tells the underlying stream to store its data to its repository.
GetHashCode | Returns a pseudo-unique number identifying this instance.
SeekPosition | Sets the underlying streams current position.
ToString | Returns a string representation of this object instance.
WriteChar | Writes a character to the underlying stream.
WriteValue | Writes the binary representation of a datatype to the underlying stream.


BinaryWriter: BaseStream (get)

BaseStream

Returns the underlying stream this writer is writing to.

 Public Property Get BaseStream ( ) As Stream

Return Values

Stream - The underlying stream.

Remarks

The stream is flushed before it is returned.

Read Only.

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: CloseWriter

CloseWriter

Closes the writer, flushing any data.

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview | IObject


BinaryWriter: Flush

Flush

Tells the underlying stream to store its data to its repository.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview | IObject


BinaryWriter: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: SeekPosition

SeekPosition

Sets the underlying streams current position.

 Public Function SeekPosition(
      ByVal Offset As Currency,
      ByVal Origin As SeekOrigin ) As Currency

Parameters

Offset
[ByVal] Currency. The number of bytes to move the position.
Origin
[ByVal] SeekOrigin. The starting point to move from in the stream.

Return Values

Currency - The final position in the stream.

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class BinaryWriter Overview | IObject


BinaryWriter: WriteChar

WriteChar

Writes a character to the underlying stream.

 Public Sub WriteChar(
      ByRef Value As Variant )

Parameters

Value
[ByRef] Variant. The character to be written. This can be a string or numeric value.

Remarks

The character is encoded and the byte array is written to the Stream.

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BinaryWriter: WriteValue

WriteValue

Writes the binary representation of a datatype to the underlying stream.

 Public Sub WriteValue(
      ByRef Value As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant )

Parameters

Value
[ByRef] Variant. The datatype to be written.
Index
[ByRef] Optional. Variant. The starting index of arrays or string characters to being writing from.
Count
[ByRef] Optional. Variant. The number of elements or characters to be written to the stream.

Remarks

Index and vCount are only valid when writing Byte arrays, Integer array, and Strings. For all other types, these parameters are ignored.

Simple datatypes such as vbLong and vbDouble are written out exactly as they appear in memory. Each individual byte of that datatype is written. For example, a vbLong is 4 bytes in memory, even if its value is 0. The 4 bytes are written to the stream, not one byte with a value of 0. A vbDouble is 8 bytes, so all 8 bytes are written as is to the stream.

The one exception is when writing a String value. Both the number of bytes from an encoded string and the encoded bytes are written, however, the length is not written as the individual bytes, like the other datatypes. The length of the string is written as a series of 7bit values. Each byte for the length is calculated by starting out with the actual value, then ANDing it with &H7F to take the first 7 bits. The value is ORed with &H80 to signify there are more bytes to follow for the length. Once that byte is written, the original value is shifted right 7 bits and the process starts over until the value reaches less than &H80. The final byte value is not ORed with &H80, it is written as is without the high bit set. When reading the bytes back, the byte without the high bit set will signal as the last byte in the value.

    Do While value > &H80
        WriteValue CByte((value And &H7F) Or &H80)
        value = (value And &HFFFFFF80) \ &H80
    Loop
    WriteValue CByte(value)

The characters of the string are written as the encoded bytes generated by the current Encoding.

Byte arrays are written as is. There is no description written along with the byte values. The number of bytes will have to be known in advance or manually stored in the stream.

Integer arrays are treated as characters and are converted to the encoded bytes using the current encoding. Like the byte array, the number of bytes is not stored with the encoded characters and will have to be manually stored.

The Decimal datatype is converted to 16 bytes with the same layout as used in .NET. The layout is different than that of VB.

VB Decimal layout
bytes 0-1: Variant datatype information
bytes 2: precision
bytes 3: sign (&H80 is negative)
bytes 4-7: the 32 highest bits in the 96bit value
bytes 8-11: the 32 lowest bits in the 96bit value
bytes 12-15: the 32 middle bits in the 96bit value

.NET Decimal layout
bytes 0-3: the 32 lowest bits in the 96bit value
bytes 4-7: the 32 middle bits in the 96bit value
bytes 8-11: the 32 highest bits in the 96bit value
bytes 12-13: unused (zero)
bytes 14: precision
bytes 15: sign (&H80 is negative)

See Also

Project VBCorLib Overview | Class BinaryWriter Overview


BitArray

BitArray

Manages a compact array of bit values. Each bit represents a boolean, where True = 1, and False = 0.

Remarks

The default size is 32 bits represented. A BitArray with a different size can be creates using the public constructor or static constructors.

The following are some of the available methods to create a BitArray.

 Set bits = New BitArray
 - or -
 Set bits = NewBitArray(128)
 - or -
 Set bits = BitArray.FromBooleans(BooleanArray)

See Also

Project VBCorLib Overview | Constructors | BitArrayStatic

Implements:

ICloneable
ICollection
IEnumerable
IObject

Public:

Properties:

Name | Description
Count (get) | Returns the number of bits being represented in the array.
IsReadOnly (get) | Returns if the instance is a read-only instance.
Item (get) | Returns the value of a specific bit in the array.
Item (let) | Sets the value of a specific bit in the array.
Length (get) | Returns the number of bits represented in the array.
Length (let) | Sets the number of bits represented in the array.

Methods:

Name | Description
AndBits | Performs a bitwise AND on the current instance of BitArray using the bits in another instance of BitArray.
Clone | Returns a duplicate of the current instance.
CopyTo | Copies the internal bit-array to a compatible array.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator for this instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
NotBits | Performs bitwise negate operation on the internal array.
OrBits | Performs a bitwise OR on the current instance of BitArray using the bits in another instance of BitArray.
SetAll | Sets all of the bits to the specified value of True (1) or False (0).
ToString | Returns a string representation of this object instance.
XorBits | Performs a bitwise XOR on the current instance of BitArray using the bits in another instance of BitArray.


BitArray: AndBits

AndBits

Performs a bitwise AND on the current instance of BitArray using the bits in another instance of BitArray.

 Public Function AndBits(
      ByVal Bits As BitArray ) As BitArray

Parameters

Bits
[ByVal] BitArray. The BitArray object with which to perform the bitwise AND operation with.

Return Values

BitArray - The internal set of bits is modified based on the operation, however, the object returns itself for ease of concatenated operations.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Clone

Clone

Returns a duplicate of the current instance.

 Public Function Clone ( ) As BitArray

Return Values

BitArray - A duplicate of the current instance.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: CopyTo

CopyTo

Copies the internal bit-array to a compatible array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      ByVal Index As Long )

Parameters

DstArray
[ByRef] Variant. The array to copy the values to.
Index
[ByVal] Long. The starting position in the array to begin copying to.

Remarks

CopyTo supports the copying to three array types: Long, Byte and Boolean. When copying to Long or Byte type arrays, the bits in the elements are equivalents to the bits in the BitArray. When copying to a Boolean array, each boolean element represents a single bit in the array.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Count (get)

Count

Returns the number of bits being represented in the array.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of bits represented.

Remarks

This returns the same value as Length, however, this property is read-only.

Read Only.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview | IObject


BitArray: GetEnumerator

GetEnumerator

Returns an enumerator for this instance.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - An enumerator

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview | IObject


BitArray: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: IsReadOnly (get)

IsReadOnly

Returns if the instance is a read-only instance.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Value indicating if the instance is read-only.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Item (get)

Item

Returns the value of a specific bit in the array.

 Public Property Get Item(
      ByVal Index As Long ) As Boolean

Parameters

Index
[ByVal] Long. The specific bit to return.

Return Values

Boolean - Value of the specified bit.

Remarks

The index is zero based.

Read/Write.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Item (let)

Item

Sets the value of a specific bit in the array.

 Public Property Let Item(
      ByVal Index As Long,
      ByVal RHS As Boolean )

Parameters

Index
[ByVal] Long. The specific bit to set.
RHS
[ByVal] Boolean. The value to set the specified bit to.

Remarks

The index is zero based.

Read/Write.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Length (get)

Length

Returns the number of bits represented in the array.

 Public Property Get Length ( ) As Long

Return Values

Long - The number of bits represented.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: Length (let)

Length

Sets the number of bits represented in the array.

 Public Property Let Length(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of bits to represent.

Remarks

If the length of the array is increased, then the newly available bits are set to 0 (False).

Read/Write.

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: NotBits

NotBits

Performs bitwise negate operation on the internal array.

 Public Function NotBits ( ) As BitArray

Return Values

BitArray - The instance returns a reference to itself to allow for concatenated operations.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: OrBits

OrBits

Performs a bitwise OR on the current instance of BitArray using the bits in another instance of BitArray.

 Public Function OrBits(
      ByVal Bits As BitArray ) As BitArray

Parameters

Bits
[ByVal] BitArray. The BitArray object with which to perform the bitwise OR operation with.

Return Values

BitArray - The internal set of bits is modified based on the operation, however, the object returns itself for ease of concatenated operations.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: SetAll

SetAll

Sets all of the bits to the specified value of True (1) or False (0).

 Public Sub SetAll(
      ByVal Value As Boolean )

Parameters

Value
[ByVal] Boolean. The value to set all the bits to.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArray: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview | IObject


BitArray: XorBits

XorBits

Performs a bitwise XOR on the current instance of BitArray using the bits in another instance of BitArray.

 Public Function XorBits(
      ByVal Bits As BitArray ) As BitArray

Parameters

Bits
[ByVal] BitArray. The BitArray object with which to perform the bitwise XOR operation with.

Return Values

BitArray - The internal set of bits is modified based on the operation, however, the object returns itself for ease of concatenated operations.

Remarks

See Also

Project VBCorLib Overview | Class BitArray Overview


BitArrayEnumerator

BitArrayEnumerator

This class is used to enumerate the individual bits being managed by a BitArray object.

See Also

Project VBCorLib Overview

Implements:

ICloneable
IEnumerator
IObject


BitArrayEnumerator: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class BitArrayEnumerator Overview


BitArrayEnumerator: IEnumerator

IEnumerator

 Implements IEnumerator

Return Values

IEnumerator -

Remarks

See Also

Project VBCorLib Overview | Class BitArrayEnumerator Overview


BitArrayEnumerator: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class BitArrayEnumerator Overview


BitArrayStatic

BitArrayStatic

Provides creation methods from various types of arrays.

Remarks

This class cannot be directly instantiated. In order to use the methods in the class, use the BitArray.* syntax.

 Set Bits = BitArray.FromLongs(LongArray)

See Also

Project VBCorLib Overview | BitArray

Public:

Methods:

Name | Description
FromBooleans | Returns a BitArray object created from an array of Booleans. Each boolean represents a single bit in the bit array.
FromBytes | Returns a BitArray object created from an array of Bytes. Each bit in each byte represents an associated bit in the bit array.
FromLongs | Returns a BitArray object created from an array of Longs. Each bit in each long represents an associated bit in the bit array.


BitArrayStatic: FromBooleans

FromBooleans

Returns a BitArray object created from an array of Booleans. Each boolean represents a single bit in the bit array.

 Public Function FromBooleans(
      ByRef values ( ) As Boolean ) As BitArray

Parameters

values
[ByRef] Boolean. An array of Boolean datatypes.

Return Values

BitArray - A BitArray initialized to the number of bits as there are boolean elements in the array. Each bit is set to the corrisponding boolean value in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitArrayStatic Overview


BitArrayStatic: FromBytes

FromBytes

Returns a BitArray object created from an array of Bytes. Each bit in each byte represents an associated bit in the bit array.

 Public Function FromBytes(
      ByRef values ( ) As Byte ) As BitArray

Parameters

values
[ByRef] Byte. An array of Byte datatypes.

Return Values

BitArray - A BitArray initialized to the number of bits and their state in the values array.

Remarks

See Also

Project VBCorLib Overview | Class BitArrayStatic Overview


BitArrayStatic: FromLongs

FromLongs

Returns a BitArray object created from an array of Longs. Each bit in each long represents an associated bit in the bit array.

 Public Function FromLongs(
      ByRef values ( ) As Long ) As BitArray

Parameters

values
[ByRef] Long. An array of Long datatypes.

Return Values

BitArray - A BitArray initialized to the number of bits an their state in the values array.

Remarks

See Also

Project VBCorLib Overview | Class BitArrayStatic Overview


BitConverter

BitConverter

Provides a means to convert value datatypes to and from arrays of bytes.

Remarks

The BitConverter class cannot be instantiated. The methods are available through the class name itself.

 Dim b() As Byte
 b = BitConverter.GetBytes(&H12345678)

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
DoubleToInt64Bits | Converts the bit representation of a Double to a Currency.
GetBytes | Returns a byte array representation of the datatype value.
Int64BitsToDouble | Converts the bit representation of a Currencty to a Double.
ToBoolean | Converts an array of bytes to a Boolean value.
ToCurrency | Converts an array of bytes to a Currency value.
ToDate | Converts an array of bytes to a Date value.
ToDecimal | Converts an array of bytes do a Variant Decimal value.
ToDouble | Converts an array of bytes to a Double value.
ToInteger | Converts an array of bytes to an Integer value.
ToLong | Converts an array of bytes to a Long value.
ToSingle | Converts an array of bytes to a Single value.
ToString | Converts an array of bytes to a string of hexidecimal notations.


BitConverter: DoubleToInt64Bits

DoubleToInt64Bits

Converts the bit representation of a Double to a Currency.

 Public Function DoubleToInt64Bits(
      ByVal Value As Double ) As Currency

Parameters

Value
[ByVal] Double. The Double bits to convert to Currency bits.

Return Values

Currency - The bit representation from the Double.

Remarks

This does not convert a Double value to that of a Currency value (like using CCur). This will copy the 64 bits of the Double variable to the 64 bits of the Currency variable.

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: GetBytes

GetBytes

Returns a byte array representation of the datatype value.

 Public Function GetBytes(
      ByRef Value As Variant ) As Byte ( )

Parameters

Value
[ByRef] Variant. The datatype to be converted to a byte array.

Return Values

Byte() - An array of bytes converted from the bits of the original datatype.

Remarks

A type boolean is converted to one byte. If the boolean value is True, then the byte is 1, otherwise, it is 0.

The byte array contains as many bytes as the length of the datatype being converted. A Long returns a 4-byte array, where as a Double will return an 8-byte array.

The Decimal datatype is converted to 16 bytes with the same layout as used in .NET. The layout is different than that of VB.

VB Decimal layout
bytes 0-1: Variant datatype information
bytes 2: precision
bytes 3: sign (&H80 is negative)
bytes 4-7: the 32 highest bits in the 96bit value
bytes 8-11: the 32 lowest bits in the 96bit value
bytes 12-15: the 32 middle bits in the 96bit value

.NET Decimal layout
bytes 0-3: the 32 lowest bits in the 96bit value
bytes 4-7: the 32 middle bits in the 96bit value
bytes 8-11: the 32 highest bits in the 96bit value
bytes 12-13: unused (zero)
bytes 14: precision
bytes 15: sign (&H80 is negative)

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: Int64BitsToDouble

Int64BitsToDouble

Converts the bit representation of a Currencty to a Double.

 Public Function Int64BitsToDouble(
      ByVal Value As Currency ) As Double

Parameters

Value
[ByVal] Currency. The Currency bits to conver to Double bits.

Return Values

Double - The bit representation from a Currency datatype.

Remarks

This does not convert a Currency to that of a Double value (like using CDbl). This will copy the 64 bits of the Currency variable to the 64 bits of the Double variable.

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToBoolean

ToBoolean

Converts an array of bytes to a Boolean value.

 Public Function ToBoolean(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Boolean

Parameters

Bytes
[ByRef] Byte. The array of bytes to create a boolean from.
StartIndex
[ByVal] Long. The byte in the array to create the boolean from.

Return Values

Boolean - Boolean representation of the byte used in the array.

Remarks

The boolean value is created from one byte. If the byte is a non-zero value, True is returned, otherwise, False is returned.

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToCurrency

ToCurrency

Converts an array of bytes to a Currency value.

 Public Function ToCurrency(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Currency

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create a Currency from.
StartIndex
[ByVal] Long. The starting byte in the array to create a Currency from.

Return Values

Currency - Currency datatype representation of the 8 bytes used in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToDate

ToDate

Converts an array of bytes to a Date value.

 Public Function ToDate(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Date

Parameters

Bytes
[ByRef] Byte. The array of bytes to create a date from.
StartIndex
[ByVal] Long. The starting byte in the array to create a date from.

Return Values

Date - Date datatype representation of the 8 bytes used in the array.

Remarks

Even though a Date is represented using a Double, it may still raise an error due to the 8 bytes used represent an invalid date range.

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToDecimal

ToDecimal

Converts an array of bytes do a Variant Decimal value.

 Public Function ToDecimal(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Variant

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create a Decimal value. Must be atleast 16 bytes in length.
StartIndex
[ByVal] Long. The starting index within the array to be converting to a Decimal value.

Return Values

Variant - The converted Decimal value.

Remarks

The Decimal datatype is created from 16 bytes with the same layout as used in .NET. The layout is different than that of VB.

VB Decimal layout
bytes 0-1: Variant datatype information
bytes 2: precision
bytes 3: sign (&H80 is negative)
bytes 4-7: the 32 highest bits in the 96bit value
bytes 8-11: the 32 lowest bits in the 96bit value
bytes 12-15: the 32 middle bits in the 96bit value

.NET Decimal layout
bytes 0-3: the 32 lowest bits in the 96bit value
bytes 4-7: the 32 middle bits in the 96bit value
bytes 8-11: the 32 highest bits in the 96bit value
bytes 12-13: unused (zero)
bytes 14: precision
bytes 15: sign (&H80 is negative)

If the sign byte is non-zero, then the Decimal will be set as negative.

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToDouble

ToDouble

Converts an array of bytes to a Double value.

 Public Function ToDouble(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Double

Parameters

Bytes
[ByRef] Byte. The array of bytes to create a double from.
StartIndex
[ByVal] Long. The starting byte in the array to create a double from.

Return Values

Double - Double datatype representation of the 8 bytes used in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToInteger

ToInteger

Converts an array of bytes to an Integer value.

 Public Function ToInteger(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Integer

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create an integer from.
StartIndex
[ByVal] Long. The starting byte in the array to create an integer from.

Return Values

Integer - Integer datatype representation of the 2 bytes used in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToLong

ToLong

Converts an array of bytes to a Long value.

 Public Function ToLong(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create a Long from.
StartIndex
[ByVal] Long. The starting byte in the array to create a Long from.

Return Values

Long - Long datatype representation of the 4 bytes used in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToSingle

ToSingle

Converts an array of bytes to a Single value.

 Public Function ToSingle(
      ByRef Bytes ( ) As Byte,
      ByVal StartIndex As Long ) As Single

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create a Single from.
StartIndex
[ByVal] Long. The starting byte in the array to create a Single from.

Return Values

Single - Single datatype representation of the 4 bytes used in the array.

Remarks

See Also

Project VBCorLib Overview | Class BitConverter Overview


BitConverter: ToString

ToString

Converts an array of bytes to a string of hexidecimal notations.

 Public Function ToString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The array of bytes used to create a string of hexidecimal values.
Index
[ByRef] Optional. Variant. The starting byte to begin creating hexidecimal values from in the array.
Count
[ByRef] Optional. Variant. The number of bytes to be converted to a hexidecimal notation.

Return Values

String - String containing hexidecimal notations for each byte, separated by hyphens.

Remarks

Each byte to be converted to string is converted into a hexidecimal representation. For example a byte value of 160 would become A0' in the return string. Each byte is separated by a hyphen when more than one byte is being converted. An example is a Long of &HABCDEF01 would become 01-EF-CD-AB'.

See Also

Project VBCorLib Overview | Class BitConverter Overview


Buffer

Buffer

This class provides methods for copying manipulating arrays as byte arrays.

Remarks

Any array that is used in these methods are treated as byte arrays. No attention is paid to the type of the original array. They are manipulated as bytes.

Usage:

This class cannot be instantiated. It represents a set of static methods that are accessed through the name of the class; Buffer.*

 Buffer.BlockCopy srcArray, sourceindex, dstArray, destinationindex, Count

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
BlockCopy | Copies the bytes from the source array to the destination array.
ByteLength | Returns the length of the array in bytes.
GetByte | Returns a the byte value at the given byte index within an array.
SetByte | Sets the byte value at a given byte index within the array.


Buffer: BlockCopy

BlockCopy

Copies the bytes from the source array to the destination array.

 Public Sub BlockCopy(
      ByRef SrcArray As Variant,
      ByVal SourceIndex As Long,
      ByRef DstArray As Variant,
      ByVal DestinationIndex As Long,
      ByVal Count As Long )

Parameters

SrcArray
[ByRef] Variant. The array to copy bytes from.
SourceIndex
[ByVal] Long. The starting byte position to begin copying.
DstArray
[ByRef] Variant. The array to receive the bytes.
DestinationIndex
[ByVal] Long. The starting byte position to begin setting bytes.
Count
[ByVal] Long. The number of bytes to be copied.

Remarks

The arrays are treated as byte arrays, so no datatype conversion takes place. All indexes are in bytes, not in the datatype of the specific array.

The lowerbound of the arrays is ignored. The first byte is at index 0.

See Also

Project VBCorLib Overview | Class Buffer Overview


Buffer: ByteLength

ByteLength

Returns the length of the array in bytes.

 Public Function ByteLength(
      ByRef Arr As Variant ) As Long

Parameters

Arr
[ByRef] Variant. The array to retrieve the size in bytes from.

Return Values

Long - The size of the array in bytes.

Remarks

The size is calculated by taking the number of elements in the array and multiply it by the number of bytes each element is in length.

See Also

Project VBCorLib Overview | Class Buffer Overview


Buffer: GetByte

GetByte

Returns a the byte value at the given byte index within an array.

 Public Function GetByte(
      ByRef Arr As Variant,
      ByVal Index As Long ) As Byte

Parameters

Arr
[ByRef] Variant. The array to retrieve the byte value from.
Index
[ByVal] Long. The byte index to read the byte at.

Return Values

Byte - The byte value from within the array.

Remarks

The index is based on bytes, not the size of the actual array elements. For example: if getting the byte from a Long array at index 3, then the upper 8bits of the first element will be returned.

The lowerbound of the array is ignored. Index begins at 0.

See Also

Project VBCorLib Overview | Class Buffer Overview


Buffer: SetByte

SetByte

Sets the byte value at a given byte index within the array.

 Public Sub SetByte(
      ByRef Arr As Variant,
      ByVal Index As Long,
      ByVal Value As Byte )

Parameters

Arr
[ByRef] Variant. The array to set the byte value in.
Index
[ByVal] Long. The byte index into the array to set the byte at.
Value
[ByVal] Byte. The byte value to set.

Remarks

The index is based on bytes, not the size of the actual array elements. For example: if setting the byte of a Long array at index 3 , then the upper 8bits of the first element will be set.

The lowerbound of the array is ignored. Index begins at 0.

See Also

Project VBCorLib Overview | Class Buffer Overview


Calendar

Calendar

Represents various systems of time in which the beginning, length, and divisions of a year are defined.

Remarks

This class cannot be instantiated and should only be used to implement the interface of a calendar class.

See Also

Project VBCorLib Overview | CalendarStatic | GregorianCalendar | HebrewCalendar | HijriCalendar | JapaneseCalendar | JulianCalendar | KoreanCalendar | TaiwanCalendar | ThaiBuddhistCalendar

Public:

Types:

Name | Description
CalendarWeekRule | Inidicates how many days of the beginning of January must the first week contain in order to be counted as the first week.

Properties:

Name | Description
Eras (get) | Returns an list of the eras the calendar can represent.
TwoDigitYearMax (get) | Returns the maximinum 4-digit year that will be created from a 2-digit value.
TwoDigitYearMax (let) | Sets the maximum 4-digit year that will be created from a 2-digit value.

Methods:

Name | Description
AddDays | Returns a cDateTime that is the specified number of days from the original Time.
AddHours | Returns a cDateTime this is the specified number of hours from the original Time.
AddMilliseconds | Returns a cDateTime this is the specified number of Milliseconds from the original Time.
AddMinutes | Returns a cDateTime this is the specified number of Minutes from the original Time.
AddMonths | Returns a cDateTime this is the specified number of Months from the original Time.
AddSeconds | Returns a cDateTime this is the specified number of Seconds from the original Time.
AddWeeks | Returns a cDateTime this is the specified number of Weeks from the original Time.
AddYears | Returns a cDateTime this is the specified number of Years from the original Time.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth | Returns the day of the months for the specified date.
GetDayOfWeek | Returns the DayOfWeek enum of the specified date.
GetDayOfYear | Returns the day of the year for the specified date.
GetDaysInMonth | Returns the number of days in the specified month.
GetDaysInYear | Returns the number of days in the specified year.
GetEra | Returns the era that the specified time exists in.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour | Returns the hour of the specified time.
GetMilliseconds | Returns the milliseconds of the specified time.
GetMinute | Returns the minute of the specified time.
GetMonth | Returns the month of the specified time.
GetMonthsInYear | Returns the number of months in the specified year.
GetSecond | Returns the second of the specified time.
GetWeekOfYear | Returns the week of the year that the specified date belongs to.
GetYear | Returns the year of the specified time.
IsLeapDay | Returns a boolean indicating if the specific day is a leap day.
IsLeapMonth | Returns a boolean indicating if the specific month is a leap month.
IsLeapYear | Returns a boolean indicating if the specific year is a leap year.
ToDateTime | Returns a Gregorian cDateTime computed using the specific calendar rules.
ToFourDigitYear | Returns a 4-digit year from a 2-digit number.
ToString | Returns a string representation of this object instance.


Calendar: AddDays

AddDays

Returns a cDateTime that is the specified number of days from the original Time.

 Public Function AddDays(
      ByRef Time As Variant,
      ByVal Days As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The date inwhich to add the days to.
Days
[ByVal] Long. The number of days to be added. This value can be negative.

Return Values

cDateTime - The new cDateTime with the days added or subtracted.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddHours

AddHours

Returns a cDateTime this is the specified number of hours from the original Time.

 Public Function AddHours(
      ByRef Time As Variant,
      ByVal Hours As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of hours to.
Hours
[ByVal] Long. The number of hours to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of hours added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddMilliseconds

AddMilliseconds

Returns a cDateTime this is the specified number of Milliseconds from the original Time.

 Public Function AddMilliseconds(
      ByRef Time As Variant,
      ByVal Milliseconds As Double ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Milliseconds to.
Milliseconds
[ByVal] Double. The number of Milliseconds to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Milliseconds added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddMinutes

AddMinutes

Returns a cDateTime this is the specified number of Minutes from the original Time.

 Public Function AddMinutes(
      ByRef Time As Variant,
      ByVal Minutes As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Minutes to.
Minutes
[ByVal] Long. The number of Minutes to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Minutes added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddMonths

AddMonths

Returns a cDateTime this is the specified number of Months from the original Time.

 Public Function AddMonths(
      ByRef Time As Variant,
      ByVal Months As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Months to.
Months
[ByVal] Long. The number of Months to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Months added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddSeconds

AddSeconds

Returns a cDateTime this is the specified number of Seconds from the original Time.

 Public Function AddSeconds(
      ByRef Time As Variant,
      ByVal Seconds As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Seconds to.
Seconds
[ByVal] Long. The number of Seconds to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Seconds added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddWeeks

AddWeeks

Returns a cDateTime this is the specified number of Weeks from the original Time.

 Public Function AddWeeks(
      ByRef Time As Variant,
      ByVal Weeks As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Weeks to.
Weeks
[ByVal] Long. The number of Weeks to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Weeks added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: AddYears

AddYears

Returns a cDateTime this is the specified number of Years from the original Time.

 Public Function AddYears(
      ByRef Time As Variant,
      ByVal Years As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Years to.
Years
[ByVal] Long. The number of Years to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Years added.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: CalendarWeekRule

CalendarWeekRule

Inidicates how many days of the beginning of January must the first week contain in order to be counted as the first week.

 Public Enum CalendarWeekRule

Values

FirstDay
The first defined week that contains the first day of January is considered the first week of the year.
FirstFullWeek
The first defined week that contains 7 days of January is considered the first week of the year.
FirstFourDayWeek
The first defined week that contains the first 4 days of January is considered the first week of the year.

Remarks

When a full week of 7 days from January is required, the week may not contain January 1st to 6th, since up to the first 6 days of January may exist in the same week and the week would not have 7 days from January in it as it may contain parts of the previous December. Those days would not count towards the number of weeks in the year.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: Eras (get)

Eras

Returns an list of the eras the calendar can represent.

 Public Property Get Eras ( ) As Long ( ) :

Return Values

Long() - A list of the eras for the calendar.

Remarks

The Eras are listed in reverse chronological order. The current era is the first era in the list.

Eras can be used to segregate sections in a calendar and cause the years to begin at 1 again. How the eras are determined based on the culture the calendar represents.

Read Only.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetDayOfMonth

GetDayOfMonth

Returns the day of the months for the specified date.

 Public Function GetDayOfMonth(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The date inwhich to retrieve the day of the month.

Return Values

Long - The day of the month for the specified date.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetDayOfWeek

GetDayOfWeek

Returns the DayOfWeek enum of the specified date.

 Public Function GetDayOfWeek(
      ByRef Time As Variant ) As DayOfWeek

Parameters

Time
[ByRef] Variant. The date to retrieve the day of the week for.

Return Values

DayOfWeek - A DayOfWeek enum representing the day of the week.

Remarks

The DayOfWeek is Sunday and is 0-based. The Visual Basic enum vbDayOfWeek is 1-based.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetDayOfYear

GetDayOfYear

Returns the day of the year for the specified date.

 Public Function GetDayOfYear(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The date to retrieve the day of the year from.

Return Values

Long - The day of the year.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetDaysInMonth

GetDaysInMonth

Returns the number of days in the specified month.

 Public Function GetDaysInMonth(
      ByVal Year As Long,
      ByVal Month As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year inwhich the month exists. This is used by calendars that have months that change based on the year, such as leap years.
Month
[ByVal] Long. The month to retrieve the number of days of.
Era
[ByRef] Optional. Variant. The time period inwhich the year exists.

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetDaysInYear

GetDaysInYear

Returns the number of days in the specified year.

 Public Function GetDaysInYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year to retrieve the number of days of.
Era
[ByRef] Optional. Variant. The era the year exists in.

Return Values

Long - The number of days in the year.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetEra

GetEra

Returns the era that the specified time exists in.

 Public Function GetEra(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to find the containing era of.

Return Values

Long - The era for the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetHour

GetHour

Returns the hour of the specified time.

 Public Function GetHour(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the hour from.

Return Values

Long - The hour portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetMilliseconds

GetMilliseconds

Returns the milliseconds of the specified time.

 Public Function GetMilliseconds(
      ByRef Time As Variant ) As Double

Parameters

Time
[ByRef] Variant. The time to retrieve the milliseconds from.

Return Values

Double - The millisecond portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetMinute

GetMinute

Returns the minute of the specified time.

 Public Function GetMinute(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the minute from.

Return Values

Long - The minute portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetMonth

GetMonth

Returns the month of the specified time.

 Public Function GetMonth(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the month from.

Return Values

Long - The month portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetMonthsInYear

GetMonthsInYear

Returns the number of months in the specified year.

 Public Function GetMonthsInYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year to get the number of months of.
Era
[ByRef] Optional. Variant. The era the year exists in.

Return Values

Long - The number of months in the year.

Remarks

In some calendars not all years have the same number of months. The Hebrew calendar can have 13 months on leap years.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetSecond

GetSecond

Returns the second of the specified time.

 Public Function GetSecond(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the second from.

Return Values

Long - The second portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetWeekOfYear

GetWeekOfYear

Returns the week of the year that the specified date belongs to.

 Public Function GetWeekOfYear(
      ByRef Time As Variant,
      ByVal Rule As CalendarWeekRule,
      ByVal FirstDayOfWeek As DayOfWeek ) As Long

Parameters

Time
[ByRef] Variant. The date to find the week it belongs.
Rule
[ByVal] CalendarWeekRule. Rule to decide what constitutes the first week of the year.
FirstDayOfWeek
[ByVal] DayOfWeek. Defines which week day is the start of a new week.

Return Values

Long - The week that the date belongs to.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: GetYear

GetYear

Returns the year of the specified time.

 Public Function GetYear(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the year from.

Return Values

Long - The year portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: IsLeapDay

IsLeapDay

Returns a boolean indicating if the specific day is a leap day.

 Public Function IsLeapDay(
      ByVal Year As Long,
      ByVal Month As Long,
      ByVal Day As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year the day is in.
Month
[ByVal] Long. The month the day is in.
Day
[ByVal] Long. The day to check if is a leap day.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the day is a leap day.

Remarks

A leap day only exists in a leap year, such as Febuary 29th in the Gregorian calendar.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: IsLeapMonth

IsLeapMonth

Returns a boolean indicating if the specific month is a leap month.

 Public Function IsLeapMonth(
      ByVal Year As Long,
      ByVal Month As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year the month is in.
Month
[ByVal] Long. The month to check if it is a leap month.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the month is a leap month.

Remarks

A leap month only exists in a leap year, such as Adar II in the Hebrew calendar.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: IsLeapYear

IsLeapYear

Returns a boolean indicating if the specific year is a leap year.

 Public Function IsLeapYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year to check if is a leap year.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the year is a leap year.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: ToDateTime

ToDateTime

Returns a Gregorian cDateTime computed using the specific calendar rules.

 Public Function ToDateTime(
      ByVal Year As Long,
      ByVal Month As Long,
      ByVal Day As Long,
      ByVal Hour As Long,
      ByVal Minute As Long,
      ByVal Second As Long,
      ByVal Millisecond As Long,
      Optional ByRef Era As Variant ) As cDateTime

Parameters

Year
[ByVal] Long. The Year in the specific calendar type.
Month
[ByVal] Long. The Month in the specific calendar type.
Day
[ByVal] Long. The Day in the specific calendar type.
Hour
[ByVal] Long. The hour for the new time.
Minute
[ByVal] Long. The minute for the new time.
Second
[ByVal] Long. The second for the new time.
Millisecond
[ByVal] Long. The milliseconds for the new time.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

cDateTime - A Gregorian version of the date specified.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: ToFourDigitYear

ToFourDigitYear

Returns a 4-digit year from a 2-digit number.

 Public Function ToFourDigitYear(
      ByVal Year As Long ) As Long

Parameters

Year
[ByVal] Long. The year to be converted to 4-digits.

Return Values

Long - A 4-digit year in the specific calendar.

Remarks

A normal way of dealing with years is by refering to them as a 2-digit value. This is evident in the Gregorian calendar system. The year 2005 may be referenced as 05 (pronounced oh-five). When converting a 2-digit year to a 4-digit the century is unknown. 05 could be 2005 or 1905. This property gives the calendar a rule to follow when converting 2-digit years to 4-digit.

A max year of 2029 will cause a minimum year of 1930. These two years represent 100 years which 2-digit years will fall. 00-99 will fall within 1930-2029.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: TwoDigitYearMax (get)

TwoDigitYearMax

Returns the maximinum 4-digit year that will be created from a 2-digit value.

 Public Property Get TwoDigitYearMax ( ) As Long

Return Values

Long - The maximinum year that will be created from a 2-digit value.

Remarks

This value is used by the ToFourDigitYear method.

Read/Write.

See Also

Project VBCorLib Overview | Class Calendar Overview


Calendar: TwoDigitYearMax (let)

TwoDigitYearMax

Sets the maximum 4-digit year that will be created from a 2-digit value.

 Public Property Let TwoDigitYearMax(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The maximinum 4-digit year to be created.

Remarks

This value is used by the ToFourDigitYear method.

Read/Write.

See Also

Project VBCorLib Overview | Class Calendar Overview


CalendarStatic

CalendarStatic

Provides static methods for the Calendar class.

Remarks

To access these methods, use the variable name Calendar directly.

 Era = Calendar.CurrentEra

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
CurrentEra (get) | Returns the current era for any calendar class.


CalendarStatic: CurrentEra (get)

CurrentEra

Returns the current era for any calendar class.

 Public Property Get CurrentEra ( ) As Long

Return Values

Long - The current era.

Remarks

A constant is returned with the value of 0.

Read Only.

See Also

Project VBCorLib Overview | Class CalendarStatic Overview | Calendar


cArray

cArray

Provides methods for manipulating, searching and sorting arrays.

Remarks

This class cannot be directly instantiated. To access the methods use the class name directly.

 Debug.Print cArray.GetLength(MyArray)

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
ciArrayTypes | Represents the available array types that can be created using CreateInstance. The values corrispond the vbVarType enum.

Methods:

Name | Description
BinarySearch | Performs a binary search on a given array. A subportion of the array can be searched using the startindex and length parameters. A custom user comparer can optionally be supplied to perform special comparisons between elements in the array.
Clear | Clears a portion of the elements in an array.
Copy | Copies one Array to another Array and performs type casting as necessary.
CopyEx | Copies a section of one Array to another Array and performs type casting as necessary.
CreateInstance | Initializes a new array of the specified type in up to 3 dimensions.
Exists | Uses a callback method to check if an element in an array exists.
Find | Uses a callback method to search an array for the first element that matches the criteria.
FindAll | Finds all matching elements in an array, returning an array of the matched elements.
FindIndex | Finds the index of the first array element that matches the criteria specified by the callback function.
FindLast | Finds the last occurence of a matched element in the array.
FindLastIndex | Finds the index of the last occurence of a matched element in the array.
ForEach | Iterates over an array passing in each element into an Action function to be performed on the element.
GetLength | Returns the number of elements in the specified dimension. If 0 is specified, this returns the total number of elements in the array.
GetRank | Returns the number of dimensions in the array.
IndexOf | Returns the index of the first occurrence of a value in a one-dimensional Array or in a portion of the Array.
IsNull | Returns if an array variable is uninitialized.
LastIndexOf | Returns the index of the last occurrence of a value in a one-dimensional Array or in a portion of the Array.
NewArray | Creates an array of values.
Reverse | Reverses the elements in a subportion of an array.
Sort | Sorts an entire array. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.
SortEx | Sorts an array, or subportion, given a startindex and length. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.
SortKey | Sorts an entire array based on an array of keys. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.
SortKeyEx | Sorts an array based on an array of keys. A subportion of the array can be sorted given a startindex and length. An optionally, supplied comparer object can be used to compare special elements, such as userdefined values.
TrueForAll | Returns a boolean indicating if all elements in the array matched the criteria.


cArray: BinarySearch

BinarySearch

Performs a binary search on a given array. A subportion of the array can be searched using the startindex and length parameters. A custom user comparer can optionally be supplied to perform special comparisons between elements in the array.

 Public Function BinarySearch(
      ByRef Arr As Variant,
      ByRef Value As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Arr
[ByRef] Variant. The array to search for a specific value.
Value
[ByRef] Variant. The value to search for in the array.
Index
[ByRef] Optional. Variant. The starting index in the array to begin searching.
Count
[ByRef] Optional. Variant. The number of elements to search, starting at startindex.
Comparer
[ByVal] Optional. IComparer. A user supplied object to compare elements within the array.

Return Values

Long - The index at which the value was found.

Remarks

If the returned value is less than the lower bound of the array, then the value indicates where the value would have been found in the array. The following is how to convert the return value to the array index:

Lowerbound of 0: return = Not return
Other lowerbound: return = (Not (return - lowerbound)) + lowerbound

' This example searches a sorted list for values,
' displaying the index found, or the index the value
' should have been found.
Private Sub Main()
    Dim ints() As Integer

    ' Create a sorted array with the value 7 missing.
    ints = cArray.NewArray(ciInteger, 1, 2, 3, 4, 5, 6, 8, 9, 10)

    ' Search for the value 6.
    Search ints, 6

    ' Search for the missing value 7.
    Search ints, 7

    ' Wait for user to press enter.
    Console.ReadLine
End Sub

' Performs a binary search on the array, searching for
' the requested value. If the value is found, then the
' search index will be equal or greater than the lower-bound
' of the array, otherwise, the value was not found.
Private Sub Search(ByRef ints() As Integer, ByVal Value As Integer)
    Dim i As Long

    i = cArray.BinarySearch(ints, Value)

    ' If the index is not less then then lower-bound
    ' of the array, then the value was found.
    If i >= LBound(ints) Then
        Console.WriteLine "Value [{0}] found at index [{1}].", Value, i
    Else
        ' The value was not found. To determine where
        ' the value should have been found, use Not to
        ' negate the returned index value.
        i = Not i
        Console.WriteLine "Value [{0}] should be at index [{1}].", Value, i
    End If
End Sub

' This code produces the following output.
'
'Value [6] found at index [5].
'Value [7] should be at index [6].

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: ciArrayTypes

ciArrayTypes

Represents the available array types that can be created using CreateInstance. The values corrispond the vbVarType enum.

 Public Enum ciArrayTypes

Values

ciLong = vbLong
Same as vbLong
ciInteger = vbInteger
Same as vbInteger
ciByte = vbByte
Same as vbByte
ciDouble = vbDouble
Same as vbDouble
ciSingle = vbSingle
Same as vbSingle
ciBoolean = vbBoolean
Same as vbBoolean
ciDate = vbDate
Same as vbDate
ciString = vbString
Same as vbString
ciCurrency = vbCurrency
Same as vbCurrency
ciVariant = vbVariant
Same as vbVariant
ciObject = vbObject
Same as vbObject

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Clear

Clear

Clears a portion of the elements in an array.

 Public Sub Clear(
      ByRef Arr As Variant,
      ByVal Index As Long,
      ByVal Count As Long )

Parameters

Arr
[ByRef] Variant. The array to clear elements from.
Index
[ByVal] Long. The starting element to being clearing.
Count
[ByVal] Long. The number of elements to be cleared.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Copy

Copy

Copies one Array to another Array and performs type casting as necessary.

 Public Sub Copy(
      ByRef SourceArray As Variant,
      ByRef DestinationArray As Variant,
      ByVal Count As Long,
      Optional ByVal AddressOfCopier As Long )

Parameters

SourceArray
[ByRef] Variant. The array from which to copy the elements.
DestinationArray
[ByRef] Variant. The array in which to place the elements.
Count
[ByVal] Long. The number of elements to copy.
AddressOfCopier
[ByVal] Optional. Long. A callback address to a method used to assign elements from the source array to the destination array.

Remarks

The AddressOfCopier method signature must be two parameters of ByRef for the datatypes of each of the arrays. The destination array element is the first parameter.

Example

This is an example of a callback method declaration.
 Public Sub CopyCallback(ByRef dst As String, ByRef src As MyClass)
     dst = src.Name
 End Sub

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: CopyEx

CopyEx

Copies a section of one Array to another Array and performs type casting as necessary.

 Public Sub CopyEx(
      ByRef SourceArray As Variant,
      ByVal SourceIndex As Long,
      ByRef DestinationArray As Variant,
      ByVal DestinationIndex As Long,
      ByVal Count As Long,
      Optional ByVal AddressOfCopier As Long = 0 )

Parameters

SourceArray
[ByRef] Variant. The array from which to copy the elements.
SourceIndex
[ByVal] Long. The starting element in the source array to begin copying from.
DestinationArray
[ByRef] Variant. The array in which to place the elements.
DestinationIndex
[ByVal] Long. The starting element in the destination array to place elements.
Count
[ByVal] Long. The number of elements to copy.
AddressOfCopier
[ByVal] Optional. Long. A callback address to a method used to assign elements from the source array to the destination array.

Default: 0

Remarks

The AddressOfCopier method signature must be two parameters of ByRef for the datatypes of each of the arrays. The destination array element is the first parameter.

Example

This is an example of a callback method declaration.
 Public Sub CopyCallback(ByRef dst As String, ByRef src As MyClass)
     dst = src.Name
 End Sub

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: CreateInstance

CreateInstance

Initializes a new array of the specified type in up to 3 dimensions.

 Public Function CreateInstance(
      ByVal ArrayType As ciArrayTypes,
      Optional ByVal length1 As Long = 0,
      Optional ByRef length2 As Variant,
      Optional ByRef length3 As Variant ) As Variant

Parameters

ArrayType
[ByVal] ciArrayTypes. The data type the array represents.
length1
[ByVal] Optional. Long. The number of elements in the first dimension.

Default: 0

length2
[ByRef] Optional. Variant. The number of elements in the second dimension.
length3
[ByRef] Optional. Variant. The number of elements in the third dimension.

Return Values

Variant - An array of the specified type with the specified dimensions.

Remarks

If a length is zero, then an empty array is returned, not a Null array. If one length is defined as zero, then all other defined lengths must be zero. This does not mean that lenghts 2 and 3 need to be set to zero if only an empty one-dimensional array is being created.

Elements of a size that are a multiple of 4 will not create a new array when being returned. All other datatype sizes will cause a new array to be created. The array must also be assigned at the end of the code so VB can optimize returning the Variant datatype and not copy it when possible.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Exists

Exists

Uses a callback method to check if an element in an array exists.

 Public Function Exists(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long ) As Boolean

Parameters

Arr
[ByRef] Variant. The array to check if an element exists according to the callback criteria.
AddressOfMatch
[ByVal] Long. The AddressOf the callback method used to determine if an element matches the specified criteria.

Return Values

Boolean - Indication of the element existing in the array.

Remarks

Each array element is passed into a user callback method. The user then checks the element value to determine if it matches any criteria necessary and returns the result. The criteria is defined outside of the Exists method. How the criteria is defined and checked is up to the user of the function.

The function signature for the callback has a specific format.

 Public Function ExistsCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Find

Find

Uses a callback method to search an array for the first element that matches the criteria.

 Public Function Find(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long ) As Variant

Parameters

Arr
[ByRef] Variant. The array to search.
AddressOfMatch
[ByVal] Long. The callback method address used to determine if an element matches the specified criteria.

Return Values

Variant - The element value if a match is found, otherwise a default for that element type.

Remarks

The function signature for the callback has a specific format.

 Public Function FindCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

The callback method signature needs to have 1 parameter that is of a ByRef definition for the the datatype the same as the array. The callback function must return a Boolean value indicating if the passed-by-ref element matches the criteria of the matching routine.

It is extremely important to define the callback method correctly. If the method is incorrect, the application may crash.

Example

This example demonstrates some of the Find methods and how to define a Callback method that the Find methods rely on in finding array elements that match a criteria. The criteria logic is defined by the developer. The callback function is used to check if a specific array element meets the criteria being searched for.

In the examples below, a String array is searched using various criteria. The two callback functions (MatchGreetings, MatchNonGreetings) are defined with 1 parameter of a ByRef String and returns a Boolean. If the array datatype is a Long, the the callback will be defined as a ByRef Long.

None of the values should be changed during the search.

Private Sub Main()
    FindFirstGreeting
    FindLastGreeting
    FindAllGreetings
    FindAllNonGreetings
End Sub

' Searches from the beginning of the arry until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindFirstGreeting()
    Debug.Print cArray.FindIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Searches from the end of the array until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindLastGreeting()
    Debug.Print cArray.FindLastIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllGreetings()
    Dim a() As String
    a = cArray.FindAll(GetStrings, AddressOf MatchGreetings)
    Debug.Print a(0), a(1)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchNonGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllNonGreetings()
    Dim i As Long
    Dim a() As String

    a = cArray.FindAll(GetStrings, AddressOf MatchNonGreetings)
    For i = 0 To UBound(a)
        Debug.Print a(i),
    Next i
End Sub

' Create a sample array of strings to search.
Private Function GetStrings() As String()
    GetStrings = cArray.NewArray(ciString, "One", "Two", "Hello", "Four", "Hi", "Six")
End Function

' Callback method used to match a string element from
' the array to the possible greetings we are searching for.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchGreetings(ByRef s As String) As Boolean
    MatchGreetings = ((s = "Hello") Or (s = "Hi"))
End Function

' Callback method used to match a string element from
' the array to determine that we have matched against a non-greeting.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchNonGreetings(ByRef s As String) As Boolean
    MatchNonGreetings = Not ((s = "Hello") Or (s = "Hi"))
End Function

' this code produces the following output.
'
' 2
' 4
' Hello         Hi
' One           Two           Four          Six

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: FindAll

FindAll

Finds all matching elements in an array, returning an array of the matched elements.

 Public Function FindAll(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long ) As Variant

Parameters

Arr
[ByRef] Variant. The array to find all matching elements.
AddressOfMatch
[ByVal] Long. The callback address of the matching criteria method.

Return Values

Variant - An array of all matched elements.

Remarks

The function signature for the callback has a specific format.

 Public Function FindAllCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

The callback method signature needs to have 1 parameter that is of a ByRef definition for the the datatype the same as the array. The callback function must return a Boolean value indicating if the passed-by-ref element matches the criteria of the matching routine.

It is extremely important to define the callback method correctly. If the method is incorrect, the application may crash.

Example

This example demonstrates some of the Find methods and how to define a Callback method that the Find methods rely on in finding array elements that match a criteria. The criteria logic is defined by the developer. The callback function is used to check if a specific array element meets the criteria being searched for.

In the examples below, a String array is searched using various criteria. The two callback functions (MatchGreetings, MatchNonGreetings) are defined with 1 parameter of a ByRef String and returns a Boolean. If the array datatype is a Long, the the callback will be defined as a ByRef Long.

None of the values should be changed during the search.

Private Sub Main()
    FindFirstGreeting
    FindLastGreeting
    FindAllGreetings
    FindAllNonGreetings
End Sub

' Searches from the beginning of the arry until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindFirstGreeting()
    Debug.Print cArray.FindIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Searches from the end of the array until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindLastGreeting()
    Debug.Print cArray.FindLastIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllGreetings()
    Dim a() As String
    a = cArray.FindAll(GetStrings, AddressOf MatchGreetings)
    Debug.Print a(0), a(1)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchNonGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllNonGreetings()
    Dim i As Long
    Dim a() As String

    a = cArray.FindAll(GetStrings, AddressOf MatchNonGreetings)
    For i = 0 To UBound(a)
        Debug.Print a(i),
    Next i
End Sub

' Create a sample array of strings to search.
Private Function GetStrings() As String()
    GetStrings = cArray.NewArray(ciString, "One", "Two", "Hello", "Four", "Hi", "Six")
End Function

' Callback method used to match a string element from
' the array to the possible greetings we are searching for.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchGreetings(ByRef s As String) As Boolean
    MatchGreetings = ((s = "Hello") Or (s = "Hi"))
End Function

' Callback method used to match a string element from
' the array to determine that we have matched against a non-greeting.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchNonGreetings(ByRef s As String) As Boolean
    MatchNonGreetings = Not ((s = "Hello") Or (s = "Hi"))
End Function

' this code produces the following output.
'
' 2
' 4
' Hello         Hi
' One           Two           Four          Six

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: FindIndex

FindIndex

Finds the index of the first array element that matches the criteria specified by the callback function.

 Public Function FindIndex(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Arr
[ByRef] Variant. The array to be searched.
AddressOfMatch
[ByVal] Long. The address of the callback function used to match the array elements.
Index
[ByRef] Optional. Variant. The starting element of the array to beging the matching process.
Count
[ByRef] Optional. Variant. The number of elements to include in the array search.

Return Values

Long - The index of the matched element, or LowerBound - 1 if none is found.

Remarks

The function signature for the callback has a specific format.

 Public Function FindIndexCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

The callback method signature needs to have 1 parameter that is of a ByRef definition for the the datatype the same as the array. The callback function must return a Boolean value indicating if the passed-by-ref element matches the criteria of the matching routine.

It is extremely important to define the callback method correctly. If the method is incorrect, the application may crash.

Example

This example demonstrates some of the Find methods and how to define a Callback method that the Find methods rely on in finding array elements that match a criteria. The criteria logic is defined by the developer. The callback function is used to check if a specific array element meets the criteria being searched for.

In the examples below, a String array is searched using various criteria. The two callback functions (MatchGreetings, MatchNonGreetings) are defined with 1 parameter of a ByRef String and returns a Boolean. If the array datatype is a Long, the the callback will be defined as a ByRef Long.

None of the values should be changed during the search.

Private Sub Main()
    FindFirstGreeting
    FindLastGreeting
    FindAllGreetings
    FindAllNonGreetings
End Sub

' Searches from the beginning of the arry until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindFirstGreeting()
    Debug.Print cArray.FindIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Searches from the end of the array until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindLastGreeting()
    Debug.Print cArray.FindLastIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllGreetings()
    Dim a() As String
    a = cArray.FindAll(GetStrings, AddressOf MatchGreetings)
    Debug.Print a(0), a(1)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchNonGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllNonGreetings()
    Dim i As Long
    Dim a() As String

    a = cArray.FindAll(GetStrings, AddressOf MatchNonGreetings)
    For i = 0 To UBound(a)
        Debug.Print a(i),
    Next i
End Sub

' Create a sample array of strings to search.
Private Function GetStrings() As String()
    GetStrings = cArray.NewArray(ciString, "One", "Two", "Hello", "Four", "Hi", "Six")
End Function

' Callback method used to match a string element from
' the array to the possible greetings we are searching for.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchGreetings(ByRef s As String) As Boolean
    MatchGreetings = ((s = "Hello") Or (s = "Hi"))
End Function

' Callback method used to match a string element from
' the array to determine that we have matched against a non-greeting.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchNonGreetings(ByRef s As String) As Boolean
    MatchNonGreetings = Not ((s = "Hello") Or (s = "Hi"))
End Function

' this code produces the following output.
'
' 2
' 4
' Hello         Hi
' One           Two           Four          Six

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: FindLast

FindLast

Finds the last occurence of a matched element in the array.

 Public Function FindLast(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long ) As Variant

Parameters

Arr
[ByRef] Variant. The array to search.
AddressOfMatch
[ByVal] Long. A callback address of the matching criteria method.

Return Values

Variant - The last element in the array to match the criteria, or the default for the array type if no elements matched.

Remarks

The function signature for the callback has a specific format.

 Public Function FindLastCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

The callback method signature needs to have 1 parameter that is of a ByRef definition for the the datatype the same as the array. The callback function must return a Boolean value indicating if the passed-by-ref element matches the criteria of the matching routine.

It is extremely important to define the callback method correctly. If the method is incorrect, the application may crash.

Example

This example demonstrates some of the Find methods and how to define a Callback method that the Find methods rely on in finding array elements that match a criteria. The criteria logic is defined by the developer. The callback function is used to check if a specific array element meets the criteria being searched for.

In the examples below, a String array is searched using various criteria. The two callback functions (MatchGreetings, MatchNonGreetings) are defined with 1 parameter of a ByRef String and returns a Boolean. If the array datatype is a Long, the the callback will be defined as a ByRef Long.

None of the values should be changed during the search.

Private Sub Main()
    FindFirstGreeting
    FindLastGreeting
    FindAllGreetings
    FindAllNonGreetings
End Sub

' Searches from the beginning of the arry until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindFirstGreeting()
    Debug.Print cArray.FindIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Searches from the end of the array until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindLastGreeting()
    Debug.Print cArray.FindLastIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllGreetings()
    Dim a() As String
    a = cArray.FindAll(GetStrings, AddressOf MatchGreetings)
    Debug.Print a(0), a(1)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchNonGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllNonGreetings()
    Dim i As Long
    Dim a() As String

    a = cArray.FindAll(GetStrings, AddressOf MatchNonGreetings)
    For i = 0 To UBound(a)
        Debug.Print a(i),
    Next i
End Sub

' Create a sample array of strings to search.
Private Function GetStrings() As String()
    GetStrings = cArray.NewArray(ciString, "One", "Two", "Hello", "Four", "Hi", "Six")
End Function

' Callback method used to match a string element from
' the array to the possible greetings we are searching for.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchGreetings(ByRef s As String) As Boolean
    MatchGreetings = ((s = "Hello") Or (s = "Hi"))
End Function

' Callback method used to match a string element from
' the array to determine that we have matched against a non-greeting.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchNonGreetings(ByRef s As String) As Boolean
    MatchNonGreetings = Not ((s = "Hello") Or (s = "Hi"))
End Function

' this code produces the following output.
'
' 2
' 4
' Hello         Hi
' One           Two           Four          Six

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: FindLastIndex

FindLastIndex

Finds the index of the last occurence of a matched element in the array.

 Public Function FindLastIndex(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Arr
[ByRef] Variant. The array to search.
AddressOfMatch
[ByVal] Long. The callback address of the matching criteria method.
Index
[ByRef] Optional. Variant. The starting index in the array to begin the backward search.
Count
[ByRef] Optional. Variant. The number of elements to search.

Return Values

Long - The index of the last occurence of the matched element.

Remarks

The function signature for the callback has a specific format.

 Public Function FindLastIndexCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

The callback method signature needs to have 1 parameter that is of a ByRef definition for the the datatype the same as the array. The callback function must return a Boolean value indicating if the passed-by-ref element matches the criteria of the matching routine.

It is extremely important to define the callback method correctly. If the method is incorrect, the application may crash.

Example

This example demonstrates some of the Find methods and how to define a Callback method that the Find methods rely on in finding array elements that match a criteria. The criteria logic is defined by the developer. The callback function is used to check if a specific array element meets the criteria being searched for.

In the examples below, a String array is searched using various criteria. The two callback functions (MatchGreetings, MatchNonGreetings) are defined with 1 parameter of a ByRef String and returns a Boolean. If the array datatype is a Long, the the callback will be defined as a ByRef Long.

None of the values should be changed during the search.

Private Sub Main()
    FindFirstGreeting
    FindLastGreeting
    FindAllGreetings
    FindAllNonGreetings
End Sub

' Searches from the beginning of the arry until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindFirstGreeting()
    Debug.Print cArray.FindIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Searches from the end of the array until the first
' successful match from the MatchGreetings function,
' returning the index the element was found at.
Private Sub FindLastGreeting()
    Debug.Print cArray.FindLastIndex(GetStrings, AddressOf MatchGreetings)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllGreetings()
    Dim a() As String
    a = cArray.FindAll(GetStrings, AddressOf MatchGreetings)
    Debug.Print a(0), a(1)
End Sub

' Finds all of the array elements that pass the criteria of the
' MatchNonGreetings function. The found elements are placed
' into a new array of the same datatype as the original array
' and returned.
Private Sub FindAllNonGreetings()
    Dim i As Long
    Dim a() As String

    a = cArray.FindAll(GetStrings, AddressOf MatchNonGreetings)
    For i = 0 To UBound(a)
        Debug.Print a(i),
    Next i
End Sub

' Create a sample array of strings to search.
Private Function GetStrings() As String()
    GetStrings = cArray.NewArray(ciString, "One", "Two", "Hello", "Four", "Hi", "Six")
End Function

' Callback method used to match a string element from
' the array to the possible greetings we are searching for.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchGreetings(ByRef s As String) As Boolean
    MatchGreetings = ((s = "Hello") Or (s = "Hi"))
End Function

' Callback method used to match a string element from
' the array to determine that we have matched against a non-greeting.
' The method signature should be a ByRef of the datatype
' of the specific array being searched.
Public Function MatchNonGreetings(ByRef s As String) As Boolean
    MatchNonGreetings = Not ((s = "Hello") Or (s = "Hi"))
End Function

' this code produces the following output.
'
' 2
' 4
' Hello         Hi
' One           Two           Four          Six

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: ForEach

ForEach

Iterates over an array passing in each element into an Action function to be performed on the element.

 Public Sub ForEach(
      ByRef Arr As Variant,
      ByVal AddressOfAction As Long )

Parameters

Arr
[ByRef] Variant. The array containing the elements to be processed.
AddressOfAction
[ByVal] Long. The callback address of the function to process an array element.

Remarks

The callback method must be a Sub with a single ByRef parameter of the same type as the array.

 Public Sub ActionMethod(ByRef e As [Data Type])
     ' Perform action on e.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then the [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: GetLength

GetLength

Returns the number of elements in the specified dimension. If 0 is specified, this returns the total number of elements in the array.

 Public Function GetLength(
      ByRef Arr As Variant,
      Optional ByVal Dimension As Long = 0 ) As Long

Parameters

Arr
[ByRef] Variant. The array to retrieve the number of elements from.
Dimension
[ByVal] Optional. Long. (Optional) the specific dimension to get the number of elements.

Default: 0

Return Values

Long - The number of elements in the specified dimension or the entire array.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: GetRank

GetRank

Returns the number of dimensions in the array.

 Public Function GetRank(
      ByRef Arr As Variant ) As Long

Parameters

Arr
[ByRef] Variant. The array to retrieve the number of dimensions from.

Return Values

Long - The number of dimension in the array.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: IndexOf

IndexOf

Returns the index of the first occurrence of a value in a one-dimensional Array or in a portion of the Array.

 Public Function IndexOf(
      ByRef Arr As Variant,
      ByRef Value As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Arr
[ByRef] Variant. The array to search.
Value
[ByRef] Variant. The value to search for in the array.
Index
[ByRef] Optional. Variant. The index to the element in the array to begin search from.
Count
[ByRef] Optional. Variant. The number of elements to search, starting from startindex.
Comparer
[ByVal] Optional. IComparer. An optional comparer, primarily used for User-Defined types.

Return Values

Long - Value indicating the index the value was found. If a value of less that the lower-bounds is returned, then the value was not found in the array.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: IsNull

IsNull

Returns if an array variable is uninitialized.

 Public Function IsNull(
      ByRef Arr As Variant ) As Boolean

Parameters

Arr
[ByRef] Variant. The array to test for initialization.

Return Values

Boolean - Value indicating if the array is initialized.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: LastIndexOf

LastIndexOf

Returns the index of the last occurrence of a value in a one-dimensional Array or in a portion of the Array.

 Public Function LastIndexOf(
      ByRef Arr As Variant,
      ByRef Value As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Arr
[ByRef] Variant. The array to search.
Value
[ByRef] Variant. The value to search for in the array.
Index
[ByRef] Optional. Variant. The index to the element in the array to begin search from.
Count
[ByRef] Optional. Variant. The number of elements to search, starting from startindex.
Comparer
[ByVal] Optional. IComparer. An optional comparer, primarily used for User-Defined types.

Return Values

Long - Value indicating the index the value was found. If a value of less that the lower-bounds is returned, then the value was not found in the array.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: NewArray

NewArray

Creates an array of values.

 Public Function NewArray(
      ByVal ArrayType As ciArrayTypes,
      ParamArray ArrayElements ( ) As Variant ) As Variant

Parameters

ArrayType
[ByVal] ciArrayTypes. The target datatype of the resultant array and the values to be converted to.
ArrayElements
[ByRef] Variant. The values to be put into the new array.

Return Values

Variant - An array of the specified datatype and containing the array elements with conversion. Or an empty array if no elements are defined.

Elements of a size that are a multiple of 4 will not create a new array when being returned. All other datatype sizes will cause a new array to be created.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Reverse

Reverse

Reverses the elements in a subportion of an array.

 Public Sub Reverse(
      ByRef Arr As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant )

Parameters

Arr
[ByRef] Variant. The array to reverse.
Index
[ByRef] Optional. Variant. The starting element to begin reversing elements.
Count
[ByRef] Optional. Variant. The number of elements to reverse in the array.

Remarks

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: Sort

Sort

Sorts an entire array. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.

 Public Sub Sort(
      ByRef Keys As Variant,
      Optional ByVal Comparer As Variant )

Parameters

Keys
[ByRef] Variant. The array to sort.
Comparer
[ByVal] Optional. Variant. (Optional) An IComparer object or address of a comparer callback function.

Remarks

The Comparer parameter can be an IComparer object or a callback address to a compare function using the AddressOf method. The callback method signature is defined as follows:

 Public Function SortCallback(ByRef x As [Array Datatype], ByRef y As [Array Datatype]) As Long
     ' return a negative value if x is less than y.
     ' return a positive value if x is greater than y.
     ' return 0 if x equals y.
 End Function
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

Example

' This example creates an array of unsorted integers
' then uses the cArray.Sort method to sort the
' array, displaying the results.
Private Sub Main()
    Dim ints(9) As Integer
    Dim i As Long

    ' Fill array with random values.
    Rnd -13
    For i = 0 To UBound(ints)
        ints(i) = Rnd * 10
    Next i

    ' Display original unsorted array of integers.
    Console.WriteLine "Unsorted Array of Integers."
    DisplayInts ints

    ' Sort array of integers.
    cArray.Sort ints

    ' Display sorted array of integers.
    Console.WriteLine
    Console.WriteLine "Sorted Array of Integers."
    DisplayInts ints

    ' Wait for user to press enter.
    Console.ReadLine

End Sub

' Displays an array of integers.
Private Sub DisplayInts(ByRef ints() As Integer)
    Dim i As Long

    For i = LBound(ints) To UBound(ints)
        Console.WriteLine "ints({0}) = {1}", i, ints(i)
    Next i
End Sub

' This code produces the following output.
'
'Unsorted Array of Integers.
'ints(0) = 6
'ints(1) = 4
'ints(2) = 0
'ints(3) = 3
'ints(4) = 9
'ints(5) = 7
'ints(6) = 1
'ints(7) = 0
'ints(8) = 4
'ints(9) = 9
'
'Sorted Array of Integers.
'ints(0) = 0
'ints(1) = 0
'ints(2) = 1
'ints(3) = 3
'ints(4) = 4
'ints(5) = 4
'ints(6) = 6
'ints(7) = 7
'ints(8) = 9
'ints(9) = 9

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: SortEx

SortEx

Sorts an array, or subportion, given a startindex and length. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.

 Public Sub SortEx(
      ByRef Keys As Variant,
      ByVal Index As Long,
      ByVal Count As Long,
      Optional ByVal Comparer As Variant )

Parameters

Keys
[ByRef] Variant. The array to sort.
Index
[ByVal] Long. The starting index in the array to start sorting.
Count
[ByVal] Long. The number of elements to be sorted.
Comparer
[ByVal] Optional. Variant. (Optional) An IComparer object or address of a comparer callback function.

Remarks

The Comparer parameter can be an IComparer object or a callback address to a compare function using the AddressOf method. The callback method signature is defined as follows:

 Public Function SortCallback(ByRef x As [Array Datatype], ByRef y As [Array Datatype]) As Long
     ' return a negative value if x is less than y.
     ' return a positive value if x is greater than y.
     ' return 0 if x equals y.
 End Function
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: SortKey

SortKey

Sorts an entire array based on an array of keys. An optionally supplied comparer object can be used to compare special elements, such as userdefined values.

 Public Sub SortKey(
      ByRef Keys As Variant,
      ByRef Items As Variant,
      Optional ByVal Comparer As Variant )

Parameters

Keys
[ByRef] Variant. An array the sorting is based on.
Items
[ByRef] Variant. An array that is sorted based on the sorting of keys.
Comparer
[ByVal] Optional. Variant. (Optional) An IComparer object or address of a comparer callback function.

Remarks

The Comparer parameter can be an IComparer object or a callback address to a compare function using the AddressOf method. The callback method signature is defined as follows:

 Public Function SortCallback(ByRef x As [Array Datatype], ByRef y As [Array Datatype]) As Long
     ' return a negative value if x is less than y.
     ' return a positive value if x is greater than y.
     ' return 0 if x equals y.
 End Function
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

Example

Option Explicit

' This example demonstrates how an array can be sorted
' by using another array to determine the sort order for
' the original. This demonstration uses an array of type
' vbLong as the keys to sort the main Values array. Even
' though Values is a vbString type array, it will follow
' the Keys array when being sorted. Once the array is sorted
' using the Keys vbLong array, the Values array is displayed
' to show how the array did not sort using String text compare.
' The Values array is then sorted again using the standard
' sort method on the Values vbString type array and redisplayed.
' This will show the difference between sorting using a Key array
' of a different type to sort an original array and how the
' original array itself would be sorted on its own.
Private Sub Main()
    Dim values(14) As String
    Dim keys(14) As Long

    ' Fill both arrays with random values.
    FillKeysAndValues keys, values

    ' Display the current order of the values array.
    DisplayValues "Unsorted Values Array.", values

    ' Sort the values array using the keys array
    ' to determine the sort order.
    cArray.SortKey keys, values

    ' Display the new sorted values array.
    ' The values are sorted numerically because the
    ' keys array is a numeric array.
    DisplayValues "Sorted Values array using Keys array for sort order.", values

    ' Re-sort the values array by itself.
    ' The values are sorted as strings.
    cArray.Sort values

    ' Display the re-sorted values array, showing
    ' the how string comparing affects sort order.
    DisplayValues "Re-sorted Values array using standard sorting with String compares.", values

    ' Wait for user to press enter
    Console.ReadLine
End Sub

' Fill Keys and Values array.
Private Sub FillKeysAndValues(ByRef keys() As Long, ByRef values() As String)
    Dim i As Long

    Rnd -13
    For i = LBound(keys) To UBound(keys)
        keys(i) = Rnd * i
        values(i) = "Value " & keys(i)
    Next i
End Sub

' Display Array
Private Sub DisplayValues(ByVal title As String, ByRef values() As String)
    Dim i As Long

    Debug.Print title
    For i = LBound(values) To UBound(values)
        Debug.Print cString.Format("values({0}) = {1}", i, values(i))
    Next i
End Sub

' This code produces the following output.
'
' Unsorted Values Array.
' values(0) = Value 0
' values(1) = Value 0
' values(2) = Value 0
' values(3) = Value 1
' values(4) = Value 4
' values(5) = Value 3
' values(6) = Value 1
' values(7) = Value 0
' values(8) = Value 3
' values(9) = Value 8
' values(10) = Value 8
' values(11) = Value 8
' values(12) = Value 10
' values(13) = Value 10
' values(14) = Value 6
' Sorted Values array using Keys array for sort order.
' values(0) = Value 0
' values(1) = Value 0
' values(2) = Value 0
' values(3) = Value 0
' values(4) = Value 1
' values(5) = Value 1
' values(6) = Value 3
' values(7) = Value 3
' values(8) = Value 4
' values(9) = Value 6
' values(10) = Value 8
' values(11) = Value 8
' values(12) = Value 8
' values(13) = Value 10
' values(14) = Value 10
' Re-sorted Values array using standard sorting with String compares.
' values(0) = Value 0
' values(1) = Value 0
' values(2) = Value 0
' values(3) = Value 0
' values(4) = Value 1
' values(5) = Value 1
' values(6) = Value 10
' values(7) = Value 10
' values(8) = Value 3
' values(9) = Value 3
' values(10) = Value 4
' values(11) = Value 6
' values(12) = Value 8
' values(13) = Value 8
' values(14) = Value 8
As you can see, the Value string array sorted as if numeric when using the Keys array to be sorted by. When it was sorted alone, it was sorted as a String array and the Value 10' appears in its string compared index.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: SortKeyEx

SortKeyEx

Sorts an array based on an array of keys. A subportion of the array can be sorted given a startindex and length. An optionally, supplied comparer object can be used to compare special elements, such as userdefined values.

 Public Sub SortKeyEx(
      ByRef Keys As Variant,
      ByRef Items As Variant,
      ByVal Index As Long,
      ByVal Count As Long,
      Optional ByVal Comparer As Variant )

Parameters

Keys
[ByRef] Variant. An array the sorting is based on.
Items
[ByRef] Variant. An array that is sorted based on the sorting of keys.
Index
[ByVal] Long. The starting index in the array to start sorting.
Count
[ByVal] Long. The number of elements to be sorted.
Comparer
[ByVal] Optional. Variant. (Optional) An IComparer object or address of a comparer callback function.

Remarks

The Comparer parameter can be an IComparer object or a callback address to a compare function using the AddressOf method. The callback method signature is defined as follows:

 Public Function SortCallback(ByRef x As [Array Datatype], ByRef y As [Array Datatype]) As Long
     ' return a negative value if x is less than y.
     ' return a positive value if x is greater than y.
     ' return 0 if x equals y.
 End Function
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview | Class cArray Overview


cArray: TrueForAll

TrueForAll

Returns a boolean indicating if all elements in the array matched the criteria.

 Public Function TrueForAll(
      ByRef Arr As Variant,
      ByVal AddressOfMatch As Long ) As Boolean

Parameters

Arr
[ByRef] Variant. The array to compare against the criteria.
AddressOfMatch
[ByVal] Long. The callback address used to match the criteria.

Return Values

Boolean - Indication of the entire array matching the criteria or not.

Remarks

The function signature for the callback has a specific format.

 Public Function TrueForAllCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview | Class cArray Overview


CaseInsensitiveComparer

CaseInsensitiveComparer

Provides a comparer that is case-insensitive when comparing strings.

See Also

Project VBCorLib Overview

Implements:

IComparer
IObject

Public:

Methods:

Name | Description
Compare | Returns the comparison between two values.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


CaseInsensitiveComparer: Compare

Compare

Returns the comparison between two values.

 Public Function Compare(
      ByRef x As Variant,
      ByRef y As Variant ) As Long

Parameters

x
[ByRef] Variant. The left-hand-side of the equation.
y
[ByRef] Variant. the right-hand-side of the equation.

Return Values

Long - The relationship between the values.
Relationship guide:
x is equal to y returns 0.
x is greater than y returns a positive value (1).
x is less than y returns a negative value (-1).

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveComparer: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveComparer: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveComparer: IComparer

IComparer

 Implements IComparer

Return Values

IComparer -

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveComparer: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveComparer: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveComparer Overview


CaseInsensitiveHashCodePrvdr

CaseInsensitiveHashCodePrvdr

Generates hashcodes for values as normal, but ignores the case for strings.

See Also

Project VBCorLib Overview

Implements:

IHashcodeProvider
IObject

Public:

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


CaseInsensitiveHashCodePrvdr: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveHashCodePrvdr Overview


CaseInsensitiveHashCodePrvdr: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode(
      Optional ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Optional. Variant. The value or variable to generate a hashcode for.

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveHashCodePrvdr Overview


CaseInsensitiveHashCodePrvdr: IHashcodeProvider

IHashcodeProvider

 Implements IHashcodeProvider

Return Values

IHashcodeProvider -

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveHashCodePrvdr Overview


CaseInsensitiveHashCodePrvdr: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveHashCodePrvdr Overview


CaseInsensitiveHashCodePrvdr: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class CaseInsensitiveHashCodePrvdr Overview


cDateTime

cDateTime

Represents a point in time.

Remarks

The cDateTime class can represent a point in time from 1/1/0001 12:00:00 AM to 12/31/9999 11:59:59 PM. The time is represented in a gregorian calendar set.

 Dim dt As cDateTime
 Set dt = NewDate(#1/1/2005 8:30:00AM#")
@see Constructors @see cDateTimeStatic @see DateTimeFormatInfo @see TimeSpan @see IComparable @see IFormattable

See Also

Project VBCorLib Overview

Implements:

IComparable
IFormattable
IObject

Public:

Properties:

Name | Description
DateOnly (get) | Returns the date portion of the current date representation.
Day (get) | Returns the Day part of the current date representation.
DayOfWeek (get) | Returns the day of the week for the current date.
DayOfYear (get) | Returns the day within the calendar year.
Hour (get) | Returns the Hour part of the current date representation.
IsDayLightSavingsTime (get) | Returns if this cDateTime instance is currently in daylight savings time.
Kind (get) | Returns the kind of cDateTime.
Millisecond (get) | Returns the Millisecond part of the current date representation.
Minute (get) | Returns the Minute part of the current date representation.
Month (get) | Returns the Month part of the current date representation.
Second (get) | Returns the Second part of the current date representation.
Ticks (get) | Returns the whole date represented in ticks.
TimeOfDay (get) | Returns the time portion of the current date representation.
TotalMilliseconds (get) | Returns the whole date represented in milliseconds.
Year (get) | Returns the Year part of the current date representation.

Methods:

Name | Description
Add | Adds a specified amount of time to the current date, returning a new cDateTime instance with the calcuated value.
AddDays | Adds a specified number of days to the current date, returning a new cDateTime instance with the calcuated value.
AddHours | Adds a specified number of hours to the current date, returning a new cDateTime instance with the calcuated value.
AddMilliseconds | Adds a specified number of milliseconds to the current date, returning a new cDateTime instance with the calcuated value.
AddMinutes | Adds a specified number of minutes to the current date, returning a new cDateTime instance with the calcuated value.
AddMonths | Adds a specified number of months to the current date, returning a new cDateTime instance with the calcuated value.
AddSeconds | Adds a specified number of seconds to the current date, returning a new cDateTime instance with the calcuated value.
AddTicks | Adds a specified number of ticks to the current date, returning a new cDateTime instance with the calcuated value.
AddYears | Adds a specified number of years to the current date., returning a new cDateTime instance with the calcuated value.
CompareTo | Compares this instance to a passed in cDateTime instance.
Equals | Returns a boolean indicating if the value and this object instance are the same date.
EqualTo | Determines if this instance is equal to another cDateTime object.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GreaterThan | Determines if this instance is greater than another cDateTime object.
GreaterThanOrEqualTo | Determines if this instance is greater than or equal to another cDateTime object.
LessThan | Determines if this instance is less than another cDateTime object.
LessThanOrEqualTo | Determines if this instance is less than or equal to another cDateTime object.
NotEqualTo | Determines if this instance is not equal to another cDateTime object.
Subtract | Subtracts either a cDateTime instance or a TimeSpan instance from this cDateTime instance.
ToBinary | Returns a 64-bit representation of the time and kind.
ToFileTime | Converts the cDateTime to a FileTime representation, adjusting for timezone.
ToFileTimeUtc | Converts the cDateTime to a FileTime representation, ignoring the timezone offset.
ToLocalTime | Returns a cDateTime with the timezone offset applied to this instance.
ToLongDateString | Returns the date formatted to the current cultures long date pattern.
ToLongTimeString | Returns the time formatted to the current cultures long time pattern.
ToOADate | Converts the current instance to an Ole Automation date representation that is normally used in Visual Basic.
ToShortDateString | Returns the date formatted to the current cultures short date pattern.
ToShortTimeString | Returns the time formatted to the current cultures short time pattern.
ToString | Returns a string representation of this object instance.
ToUniversalTime | Returns a cDateTime with the timezone offset removed from this instance.


cDateTime: Add

Add

Adds a specified amount of time to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function Add(
      ByRef ts As TimeSpan ) As cDateTime

Parameters

ts
[ByRef] TimeSpan. The amount of time to add.

Return Values

cDateTime - The new date object containing the new calculated time.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddDays

AddDays

Adds a specified number of days to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddDays(
      ByVal Value As Double ) As cDateTime

Parameters

Value
[ByVal] Double. The number of days to add.

Return Values

cDateTime - The new cDateTime containing the calculated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddHours

AddHours

Adds a specified number of hours to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddHours(
      ByVal Value As Double ) As cDateTime

Parameters

Value
[ByVal] Double. The number of hours to add.

Return Values

cDateTime - The new cDateTime instance containing the calculated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddMilliseconds

AddMilliseconds

Adds a specified number of milliseconds to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddMilliseconds(
      ByVal Value As Double ) As cDateTime

Parameters

Value
[ByVal] Double. The number of milliseconds to add.

Return Values

cDateTime - The new date containing the new calculated time.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddMinutes

AddMinutes

Adds a specified number of minutes to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddMinutes(
      ByVal Value As Double ) As cDateTime

Parameters

Value
[ByVal] Double. The number of minutes to add.

Return Values

cDateTime - The new cDateTime instance containing the calculated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddMonths

AddMonths

Adds a specified number of months to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddMonths(
      ByVal Months As Long ) As cDateTime

Parameters

Months
[ByVal] Long. The number of months to be added.

Return Values

cDateTime - The new cDateTime instance containing the calculated value.

Remarks

If the new month does not have as many days in it as the original month, then the day is set to the last day of the new month if it exceeds the maximum number of days for the new month.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddSeconds

AddSeconds

Adds a specified number of seconds to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddSeconds(
      ByVal Value As Double ) As cDateTime

Parameters

Value
[ByVal] Double. The number of seconds to be added.

Return Values

cDateTime - The new cDateTime instance containing the calculated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddTicks

AddTicks

Adds a specified number of ticks to the current date, returning a new cDateTime instance with the calcuated value.

 Public Function AddTicks(
      ByRef Value As Variant ) As cDateTime

Parameters

Value
[ByRef] Variant. The number of ticks to be added.

Return Values

cDateTime - the new cDateTime instance containing the calcuated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: AddYears

AddYears

Adds a specified number of years to the current date., returning a new cDateTime instance with the calcuated value.

 Public Function AddYears(
      ByVal Value As Long ) As cDateTime

Parameters

Value
[ByVal] Long. The number of years to be added.

Return Values

cDateTime - The new cDateTime instance containing the calculated value.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: CompareTo

CompareTo

Compares this instance to a passed in cDateTime instance.

 Public Function CompareTo(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The cDateTime or Date value to compare against this instance.

Return Values

Long - A value indicating the relation to the passed in value. Negative indicates this instance is less than the argument, zero indicates the two values are equal, and positive indicates this value is greater than the argument.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: DateOnly (get)

DateOnly

Returns the date portion of the current date representation.

 Public Property Get DateOnly ( ) As cDateTime

Return Values

cDateTime - The date portion.

Remarks

The date portion does not include the time portion from the original date representation. The new date will have a time of 12:00AM.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Day (get)

Day

Returns the Day part of the current date representation.

 Public Property Get Day ( ) As Long

Return Values

Long - The day of the date.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: DayOfWeek (get)

DayOfWeek

Returns the day of the week for the current date.

 Public Property Get DayOfWeek ( ) As DayOfWeek

Return Values

DayOfWeek - The day of the week.

Remarks

The DayOfWeekEnum is zero based and therefore not directly compatible with vbDayOfWeek. 1 must be added to align to the 1-based values of vbDayOfWeek.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: DayOfYear (get)

DayOfYear

Returns the day within the calendar year.

 Public Property Get DayOfYear ( ) As Long

Return Values

Long - The day within the year.

Remarks

The value is calculated using the Gregorian calendar, and will range from 1-365 or 1-366 for leap years.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same date.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: EqualTo

EqualTo

Determines if this instance is equal to another cDateTime object.

 Public Function EqualTo(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is equal to the dt object.

Remarks

This is provided for quick comprisons of two cDateTimeObjects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: GreaterThan

GreaterThan

Determines if this instance is greater than another cDateTime object.

 Public Function GreaterThan(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is greater than the dt object.

Remarks

This is provided for quick comparisions of two cDateTime objects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: GreaterThanOrEqualTo

GreaterThanOrEqualTo

Determines if this instance is greater than or equal to another cDateTime object.

 Public Function GreaterThanOrEqualTo(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is greater than or equal to the dt object.

Remarks

This is provided for quick comprisons of two cDateTimeObjects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Hour (get)

Hour

Returns the Hour part of the current date representation.

 Public Property Get Hour ( ) As Long

Return Values

Long - The current hour.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: IComparable

IComparable

 Implements IComparable

Return Values

IComparable -

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: IFormattable

IFormattable

 Implements IFormattable

Return Values

IFormattable -

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: IsDayLightSavingsTime (get)

IsDayLightSavingsTime

Returns if this cDateTime instance is currently in daylight savings time.

 Public Property Get IsDayLightSavingsTime ( ) As Boolean

Return Values

Boolean - If this instance is in daylight savings.

Remarks

This uses the current time zone settings of the system to determine when daylight savings should be.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Kind (get)

Kind

Returns the kind of cDateTime.

 Public Property Get Kind ( ) As DateTimeKind

Return Values

DateTimeKind - The kind.

Remarks

A cDateTime can be Universal Coordinated Time (UTC), local time, or unspecified.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: LessThan

LessThan

Determines if this instance is less than another cDateTime object.

 Public Function LessThan(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is less than the dt object.

Remarks

This is provided for quick comprisons of two cDateTimeObjects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: LessThanOrEqualTo

LessThanOrEqualTo

Determines if this instance is less than or equal to another cDateTime object.

 Public Function LessThanOrEqualTo(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is less than or equal to the dt object.

Remarks

This is provided for quick comprisons of two cDateTimeObjects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Millisecond (get)

Millisecond

Returns the Millisecond part of the current date representation.

 Public Property Get Millisecond ( ) As Long

Return Values

Long - The current millisecond.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Minute (get)

Minute

Returns the Minute part of the current date representation.

 Public Property Get Minute ( ) As Long

Return Values

Long - The current minute.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Month (get)

Month

Returns the Month part of the current date representation.

 Public Property Get Month ( ) As Long

Return Values

Long - The month of the date.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: NotEqualTo

NotEqualTo

Determines if this instance is not equal to another cDateTime object.

 Public Function NotEqualTo(
      ByRef dt As cDateTime ) As Boolean

Parameters

dt
[ByRef] cDateTime. The cDateTime object to compare against.

Return Values

Boolean - Returns True if this object is not equal to the dt object.

Remarks

This is provided for quick comprisons of two cDateTimeObjects.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Second (get)

Second

Returns the Second part of the current date representation.

 Public Property Get Second ( ) As Long

Return Values

Long - The current second.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Subtract

Subtract

Subtracts either a cDateTime instance or a TimeSpan instance from this cDateTime instance.

 Public Function Subtract(
      ByRef Value As Variant ) As Object

Parameters

Value
[ByRef] Variant. A cDateTime or TimeSpan object to subtract from this instance.

Return Values

Object - If subtracting a cDateTime object from this, then a TimeSpan representing the difference in time between the two is returned. If subtracting a TimeSpan object from this instance, then a new cDateTime with a difference of the TimeSpan obect from this instance is returned.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Ticks (get)

Ticks

Returns the whole date represented in ticks.

 Public Property Get Ticks ( ) As Variant

Return Values

Variant - The date in ticks.

Remarks

The return value is a Decimal containing the the number of whole ticks.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: TimeOfDay (get)

TimeOfDay

Returns the time portion of the current date representation.

 Public Property Get TimeOfDay ( ) As TimeSpan

Return Values

TimeSpan - The time portion.

Remarks

The time portion does not include the original date portion. It now will have a date of 1/1/0001.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToBinary

ToBinary

Returns a 64-bit representation of the time and kind.

 Public Function ToBinary ( ) As Currency

Return Values

Currency - 64-bit representation of the cDateTime

Remarks

The upper 2 bits are used to represent the DateTimeKind of the object, the lower 62-bits are used to represent the 100-nanosecond segmented time.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToFileTime

ToFileTime

Converts the cDateTime to a FileTime representation, adjusting for timezone.

 Public Function ToFileTime ( ) As Currency

Return Values

Currency - The filetime representation of the cDateTime.

Remarks

FileTime values cannot be less than 1/1/1601 12:00:00AM.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToFileTimeUtc

ToFileTimeUtc

Converts the cDateTime to a FileTime representation, ignoring the timezone offset.

 Public Function ToFileTimeUtc ( ) As Currency

Return Values

Currency - The filetime representation of the cDateTime.

Remarks

FileTime values cannot be less than 1/1/1601 12:00:00AM.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToLocalTime

ToLocalTime

Returns a cDateTime with the timezone offset applied to this instance.

 Public Function ToLocalTime ( ) As cDateTime

Return Values

cDateTime - The cDateTime object with the timezone offset applied.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToLongDateString

ToLongDateString

Returns the date formatted to the current cultures long date pattern.

 Public Function ToLongDateString ( ) As String

Return Values

String - Long date pattern formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToLongTimeString

ToLongTimeString

Returns the time formatted to the current cultures long time pattern.

 Public Function ToLongTimeString ( ) As String

Return Values

String - Long time pattern formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToOADate

ToOADate

Converts the current instance to an Ole Automation date representation that is normally used in Visual Basic.

 Public Function ToOADate ( ) As Date

Return Values

Date - The Visual Basic compatible date.

Remarks

It is possible that this instance holds a date outside of the valid range of dates that Visual Basic can represent. If this happens, then a normal VB error will be raised during the assignment.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToShortDateString

ToShortDateString

Returns the date formatted to the current cultures short date pattern.

 Public Function ToShortDateString ( ) As String

Return Values

String - Short date pattern formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToShortTimeString

ToShortTimeString

Returns the time formatted to the current cultures short time pattern.

 Public Function ToShortTimeString ( ) As String

Return Values

String - Short time pattern formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString(
      Optional ByVal Format As String,
      Optional ByVal Provider As IFormatProvider ) As String

Parameters

Format
[ByVal] Optional. String. The format inwhich the date should represent.
Provider
[ByVal] Optional. IFormatProvider. A formatting provider to format the date.

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview | DateTimeFormatInfo


cDateTime: TotalMilliseconds (get)

TotalMilliseconds

Returns the whole date represented in milliseconds.

 Public Property Get TotalMilliseconds ( ) As Currency

Return Values

Currency - The number of milliseconds from 1/1/0001.

Remarks

The return value is Currency and can represent fractions of milliseconds called ticks. There are 10000 ticks per millisecond, so the fractional portion is the number of ticks.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: ToUniversalTime

ToUniversalTime

Returns a cDateTime with the timezone offset removed from this instance.

 Public Function ToUniversalTime ( ) As cDateTime

Return Values

cDateTime - The cDateTime object with the timezone offset removed.

Remarks

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTime: Year (get)

Year

Returns the Year part of the current date representation.

 Public Property Get Year ( ) As Long

Return Values

Long - The year of the date.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class cDateTime Overview


cDateTimeStatic

cDateTimeStatic

Represents methods to create cDateTime objects from various data sources.

Remarks

These methods are considered static. The cDateTimeStatic cannot be directly instantiated. Use these methods withe cDateTime.* syntax.

 Dim dt As cDateTime
 Set dt = cDateTime.FromOADate(#1/1/2001 8:30:00 AM#)

  A quicker way to create a cDateTime object is to use the NewDate method.
 Set dt = NewDate(#1/1/2001 8:30:00 AM#)
This will create a new instance of cDateTime with the supplied date value.

See Also

Project VBCorLib Overview | cDateTime

Public:

Types:

Name | Description
DateTimeKind | Used to specify the type of cDateTime object.
DayOfWeek | This enumeration represents the days of the week as used by cDateTime and Calendars.

Properties:

Name | Description
MaxValue (get) | Returns the maximum cDateTime representation.
MinValue (get) | Returns the minimum cDateTime representation.

Methods:

Name | Description
DaysInMonth | Returns the number of days in a Gregorian calendar month.
FromBinary | Creates a cDateTime object from a 64-bit currency value.
FromFileTime | Creates a cDateTime object from an operating system file timestamp.
FromFileTimeUtc | Returns a cDateTime object from a FileTime value.
FromMilliseconds | Returns a cDateTime object from milliseconds.
FromOADate | Returns a cDateTime object from a VB Date value.
IsLeapYear | Returns a boolean indicating if the specific Gregorian year is a leap year.
Now | Returns a cDateTime that represents the current time on the local machine.
Parse | Parses a string representation of a date into a cDateTime object.
SpecifyKind | Creates a new cDateTime object with the specified DateTimeKind.
Today | Returns a cDateTime that represents only the current date. The time portion is not present.
UtcNow | Returns a cDateTime that represents the current time with the UTC offset.


cDateTimeStatic: DateTimeKind

DateTimeKind

Used to specify the type of cDateTime object.

 Public Enum DateTimeKind

Values

UnspecifiedKind = 0
0
UtcKind = 1
1
LocalKind = 2
2

Remarks

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: DayOfWeek

DayOfWeek

This enumeration represents the days of the week as used by cDateTime and Calendars.

 Public Enum DayOfWeek

Values

Sunday
0
Monday
1
Tuesday
2
Wednesday
3
Thursday
4
Friday
5
Saturday
6

Remarks

The DayOfWeek is 0 based, where as VBs vbDayOfWeek is 1 based.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: DaysInMonth

DaysInMonth

Returns the number of days in a Gregorian calendar month.

 Public Function DaysInMonth(
      ByVal Year As Long,
      ByVal Month As Long ) As Long

Parameters

Year
[ByVal] Long. The year the month is in.
Month
[ByVal] Long. The month to find the number of days for.

Return Values

Long - The number of days in the specified month.

Remarks

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: FromBinary

FromBinary

Creates a cDateTime object from a 64-bit currency value.

 Public Function FromBinary(
      ByVal Value As Currency ) As cDateTime

Parameters

Value
[ByVal] Currency. The value to initialize the cDateTime with.

Return Values

cDateTime - A new cDateTime object.

Remarks

The 64-bit value contains both the time in 100-nanosecond increments and the DateTimeKind value used to determine if the value is a UTC, Local Time, or unspecified time.

The upper 2-bits represent the DateTimeKind value.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: FromFileTime

FromFileTime

Creates a cDateTime object from an operating system file timestamp.

 Public Function FromFileTime(
      ByVal Time As Currency ) As cDateTime

Parameters

Time
[ByVal] Currency. The file time in UTC time.

Return Values

cDateTime - The cDateTime of the file time converted to local time from UTC time.

Remarks

Time is a 64-bit integer representing a Windows file timestamp. Using a Currency datatype means the timestamp is represented as milliseconds with the fraction representing ticks of a millisecond. No conversion if performed. The 64-bit values is used as is.

The timestamp is the number of milliseconds (including the fractional tick portion) elasped since January 1, 1601 A.D. 12:00 A.M. coordinated universal time (UTC).

A tick is 100-nanoseconds. There are 10000 ticks per millisecond, equivalent to the number of fractional values in a Currency datatype.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: FromFileTimeUtc

FromFileTimeUtc

Returns a cDateTime object from a FileTime value.

 Public Function FromFileTimeUtc(
      ByVal Time As Currency ) As cDateTime

Parameters

Time
[ByVal] Currency. The file time in UTC time.

Return Values

cDateTime - The cDateTime of the file time in UTC time.

Remarks

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: FromMilliseconds

FromMilliseconds

Returns a cDateTime object from milliseconds.

 Public Function FromMilliseconds(
      ByVal ms As Currency,
      Optional ByVal Kind As DateTimeKind = UnspecifiedKind ) As cDateTime

Parameters

ms
[ByVal] Currency. The number of milliseconds the time is equal to.
Kind
[ByVal] Optional. DateTimeKind. Specifies whether the cDateTime is a UTC, Local, or unspecified time type.

Default: UnspecifiedKind

Return Values

cDateTime - The cDateTime object converted from milliseconds.

Remarks

Since a Currency can be passed in, the fractional portion can be used to represent the number ticks (1/10000 ms) in the date.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: FromOADate

FromOADate

Returns a cDateTime object from a VB Date value.

 Public Function FromOADate(
      ByVal d As Date,
      Optional ByVal Kind As DateTimeKind = UnspecifiedKind ) As cDateTime

Parameters

d
[ByVal] Date. The standard VB Date value.
Kind
[ByVal] Optional. DateTimeKind. Specifies whether the cDateTime is a UTC, Local, or unspecified time type.

Default: UnspecifiedKind

Return Values

cDateTime - The cDateTime representation of the date.

Remarks

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: IsLeapYear

IsLeapYear

Returns a boolean indicating if the specific Gregorian year is a leap year.

 Public Function IsLeapYear(
      ByVal Year As Long ) As Boolean

Parameters

Year
[ByVal] Long. The year to test for leap year.

Return Values

Boolean - Indication of leap year.

Remarks

Only the Gregorian calendar is supported through the cDateTime functions. To determine leap years for other calendar types, an instance of the specific calendar will need to be used.

If the year is evenly divisible by 4 or 400 and not by 100 then it is a leap year.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: MaxValue (get)

MaxValue

Returns the maximum cDateTime representation.

 Public Property Get MaxValue ( ) As cDateTime

Return Values

cDateTime - The maximum cDateTime.

Remarks

The maximum cDateTime is "12/31/9999 11:59:59 PM".

Read Only.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: MinValue (get)

MinValue

Returns the minimum cDateTime representation.

 Public Property Get MinValue ( ) As cDateTime

Return Values

cDateTime - The minimum cDateTime.

Remarks

The minimum cDateTime is 1/1/0001 12:00:00 AM.

Read Only.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: Now

Now

Returns a cDateTime that represents the current time on the local machine.

 Public Function Now ( ) As cDateTime

Return Values

cDateTime - The cDateTime object representing the current time on the local machine.

Remarks

This method uses GetLocalTime which has a resolution down to the milliseconds. If the milliseconds is not wanted, then either the Millisecond must be subtracted for the instance, or use cDateTime.FromOADate(Now).

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: Parse

Parse

Parses a string representation of a date into a cDateTime object.

 Public Function Parse(
      ByRef s As String ) As cDateTime

Parameters

s
[ByRef] String. The date string to be parsed.

Return Values

cDateTime - A cDateTime object created from the date string.

Remarks

The parse method simply uses CDate to parse the string.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: SpecifyKind

SpecifyKind

Creates a new cDateTime object with the specified DateTimeKind.

 Public Function SpecifyKind(
      ByVal Value As cDateTime,
      ByVal Kind As DateTimeKind ) As cDateTime

Parameters

Value
[ByVal] cDateTime. The cDateTime to convert to a specific kind.
Kind
[ByVal] DateTimeKind. Specifies whether the cDateTime is a UTC, Local, or unspecified time type.

Return Values

cDateTime - A new cDateTime with the original date and new kind.

Remarks

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: Today

Today

Returns a cDateTime that represents only the current date. The time portion is not present.

 Public Function Today ( ) As cDateTime

Return Values

cDateTime - The cDateTime representing the date.

Remarks

The time is still there, just is only 12:00AM.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


cDateTimeStatic: UtcNow

UtcNow

Returns a cDateTime that represents the current time with the UTC offset.

 Public Function UtcNow ( ) As cDateTime

Return Values

cDateTime - The cDateTime object representing the current time with the UTC offset.

Remarks

This method uses GetSystemTime which has a resolution down to the milliseconds. There is no direct VB equivalent.

See Also

Project VBCorLib Overview | Class cDateTimeStatic Overview


CharEnumerator

CharEnumerator

Used to enumerate the characters in a string from start to end.

Remarks

Each character in the string is treated as an Integer value. This equates to using AscW for each character. There is no Unicode conversion using a Code Page.

The return value is a 16-bit signed Integer. This means that characters above &H7fff (32767) with be negative. To change this to the corrisponding positive value, add &H10000 (65536) to the value.

Example

 Dim n As Variant
 Dim s As String

 s = "Hello"

 ' Iterate over a String using For..Each
 For Each n In NewCharEnumerator(s)
     Debug.Print n
 Next n
 ' output
 ' 72
 ' 101
 ' 108
 ' 108
 ' 111

 ' Iterate over a String manually
 Dim e As CharEnumerator
 Set e = NewCharEnumerator(s)

 Do While e.MoveNext
     Debug.Print e.Current
 Loop
 ' output
 ' 72
 ' 101
 ' 108
 ' 108
 ' 111

See Also

Project VBCorLib Overview | Constructors | IEnumerator

Implements:

IEnumerator
IObject

Public:

Properties:

Name | Description
Current (get) | This returns the current item of the enumeration. The current item is called after a successful MoveNext.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
MoveNext | Requests the enumerator moves to the next item being enumerated. Returns True on success, False otherwise. This is called prior to Current. If this is successful, Current will be called.
Reset | Requests the enumerator resets itself to begin enumerating from the beginning.
ToString | Returns a string representation of this object instance.


CharEnumerator: Current (get)

Current

This returns the current item of the enumeration. The current item is called after a successful MoveNext.

 Public Property Get Current ( ) As Integer

Return Values

Integer - Returns the raw Unicode value for the current character in the string.

Remarks

The return value is a 16-bit signed Integer. This means that characters above &H7fff (32767) with be negative. To change this to the corrisponding positive value, add &H10000 (65536) to the value.

Read Only.

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: IEnumerator

IEnumerator

 Implements IEnumerator

Return Values

IEnumerator -

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: MoveNext

MoveNext

Requests the enumerator moves to the next item being enumerated. Returns True on success, False otherwise. This is called prior to Current. If this is successful, Current will be called.

 Public Function MoveNext ( ) As Boolean

Return Values

Boolean - Indication if the move was successful.

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: Reset

Reset

Requests the enumerator resets itself to begin enumerating from the beginning.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


CharEnumerator: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class CharEnumerator Overview


Comparer

Comparer

Provides a default mechanism to compare two values. The values must be of the same datatype to be compared. Otherwise an exception will be thrown.

Remarks

The default comparer requires that the two datatypes being compared be the same. This includes comparing two numbers such that comparing a vbLong type to a vbInteger type will result in an exception.
Strings will not be converted to numbers for comparison, even though VB supports this action. The comparisons of strings is case-sensitive. For case-insensitive comparisons, use an instance of CaseInsensitiveComparer class.

In order for objects to be accepted in the comparison, they must implement the IComparable interface. The comparer will then call the object through the IComparable.Compare method, passing in the value for the object to compare itself with.

The return value should indicate the objects relation to the value passed in:
Positive number = object > value
Negative number = object < value
Return of zero = object = value

See Also

Project VBCorLib Overview | ComparerStatic

Implements:

IComparer

Public:

Methods:

Name | Description
Compare | Returns the comparison between to values.


Comparer: Compare

Compare

Returns the comparison between to values.

 Public Function Compare(
      ByRef x As Variant,
      ByRef y As Variant ) As Long

Parameters

x
[ByRef] Variant. The left-hand-side of the equation.
y
[ByRef] Variant. the right-hand-side of the equation.

Return Values

Long - The relationship between the values.
Relationship guide:
x is equal to y returns 0.
x is greater than y returns a positive value (1).
x is less than y returns a negative value (-1).

Remarks

See Also

Project VBCorLib Overview | Class Comparer Overview


Comparer: IComparer

IComparer

 Implements IComparer

Return Values

IComparer -

Remarks

See Also

Project VBCorLib Overview | Class Comparer Overview


ComparerStatic

ComparerStatic

Provides static functions to access the default comparer.

Remarks

To access the default comparer through the ComparerStatic class, use the Comparer namespace.

 Set Comparer = Comparer.Default
This will return the default system comparer.

See Also

Project VBCorLib Overview | Comparer

Public:

Methods:

Name | Description
Default | Returns the single instance of the default comparer.


ComparerStatic: Default

Default

Returns the single instance of the default comparer.

 Public Function Default ( ) As Comparer

Return Values

Comparer - The default comparer.

Remarks

See Also

Project VBCorLib Overview | Class ComparerStatic Overview


Console

Console

Provides a mechanism for handling input and output for either a screen or Stream.

Remarks

Using the Console class allows input and output to a console window. By default, a VB6 application will create a new console window for the Console class to use. Most times it is desired to run an application in an already open console window. If a VB6 application is run from within an existing console window, a new window will be created again. To have the VB6 application to use the console window from which is it run, the EXE needs to be converted to a console application. This can be accomplished by hand using the Link program that is included with Visual Basic 6. In a console window use the following command:

link /edit /subsystem:console EXE Name

Replace with the path and executable to be flagged as a console application. Be sure the Link and application are both in paths the console window can find. Once the command has been executed, the VB6 application will run inside the console window from which it was run. If no window existed, then a new one will be created.

The Console can be used to display text on the screen, and retrieve user input from a keyboard. The input and output can be redirected to a new source to allow for reading and writing from a specified Stream.

WARNING: Do not close the console through with Close Window button while working in the IDE. This will cause the IDE to crash and all data will be lost.

 Console.BackgroundColor = Blue
 Console.WriteLine "hello"
 Console.ResetColor

See Also

Project VBCorLib Overview | ConsoleKeyInfo

Public:

Types:

Name | Description
ConsoleBreakType | A list of break types returned by the console.
ConsoleColor | The set of colors used to foreground and background color settings of the console.

Properties:

Name | Description
BackgroundColor (get) | Returns the current background color.
BackgroundColor (let) | Sets the background color.
Break (get) | Returns if a break has been caused.
Break (let) | Sets the break flag.
BreakType (get) | Returns the cause of the break event in the console
BufferHeight (get) | Returns the current height of the underlying screen buffer in characters.
BufferHeight (let) | Sets the height of the underlying screen buffer in characters.
BufferWidth (get) | Returns the current width of the underlying screen buffer in characters.
BufferWidth (let) | Sets the width of the underlying screen buffer in characters.
CapsLock (get) | Returns the state of the Caps-Lock key.
CursorLeft (get) | Returns the left coordinate of the cursor position.
CursorLeft (let) | Sets the left coordinate of the cursor position.
CursorSize (get) | Returns the size (height) of the cursor.
CursorSize (let) | Sets the size (height) of the cursor.
CursorTop (get) | Returns the top coordinate of the cursor position.
CursorTop (let) | Sets the top coordinate for the cursor position
CursorVisible (get) | Returns whether or not the cursor is currently invisible.
CursorVisible (let) | Sets if the cursor is visible or not.
Error (get) | Returns the Error output currently being used by the Console.
ForegroundColor (get) | Returns the current foreground color.
ForegroundColor (let) | Sets the foreground color.
In_ (get) | Returns the input source currently used by the Console.
InputEncoding (get) | Returns the encoding used for the input from the console.
InputEncoding (set) | Sets the encoding used during input from the console.
KeyAvailable (get) | Returns if a key has been pressed and is available to be read in using one of the read methods.
largestWindowHeight (get) | Returns the largest height the viewable window could be set to.
LargestWindowWidth (get) | Returns the largest width the viewable window could be set to.
NumLock (get) | Returns the state of the Num-Lock key.
Out (get) | Returns the output writer currently being used by the Console.
OutputEncoding (get) | Returns the encoding for the current console output.
OutputEncoding (set) | Sets the encoding for the console output.
Title (get) | Returns the console title of the current process.
Title (let) | Sets the title for the console of the current process.
TreatControlCAsInput (get) | Returns if the Control+C combination is managed by the system or returned as keyboard input.
TreatControlCAsInput (let) | Sets if the Control+C combination is managed by the system or returned as keyboard input.
WindowHeight (get) | Returns the height of the viewable window in the screen buffer.
WindowHeight (let) | Sets the height of the viewable window in the screen buffer.
WindowLeft (get) | Returns the left coordinate of the console window within the screen buffer in character columns.
WindowLeft (let) | Sets the left coordinate of the console window within the screen buffer in character columns.
WindowTop (get) | Returns the top of the viewable window within the screen buffer.
WindowTop (let) | Sets the top of the viewable windwo within the screen buffer.
WindowWidth (get) | Returns the width of the window in characters.
WindowWidth (let) | Sets the width of the viewable window within the screen buffer.

Methods:

Name | Description
Beep | Produces a beep through the console.
Clear | Clears the console screen and window.
ClearBufferArea | Clears a specificed region in the screen buffer.
FillBufferArea | Fills a specified region in the screen buffer with a character and color attributes.
MoveBufferArea | Moves one section of the screen buffer to another location within the screen buffer.
OpenStandardError | Returns the standard error stream.
OpenStandardInput | Returns the standard input stream.
OpenStandardOutput | Returns the standard output stream.
Read | Reads a character from the current input source.
ReadKey | Reads a single key from the console input.
ReadLine | Reads all of the characters from the current input source until a NewLine break is reached.
ResetColor | Restores the foreground and background colors to their original values.
SetBufferSize | Sets the size of the underlying screen buffer.
SetCursorPosition | Sets the position of the cursor within the screen buffer.
SetError | Sets the Console error output stream to the supplied TextWriter object.
SetIn | Sets the Console input source to a new TextReader object.
SetOut | Sets the Console output to a new output TextWriter object.
SetWindowPosition | Sets the position of the viewing window within the console screen buffer.
SetWindowSize | Sets the size of the viewable window area for the console buffer.
WriteLine | Writes a value to the current output stream.
WriteValue | Writes a string to the Console output stream without a NewLine break.


Console: BackgroundColor (get)

BackgroundColor

Returns the current background color.

 Public Property Get BackgroundColor ( ) As ConsoleColor

Return Values

ConsoleColor - The current background color for text.

Remarks

The background color is painted individually for each text characters displayed. This is not the same as the entire window background color.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BackgroundColor (let)

BackgroundColor

Sets the background color.

 Public Property Let BackgroundColor(
      ByVal RHS As ConsoleColor )

Parameters

RHS
[ByVal] ConsoleColor. The new background color.

Remarks

The new background color will only affect text displayed after the changing of the background color.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Beep

Beep

Produces a beep through the console.

 Public Sub Beep(
      Optional ByVal Frequency As Long = 800,
      Optional ByVal Duration As Long = 200 )

Parameters

Frequency
[ByVal] Optional. Long. The frequency the beep will play at (default 800hz).

Default: 800

Duration
[ByVal] Optional. Long. The milliseconds the beep should play for (default 200ms).

Default: 200

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: Break (get)

Break

Returns if a break has been caused.

 Public Property Get Break ( ) As Boolean

Return Values

Boolean - If a break has been caused in the console.

Remarks

This property will be set to true when one of several actions occurs. The actions are defined by the enumeration ConsoleBreakType. No DoEvents need to be called for this property to be set. Simply check this property when necessary to respond to any of the events.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Break (let)

Break

Sets the break flag.

 Public Property Let Break(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. The break flag value.

Remarks

Set Break to false once it has been handled so the next console break can set it to true and be detected.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BreakType (get)

BreakType

Returns the cause of the break event in the console

 Public Property Get BreakType ( ) As ConsoleBreakType

Return Values

ConsoleBreakType - The type of break that caused the interuption.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BufferHeight (get)

BufferHeight

Returns the current height of the underlying screen buffer in characters.

 Public Property Get BufferHeight ( ) As Long

Return Values

Long - The height of the screen buffer.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BufferHeight (let)

BufferHeight

Sets the height of the underlying screen buffer in characters.

 Public Property Let BufferHeight(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new height of the screen buffer.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BufferWidth (get)

BufferWidth

Returns the current width of the underlying screen buffer in characters.

 Public Property Get BufferWidth ( ) As Long

Return Values

Long - The width of the screen buffer.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: BufferWidth (let)

BufferWidth

Sets the width of the underlying screen buffer in characters.

 Public Property Let BufferWidth(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new width of the screen buffer.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CapsLock (get)

CapsLock

Returns the state of the Caps-Lock key.

 Public Property Get CapsLock ( ) As Boolean

Return Values

Boolean - CapsLock On = True, otherwise False.

Remarks

The CapsLock key is a toggle key, so this property returns the current state, not if it is currently being pressed or not, only if it is on or off.

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Clear

Clear

Clears the console screen and window.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: ClearBufferArea

ClearBufferArea

Clears a specificed region in the screen buffer.

 Public Sub ClearBufferArea(
      ByVal Left As Long,
      ByVal Top As Long,
      ByVal Width As Long,
      ByVal Height As Long,
      Optional ByVal Forecolor As ConsoleColor = ConsoleColor. CurrentColor,
      Optional ByVal BackColor As ConsoleColor = ConsoleColor. CurrentColor )

Parameters

Left
[ByVal] Long. The left position in the screen buffer to start clearing from.
Top
[ByVal] Long. The top position in the screen buffer to start clearing from.
Width
[ByVal] Long. The width of the area to be cleared.
Height
[ByVal] Long. The height of the area to be cleared.
Forecolor
[ByVal] Optional. ConsoleColor. The color to set the text foreground color to in the cleared area.

Default: ConsoleColor . CurrentColor

BackColor
[ByVal] Optional. ConsoleColor. The color to set the text background color to in the cleared area.

Default: ConsoleColor . CurrentColor

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: ConsoleBreakType

ConsoleBreakType

A list of break types returned by the console.

 Public Enum ConsoleBreakType

Values

ControlC = 0
The CTRL+C key combination was pressed.
ControlBreak = 1
The CTRL+Break key combination was pressed.
CloseWindow = 2
The window is being closed.
LogOffUser = 5
The user is logging off the system.
ShutDownSystem = 6
The system is being shut down.

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: ConsoleColor

ConsoleColor

The set of colors used to foreground and background color settings of the console.

 Public Enum ConsoleColor

Values

CurrentColor = - 1
Used to indicate to use the current color settings.
Black = 0
DarkBlue = 1
DarkGreen = 2
DarkCyan = 3
DarkRed = 4
DarkMagenta = 5
DarkYellow = 6
Gray = 7
DarkGray = 8
Blue = 9
Green = 10
Cyan = 11
Red = 12
Magenta = 13
Yellow = 14
White = 15

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorLeft (get)

CursorLeft

Returns the left coordinate of the cursor position.

 Public Property Get CursorLeft ( ) As Long

Return Values

Long - The left coordinate.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorLeft (let)

CursorLeft

Sets the left coordinate of the cursor position.

 Public Property Let CursorLeft(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new left coordinate.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorSize (get)

CursorSize

Returns the size (height) of the cursor.

 Public Property Get CursorSize ( ) As Long

Return Values

Long - The size of the cursor.

Remarks

the size of the cursor is a value 1 to 100, 1 being 1% the full block, and 100 beign 100% a full block.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorSize (let)

CursorSize

Sets the size (height) of the cursor.

 Public Property Let CursorSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new cursor size.

Remarks

the size of the cursor is a value 1 to 100, 1 being 1% the full block, and 100 being 100% a full block.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorTop (get)

CursorTop

Returns the top coordinate of the cursor position.

 Public Property Get CursorTop ( ) As Long

Return Values

Long - The top coordinate.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorTop (let)

CursorTop

Sets the top coordinate for the cursor position

 Public Property Let CursorTop(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The top coordinate.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorVisible (get)

CursorVisible

Returns whether or not the cursor is currently invisible.

 Public Property Get CursorVisible ( ) As Boolean

Return Values

Boolean - The visibility of the cursor.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: CursorVisible (let)

CursorVisible

Sets if the cursor is visible or not.

 Public Property Let CursorVisible(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. The visibility of the cursor.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Error (get)

Error

Returns the Error output currently being used by the Console.

 Public Property Get Error ( ) As TextWriter

Return Values

TextWriter - An object that implements the TextWriter interface.

Remarks

The default Error writer writes to the Console error output.

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: FillBufferArea

FillBufferArea

Fills a specified region in the screen buffer with a character and color attributes.

 Public Sub FillBufferArea(
      ByVal Left As Long,
      ByVal Top As Long,
      ByVal Width As Long,
      ByVal Height As Long,
      Optional ByVal FillChar As Variant = " ",
      Optional ByVal Forecolor As ConsoleColor = ConsoleColor. CurrentColor,
      Optional ByVal BackColor As ConsoleColor = ConsoleColor. CurrentColor )

Parameters

Left
[ByVal] Long. The left position in the screen buffer to start filling from.
Top
[ByVal] Long. The top position in the screen buffer to start filling from.
Width
[ByVal] Long. The width of the area to be filled.
Height
[ByVal] Long. The height of the area to be filled.
FillChar
[ByVal] Optional. Variant. The character to fill the area with.

Default: " "

Forecolor
[ByVal] Optional. ConsoleColor. The color of the fill character.

Default: ConsoleColor . CurrentColor

BackColor
[ByVal] Optional. ConsoleColor. The color of the background behind the fill character.

Default: ConsoleColor . CurrentColor

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: ForegroundColor (get)

ForegroundColor

Returns the current foreground color.

 Public Property Get ForegroundColor ( ) As ConsoleColor

Return Values

ConsoleColor - The current foreground color for text.

Remarks

The foreground color is painted individually for each text characters displayed.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: ForegroundColor (let)

ForegroundColor

Sets the foreground color.

 Public Property Let ForegroundColor(
      ByVal RHS As ConsoleColor )

Parameters

RHS
[ByVal] ConsoleColor. The new foreground color.

Remarks

The new foreground color will only affect text that is displayed after the color has been changed.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: In_ (get)

In_

Returns the input source currently used by the Console.

 Public Property Get In_ ( ) As TextReader

Return Values

TextReader - Returns an object that implements the TextReader interface

Remarks

The default source of the input is the Keyboard. This can be changed by using the SetIn function.

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: InputEncoding (get)

InputEncoding

Returns the encoding used for the input from the console.

 Public Property Get InputEncoding ( ) As Encoding

Return Values

Encoding - An encoding for the input from the console.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: InputEncoding (set)

InputEncoding

Sets the encoding used during input from the console.

 Public Property Set InputEncoding(
      ByVal RHS As Encoding )

Parameters

RHS
[ByVal] Encoding. The new encoding used for input from the console.

Remarks

This is only supported on Windows NT machines.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: KeyAvailable (get)

KeyAvailable

Returns if a key has been pressed and is available to be read in using one of the read methods.

 Public Property Get KeyAvailable ( ) As Boolean

Return Values

Boolean - Returns if a key is ready to be read in.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: largestWindowHeight (get)

largestWindowHeight

Returns the largest height the viewable window could be set to.

 Public Property Get largestWindowHeight ( ) As Long

Return Values

Long - The largest possible window height.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: LargestWindowWidth (get)

LargestWindowWidth

Returns the largest width the viewable window could be set to.

 Public Property Get LargestWindowWidth ( ) As Long

Return Values

Long - The largest possible window width.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: MoveBufferArea

MoveBufferArea

Moves one section of the screen buffer to another location within the screen buffer.

 Public Sub MoveBufferArea(
      ByVal SourceLeft As Long,
      ByVal SourceTop As Long,
      ByVal SourceWidth As Long,
      ByVal SourceHeight As Long,
      ByVal TargetLeft As Long,
      ByVal TargetTop As Long,
      Optional ByVal SourceChar As Variant = " ",
      Optional ByVal SourceForeColor As ConsoleColor = ConsoleColor. Black,
      Optional ByVal SourceBackColor As ConsoleColor = CurrentColor )

Parameters

SourceLeft
[ByVal] Long. The left side of the area to be moved.
SourceTop
[ByVal] Long. The top side of the area to be moved.
SourceWidth
[ByVal] Long. The width of the area to be moved.
SourceHeight
[ByVal] Long. The height of the area to be moved.
TargetLeft
[ByVal] Long. The starting left position to move the area to.
TargetTop
[ByVal] Long. The starting top position to move the area to.
SourceChar
[ByVal] Optional. Variant. The character to fill the moved area in with. This can be a String or Ascii value.

Default: " "

SourceForeColor
[ByVal] Optional. ConsoleColor. The forecolor used when filling in the original moved area.

Default: ConsoleColor . Black

SourceBackColor
[ByVal] Optional. ConsoleColor. The backcolor used when filling in the original moved area.

Default: CurrentColor

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: NumLock (get)

NumLock

Returns the state of the Num-Lock key.

 Public Property Get NumLock ( ) As Boolean

Return Values

Boolean - NumLock On = True, otherwise False.

Remarks

The NumLock key is a toggle key, so this property returns the current state, not if it is currently being pressed or not, only if it is on or off.

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: OpenStandardError

OpenStandardError

Returns the standard error stream.

 Public Function OpenStandardError ( ) As Stream

Return Values

Stream - The standard error output stream that error data is written to.

Remarks

The standard error output is to the screen console.

See Also

Project VBCorLib Overview | Class Console Overview


Console: OpenStandardInput

OpenStandardInput

Returns the standard input stream.

 Public Function OpenStandardInput ( ) As Stream

Return Values

Stream - The standard input stream object to retrieve user input from.

Remarks

The standard input is from the keyboard console.

See Also

Project VBCorLib Overview | Class Console Overview


Console: OpenStandardOutput

OpenStandardOutput

Returns the standard output stream.

 Public Function OpenStandardOutput ( ) As Stream

Return Values

Stream - The standard output stream to write user data to.

Remarks

The standard output is the screen console.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Out (get)

Out

Returns the output writer currently being used by the Console.

 Public Property Get Out ( ) As TextWriter

Return Values

TextWriter - Returns an object that implements the TextWriter interface.

Remarks

The default output for the Console is to a Console window displayed on the screen. The output can be redirected to a new Stream using SetOut.

Read Only.

See Also

Project VBCorLib Overview | Class Console Overview


Console: OutputEncoding (get)

OutputEncoding

Returns the encoding for the current console output.

 Public Property Get OutputEncoding ( ) As Encoding

Return Values

Encoding - An Encoding object for the current console output encoding.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: OutputEncoding (set)

OutputEncoding

Sets the encoding for the console output.

 Public Property Set OutputEncoding(
      ByVal RHS As Encoding )

Parameters

RHS
[ByVal] Encoding. The new encoding used for output to the console.

Remarks

This is only supported on Windows NT machines.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Read

Read

Reads a character from the current input source.

 Public Function Read ( ) As Long

Return Values

Long - The next character read from the input source, or -1 if no more characters exists.

Remarks

The Read method does not return until the Return key is pressed. Once the function returns, it can be called repeatedly until all key presses upto the return key are retrieved. The return key is also returned as a carriage-return (13) followed by a line-feed (10).

Example

This example shows how to read input from the console keyboard. The Read function will block and wait for the return key to be pressed before returning. If there are characters already in the input stream, the function does not block and returns the next character.
Private Sub Main()
    Dim ch As Long

    ' reads from the console keyboard. The function
    ' will block until the return key is pressed.
    ch = Console.Read

    ' we will loop through the characters typed into
    ' the console and exit the loop when CTRL+Z followed
    ' by Return is pressed.
    Do While ch <> 26
        Debug.Print Chr$(ch);
        DoEvents

        ' As long as there are characters remaining to be
        ' from the console keyboard, this function won't block.
        ch = Console.Read
    Loop
End Sub
As shown here, the loop just retrieves characters from the console keyboard one character at a time. If there are no more characters in the buffer, then the Read function will block and wait for the Return key to be pressed again. The key combination of CTRL+Z (26) is used as an exit from the loop. CRTL+Z is what is used to signal the end of a file on unix platforms.

See Also

Project VBCorLib Overview | Class Console Overview


Console: ReadKey

ReadKey

Reads a single key from the console input.

 Public Function ReadKey(
      Optional ByVal Intercept As Boolean = False ) As ConsoleKeyInfo

Parameters

Intercept
[ByVal] Optional. Boolean. Flags whether the pressed key should be displayed through the console output or not.

Default: False

Return Values

ConsoleKeyInfo - A ConsoleKeyInfo object containing information about the the key that was pressed and modifier key states.

Remarks

This method blocks the calling thread until a key is pressed.

Not all keys are read and returned. Modifier keys (Alt, Shift, Control) are not returned, but instead, included in the ConsoleKeyInfo object when a normal key is pressed. This allows the status of the modifier keys to be known during a keypress, such as a Shift-A key combination.

Keys that do not trigger this method to return are ALT, SHIFT, CONTROL, CAPS-LOCK, SCROLL-LOCK, and NUM-LOCK.

See Also

Project VBCorLib Overview | Class Console Overview


Console: ReadLine

ReadLine

Reads all of the characters from the current input source until a NewLine break is reached.

 Public Function ReadLine ( ) As String

Return Values

String - Returns all of the available characters upto a NewLine break, not including the NewLine characters.

Remarks

The ReadLine function will block and not return until a NewLine characters is pressed. This is usually the Return key.

Example

This examples shows how to continually read a line of characters from the Console keyboard. The function will block and wait for a NewLine (Return Key) is reached. All characters are returned not including the the NewLine characters.
    Dim s As String

    ' Reads all of the characters upto a NewLine break.
    ' If there are no characters (including NewLine) in the
    ' buffer, then the function will block and wait.
    s = Console.ReadLine

    ' Exit the loop if an empty line is returned.
    Do While Len(s) > 0
        Debug.Print s
        DoEvents

        ' Continue reading an entire line at once. If no
        ' characters are available, then the function will
        ' block until the return key is pressed.
        s = Console.ReadLine
    Loop
As shown here, the loop continually reads in an entire line of characters until an empty line is returned. The function blocks when no characters remain to be read in from the console input. The NewLine characters are not returned with the line.

See Also

Project VBCorLib Overview | Class Console Overview


Console: ResetColor

ResetColor

Restores the foreground and background colors to their original values.

 Public Sub ResetColor ( )

Remarks

The backcolor will be set to ConsoleColor.Black, the forecolor will be set to ConsoleColor.Gray.

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetBufferSize

SetBufferSize

Sets the size of the underlying screen buffer.

 Public Sub SetBufferSize(
      ByVal Width As Long,
      ByVal Height As Long )

Parameters

Width
[ByVal] Long. The width in characters of the buffer.
Height
[ByVal] Long. The height in characters of the buffer.

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetCursorPosition

SetCursorPosition

Sets the position of the cursor within the screen buffer.

 Public Sub SetCursorPosition(
      ByVal Left As Long,
      ByVal Top As Long )

Parameters

Left
[ByVal] Long. The number of characters from the left of the screen buffer.
Top
[ByVal] Long. The number of characters from the top of the screen buffer.

Remarks

The positions start at 0,0 and go to BufferWidth - 1, BufferHeight - 1.

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetError

SetError

Sets the Console error output stream to the supplied TextWriter object.

 Public Sub SetError(
      ByVal NewError As TextWriter )

Parameters

NewError
[ByVal] TextWriter. The TextWriter object the console error data is written to.

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetIn

SetIn

Sets the Console input source to a new TextReader object.

 Public Sub SetIn(
      ByVal NewIn As TextReader )

Parameters

NewIn
[ByVal] TextReader. The TextReader object the console retrieves input from.

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetOut

SetOut

Sets the Console output to a new output TextWriter object.

 Public Sub SetOut(
      ByVal NewOut As TextWriter )

Parameters

NewOut
[ByVal] TextWriter. The TextWriter object that console output will be written to.

Remarks

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetWindowPosition

SetWindowPosition

Sets the position of the viewing window within the console screen buffer.

 Public Sub SetWindowPosition(
      ByVal Left As Long,
      ByVal Top As Long )

Parameters

Left
[ByVal] Long. The left position in characters.
Top
[ByVal] Long. The top position in characters.

Remarks

The underlying screen buffer is not expanded to accomodate moving the window outside of the screen buffer.

See Also

Project VBCorLib Overview | Class Console Overview


Console: SetWindowSize

SetWindowSize

Sets the size of the viewable window area for the console buffer.

 Public Sub SetWindowSize(
      ByVal Width As Long,
      ByVal Height As Long )

Parameters

Width
[ByVal] Long. The width in characters.
Height
[ByVal] Long. The height in characters.

Remarks

The screen buffer is the virtual screen that is written to. The size of the buffer can be larger than the window inwhich it is being viewed through. The windows size can be changed to show a different size of the underlying screen buffer without altering the size of that buffer.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Title (get)

Title

Returns the console title of the current process.

 Public Property Get Title ( ) As String

Return Values

String - The console title.

Remarks

This method support Unicode characters on NT platforms.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: Title (let)

Title

Sets the title for the console of the current process.

 Public Property Let Title(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The title to set the console to.

Remarks

This method supports Unicode characters on NT platforms.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: TreatControlCAsInput (get)

TreatControlCAsInput

Returns if the Control+C combination is managed by the system or returned as keyboard input.

 Public Property Get TreatControlCAsInput ( ) As Boolean

Return Values

Boolean - The state of management for Control+C.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: TreatControlCAsInput (let)

TreatControlCAsInput

Sets if the Control+C combination is managed by the system or returned as keyboard input.

 Public Property Let TreatControlCAsInput(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Flag indicating if the system should manage Control+C or not.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowHeight (get)

WindowHeight

Returns the height of the viewable window in the screen buffer.

 Public Property Get WindowHeight ( ) As Long

Return Values

Long - The height of the window in characters.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowHeight (let)

WindowHeight

Sets the height of the viewable window in the screen buffer.

 Public Property Let WindowHeight(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new window height in characters.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowLeft (get)

WindowLeft

Returns the left coordinate of the console window within the screen buffer in character columns.

 Public Property Get WindowLeft ( ) As Long

Return Values

Long - The console window left coordinate in character columns.

Remarks

The underlying screen buffer can be larger than the console window itself. In order to see other portions of the screen buffer, the window must scroll around the buffer. If the screen buffer is wider than the window itself, then the window must be scrolled horizontally to view the screen buffer.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowLeft (let)

WindowLeft

Sets the left coordinate of the console window within the screen buffer in character columns.

 Public Property Let WindowLeft(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new left position.

Remarks

The view window maitains the original size.

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowTop (get)

WindowTop

Returns the top of the viewable window within the screen buffer.

 Public Property Get WindowTop ( ) As Long

Return Values

Long - The top coordinate of the window.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowTop (let)

WindowTop

Sets the top of the viewable windwo within the screen buffer.

 Public Property Let WindowTop(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new top position in characters, starting with 0.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowWidth (get)

WindowWidth

Returns the width of the window in characters.

 Public Property Get WindowWidth ( ) As Long

Return Values

Long - The width of the viewable window.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WindowWidth (let)

WindowWidth

Sets the width of the viewable window within the screen buffer.

 Public Property Let WindowWidth(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new width of the window in characters.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WriteLine

WriteLine

Writes a value to the current output stream.

 Public Sub WriteLine(
      ParamArray Values ( ) As Variant )

Parameters

Values
[ByRef] Variant. A set of zero or more parameters used to create a formatted string output.

Remarks

The first parameter is the string that will be written to the current output stream. All additional parameters will be used as formatting information in the first parameter. If no parameters are provided, then an empty string is written with a NewLine. The following example demonstrates how to write output to the console using the WriteLine method. There are 3 ways to use the WriteLine method effectively, and they are shown below.

Private Sub Main()
    ' writes a NewLine to the console
    Console.WriteLine

    ' writes a string followed by a NewLine
    Console.WriteLine "Hello"

    ' writes a formatted string using the
    ' supplied parameters, followed by a NewLine
    Console.WriteLine "Hello, {0}", "Kelly"

    Console.WriteLine "Press Return"
    Console.ReadLine    ' waits for return key to continue

    ' The above code outputs
    '
    ' (Blank Line)
    ' Hello
    ' Hello, Kelly
    ' Press Return
End Sub
As you can see, the WriteLine method accepts a variaty of parameters to create differently formatted outputs to the Console. The first parameter is the string to be written to the console, while any additional parameters are used by formatting information within the first parameter.

See Also

Project VBCorLib Overview | Class Console Overview


Console: WriteValue

WriteValue

Writes a string to the Console output stream without a NewLine break.

 Public Sub WriteValue(
      ByRef Value As Variant,
      ParamArray args ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to write the string version of to the output stream.
args
[ByRef] Variant. Values to be used in a formatted output.

Remarks

Values are converted to their string representation for text output. A formatted output can be created similar to cString.Format.

Example

In this example, the WriteValue function is used to display a sequence of values. The values are all written to the same line because WriteValue does not include a NewLine character after writing a value. A NewLine character has to be manually added to advance to the next line.
Private Sub Main()
    Dim i As Long

    ' Writes out a sequence of digits. The digits
    ' are written on the same line.
    Console.WriteValue "Loop 1: "
    For i = 1 To 5
        Console.WriteValue i
    Next i

    ' Writes out a new line manually.
    Console.WriteValue vbCrLf

    ' Writes formatted values on the same line.
    Console.WriteValue "Loop 2: "
    For i = 1 To 5
        Console.WriteValue "i = {0}" & IIf(i < 5, ", ", ""), i
    Next i

' The outputs from the loops are
' Loop 1: 12345
' Loop 2: i = 1, i = 2, i = 3, i = 4, i = 5
End Sub
As shown, the first loop writes 5 digits to the console, each digit following the previous digit on the same line. WriteValue does not include line-breaks. A manual line-break is written to achieve the effect of advancing to the next line. The second loop uses a formatted value output. The argument is substituted in the formatted value and then written to the output onto the same single line. A comma is added to distinguish each iteration though the loop.

See Also

Project VBCorLib Overview | Class Console Overview


ConsoleKeyInfo

ConsoleKeyInfo

Represents the information contained in a console key press.

Remarks

When a key pressed on a console, a ConsoleKeyInfo object is generated by reading the pressed key using the ReadKey method. The generated object contains the key press information describing the event.

See Also

Project VBCorLib Overview | Console

Implements:

IObject

Public:

Types:

Name | Description
ConsoleKey | A list of all the scankey codes.
ConsoleModifiers | Values that represent the specific modifier keys used to indicate different values for specific keys.

Properties:

Name | Description
Key (get) | Returns the scankey code of the pressed key.
KeyChar (get) | Returns the ascii code of the pressed key.
Modifiers (get) | Returns the state of the key modifiers (Shift, Alt, Control) at the time of the key press.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


ConsoleKeyInfo: ConsoleKey

ConsoleKey

A list of all the scankey codes.

 Public Enum ConsoleKey

Values

AKey = 65
The A key.
AddKey = 107
The keypad plus key.
ApplicationsKey = 91
The application key (Microsoft Natual Keyboard)
AttentionKey = 246
The ATTN key.
BKey = 66
The B key.
BackSpaceKey = 8
The BackSpace key.
BrowserBackKey = 166
The Browser Back key (Windows 2000 or later)
BrowserFavoritesKey = 171
The Browser Favorites key (Windows 2000 or later)
BrowserForwardKey = 167
The Browser Forward key (Windows 2000 or later)
BrowserHomeKey = 172
The Browser Home key (Windows 2000 or later)
BrowserRefreshKey = 168
The Browser Refresh key (Windows 2000 or later)
BrowserSearchKey = 170
The Browser Search key (Windows 2000 or later)
BrowserStopKey = 169
The Browser Stop key (Windows 2000 or later)
CKey = 67
The C Key.
ClearKey = 12
The CLEAR key.
CrSelKey = 247
The CRSEL (CURSOR SELECT) key.
DKey = 68
The D key.
D0Key = 48
The 0 key.
D1Key = 49
The 1 key.
D2Key = 50
The 2 key.
D3Key = 51
The 3 key.
D4Key = 52
The 4 key.
D5Key = 53
The 5 key.
D6Key = 54
The 6 key.
D7Key = 55
The 7 key.
D8Key = 56
The 8 Key.
D9Key = 57
The 9 key.
DecimalKey = 110
The Decimal key.
DeleteKey = 46
The Delete key.
DivideKey = 111
The divide key.
DownArrowKey = 40
The DOWN ARROW key.
EKey = 69
The E key.
EndKey = 35
The END key.
EnterKey = 13
The Enter key.
EraseEndOfFileKey = 249
The ERASE EOF key.
EscapeKey = 27
The ESC (ESCAPE) key.
ExecuteKey = 43
The EXECUTE key.
ExSelKey = 248
The EXSEL (EXTEND SELECTION) key.
FKey = 70
The F key.
F1Key = 112
The F1 key.
F2Key = 113
The F2 key.
F3Key = 114
The F3 key.
F4Key = 115
The F4 key.
F5Key = 116
The F5 key.
F6Key = 117
The F6 key.
F7Key = 118
The F7 key.
F8Key = 119
The F8 key.
F9Key = 120
The F9 key.
F10Key = 121
The F10 key.
F11Key = 122
The F11 key.
F12Key = 123
The F12 key.
F13Key = 124
The F13 key.
F14Key = 125
The F14 key.
F15Key = 126
The F15 key.
F16Key = 127
The F16 key.
F17Key = 128
The F17 key.
F18Key = 129
The F18 key.
F19Key = 130
The F19 key.
F20Key = 131
The F20 key.
F21Key = 132
The F21 key.
F22Key = 133
The F22 key.
F23Key = 134
The F23 key.
F24Key = 135
The F24 key.
GKey = 71
The G key.
hKey = 72
The H key.
HelpKey = 47
The HELP key.
HomeKey = 36
The HOME key.
IKey = 73
The I key.
InsertKey = 45
The INS (INSERT) key.
JKey = 74
The J key.
KKey = 75
The K key.
LKey = 76
The L key.
LaunchApp1Key = 182
The Start Application 1 key (MS Natural keyboard, Windows 2000 or later)
LaunchApp2Key = 183
The Start Application 2 key (MS Natural keyboard, Windows 2000 or later)
LaunchMailKey = 180
The Start Mail key (MS Natural keyboard, Windows 2000 or later)
LaunchMediaSelectKey = 181
The Select Media key (MS Natural keyboard, Windows 2000 or later)
LeftArrowKey = 37
The LEFT ARROW key.
LeftWindowsKey = 91
The left Windows logo key.
mKey = 77
The M key.
MediaNextKey = 176
The Media Next Track key (MS Natural keyboard, Windows 2000 or later)
MediaPlayKey = 179
The Media Play Track key (MS Natural keyboard, Windows 2000 or later)
MediaPreviousKey = 177
The Media Previous Track key (MS Natural keyboard, Windows 2000 or later)
MediaStopKey = 178
The Media Stop key (MS Natural keyboard, Windows 2000 or later)
MultiplyKey = 106
The Multiply key.
NKey = 78
The N key.
NoNameKey = 252
A constant reserved for future use.
NumPad0Key = 96
The 0 key on the numeric keypad.
NumPad1Key = 97
The 1 key on the numeric keypad.
NumPad2Key = 98
The 2 key on the numeric keypad.
NumPad3Key = 99
The 3 key on the numeric keypad.
NumPad4Key = 100
The 4 key on the numeric keypad.
NumPad5Key = 101
The 5 key on the numeric keypad.
NumPad6Key = 102
The 6 key on the numeric keypad.
NumPad7Key = 103
The 7 key on the numeric keypad.
NumPad8Key = 104
The 8 key on the numeric keypad.
NumPad9Key = 105
The 9 key on the numeric keypad.
OKey = 79
The O key.
Oem1Key = 186
The OEM 1 key (OEM Specific)
Oem102Key = 226
The OEM 102 key (OEM Specific)
Oem2Key = 191
The OEM 2 key (OEM Specific)
Oem3Key = 192
The OEM 3 key (OEM Specific)
Oem4Key = 219
The OEM 4 key (OEM Specific)
Oem5Key = 220
The OEM 5 key (OEM Specific)
Oem6Key = 221
The OEM 6 key (OEM Specific)
Oem7Key = 222
The OEM 7 key (OEM Specific)
Oem8Key = 223
The OEM 8 key (OEM Specific)
OemClearKey = 254
The CLEAR key (OEM Specific)
OemCommaKey = 188
The Comma Key.
OemMinusKey = 189
The Minus key.
OemPeriodKey = 190
The Period key.
OemPlusKey = 187
The Plus key.
PKey = 80
The P key.
Pa1Key = 253
The PA1 key.
PacketKey = 231
The Packet key (used to pass unicode characters with keystrokes)
PageDownKey = 34
The PAGE DOWN key.
PageUpKey = 33
The PAGE UP key.
PauseKey = 19
The PAUSE key.
PlayKey = 250
The PLAY key.
PrintKey = 42
The PRINT key.
PrintScreenKey = 44
The PRINT SCREEN key.
ProcessKey = 229
The IME PROCESS key.
QKey = 81
The Q key.
RKey = 82
The R Key.
RightArrowKey = 39
The RIGHT ARROW key.
RightWindowsKey = 92
The right Windows logo key.
SKey = 83
The S key.
SelectKey = 41
The SELECT key.
SeparatorKey = 108
The Separator key.
SleepKey = 95
The Computer Sleep key.
SpaceBarKey = 32
The Space Bar key.
SubtractKey = 109
The Subtract key.
TKey = 84
The T key.
TabKey = 9
The TAB key.
UKey = 85
The U key.
UpArrowKey = 38
The UP ARROW key.
VKey = 86
The V key.
VolumeDownKey = 174
The Volume Down key.
VolumeMuteKey = 173
The Volume Mute key.
VolumeUpKey = 175
The Volume Up key.
WKey = 87
The W key.
XKey = 88
The X key.
YKey = 89
The Y key.
ZKey = 90
The Z key.
ZoomKey = 251
The ZOOM key.

Remarks

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: ConsoleModifiers

ConsoleModifiers

Values that represent the specific modifier keys used to indicate different values for specific keys.

 Public Enum ConsoleModifiers

Values

AltKey = 1
The left or right alt key is specified.
ShiftKey = 2
The left or right shift key is specified.
ControlKey = 4
The left or right control key is specified.

Remarks

A single key can have different meanings when used in combination with these modifiers.

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: Key (get)

Key

Returns the scankey code of the pressed key.

 Public Property Get Key ( ) As ConsoleKey

Return Values

ConsoleKey - Scankey code.

Remarks

This is not the same code as an ascii code.

Read Only.

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: KeyChar (get)

KeyChar

Returns the ascii code of the pressed key.

 Public Property Get KeyChar ( ) As Integer

Return Values

Integer - The ascii code.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: Modifiers (get)

Modifiers

Returns the state of the key modifiers (Shift, Alt, Control) at the time of the key press.

 Public Property Get Modifiers ( ) As ConsoleModifiers

Return Values

ConsoleModifiers - Modifier keys state.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


ConsoleKeyInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ConsoleKeyInfo Overview


Constructors

Constructors

Functions used to create fully inititalized objects.

Remarks

This class is defined as Global-Multiuse. All of the functions can be called directly without needing to create a Constructors object.

The Cor static object can be used to easily find and select the desired object to create. By using the Cor.NewXxx method, the IntelliSense will show all of the available constructors, making object creation easier.

Example

 ' This calls the constructor function directly.
 Set fs = NewFileStream("data.txt", FileMode.OpenOrCreate)

 ' This calls the constructor through the Cor.NewXxx method.
 Set fs = Cor.NewFileStream("data.txt", FileMode.OpenOrCreate)
Both methods perform the same task, however, using the Cor.Newxxx method will provide IntelliSense showing all of the available constructors.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
BInt | Attempts to convert a value to a valid BigInteger instance.
CreateEnumerator | Creates a For..Each compatible wrapper around an IEnumerator object.
NewApplicationException | Creates a new ApplicationException object.
NewArgumentException | Creates a new ArgumentException object.
NewArgumentNullException | Creates a new ArgumentNullException object.
NewArgumentOutOfRangeException | Creates a new ArgumentOutOfRangeException object.
NewArray | Creates an array of values.
NewArrayList | Creates a new ArrayList object with the specified settings.
NewArrayTypeMismatchException | Creates a new ArrayTypeMismatchException object.
NewBigInteger | Creates a new BigInteger instance.
NewBinaryReader | Returns a new BinaryReader that can read from the specified stream usind the specified Encoding.
NewBinaryWriter | Returns a new BinaryWriter used to write to a Stream object.
NewBitArray | Creates a new BitArray object.
NewBooleans | Returns an array of Boolean values generated from the values passed in.
NewBytes | Returns an array of Bytes generated from the values passed in.
NewcDateTime | Creates a new cDateTime object set to the specified date.
NewCharEnumerator | Creates an enumerator used to iterate over the Unicode characters of a String.
NewConsoleKeyInfo | Returns a new ConsoleKeyInfo object that represents the state of a key press.
NewCryptoAPIHash | Creates a new CryptoAPIHash object.
NewCryptographicException | Creates a new CryptographicException object.
NewCryptoStream | Creates a new CryptoStream object used to read or write transformed data to or from an underlying stream.
NewCspKeyContainerInfo | Creates a new CspKeyContainerInfo object.
NewCspParameters | Creates a new CspParameters object.
NewCultureInfo | Creates a new CultureInfo object for the specified culture.
NewCurrencys | Returns an array of Currency values generated from the values passed in.
NewDate | Allows for quickly creating a cDateTime object from a VB Date value.
NewDates | Returns an array of Date values generated from the values passed in.
NewDayLightTime | Creates a new DayLightTime object with the specified start and end times for daylight savings.
NewDictionaryEntry | Creates a new DictionaryEntry object initialized with key and value.
NewDirectoryInfo | Creates a new DirectoryInfo object that describes the specified path.
NewDirectoryNotFoundException | Creates a new DirectoryNotFoundException object with the specified message and optional exception.
NewDoubles | Returns an array of Doubles generated from the values passed in.
NewDriveInfo | Creates a new DriveInfo object used to inspect a drives information.
NewDSACryptoServiceProvider | Creates a new DSACryptoServiceProvider object.
NewEndOfStreamException | Returns a new EndOfStreamException with the specified message and optional exception.
NewException | Creates a new Exception object.
NewExceptionBase | Creates a new base utility class that can be contained within an exception class.
NewExternalException | Creates a new ExternalException object.
NewFileInfo | Creates a new FileInfo object used to describe and manage a file.
NewFileNotFoundException | Creates a new FileNotFoundException with the specified Message, FileName, and InnerException.
NewFileStream | Returns a new FileStream to access an underyling file.
NewFileStreamFromHandle | Returns a new FileStream to access a file other than that on disk, such as pipes.
NewFormatException | Creates a new FormatException object.
NewFromBase64Transform | Creates a new FromBase64Transform object used to convert base64 characters to plain text.
NewGregorianCalendar | Creates a new instance of the Gregorian calendar class.
NewHashAlgorithmBase | Creates a base classed used by hash algorithms.
NewHashtable | Creates a new Hashtable object with specific settings.
NewHMACBase | Creates a base class that can be used as a base implementation of an HMAC class.
NewHMACMD5 | Creates a new HMACMD5 object.
NewHMACRIPEMD160 | Creates a new HMACRIPEMD160 object.
NewHMACSHA1 | Creates a new HMACSHA1 object.
NewHMACSHA256 | Creates a new HMACSHA256 object.
NewHMACSHA384 | Creates a new HMACSHA384 object.
NewHMACSHA512 | Creates a new HMACSHA512 object.
NewIndexOutOfRangeException | Creates a new IndexOutOfRangeException object.
NewINIFile | Returns an object used to manipulate an INI file.
NewIntegers | Returns an array of Integers generated from the values passed in.
NewInvalidCastException | Creates a new InvalidCaseException object.
NewInvalidOperationException | Creates a new InvalidOperationException object.
NewIOException | Creates a new IOException object with the specified Message, HResult, and InnerException.
NewKeySizes | Creates a new KeySizes object with the Min, Max and Skip sizes defined.
NewLongs | Returns an array of Longs generated from the values passed in.
NewMACTripleDES | Creates a new MACTripleDES object.
NewMemoryMappedFile | Creates a memory-mapped view of a file.
NewMemoryStream | Returns a new memoryStream object which uses a supplied byte array.
NewNotSupportedException | Creates a new NotSupportedException object.
NewObjectDisposedException | Returns a new ObjectDisposedException
NewOperatingSystem | Returns a new OperatingSystem object with the specified Platform and Version.
NewOverflowException | Returns a new OverflowException with the specified message and exception.
NewPathTooLongException | Returns a new PathTooLongException object.
NewPlatformNotSupportedException | Returns a new PlatformNotSupportedException with the specified Message and InnerException.
NewQueue | Creates a new Queue initialized with the elements in the collection.
NewRandom | Creates a new Random object initialized with the specified seed.
NewRankException | Creates a new RankException object.
NewResourceKey | Creates a new object used to uniquely identify a resource.
NewResourceManager | Loads all resources from a source for all cultures in the source.
NewResourceReader | Enumerates through the resources in a .RES file.
NewResourceSet | Creates a new set of resources for a specific culture.
NewResourceWriter | Provides a method to create a new .RES file.
NewResPictureGroup | Creates a picture group object used to contain information about resources that are grouped together.
NewRfc2898DeriveBytes | Creates a new Rfc2898DeriveBytes object.
NewRNGCryptoServiceProvider | Creates a new random number generator that uses a crypto service provider to generate random numbers.
NewRSACryptoServiceProvider | Creates a new RSACryptoServiceProvider object.
NewSecurityElement | Creates a new SecurityElement object.
NewSerializationException | Creates a new SerializationException object.
NewSingles | Returns an array of Singles generated from the values passed in.
NewSortedList | Creates a new SortedList object with specific initialization options.
NewStack | Creates a new Stack object initialized with data in col.
NewStreamReader | Creates a new StreamReader from either a FileName or an existing stream to read from.
NewStreamWriter | Creates a new StreamWriter with either a filename or other stream as a source to write to in the specified Encoding.
NewStringBuilder | Returns a new StringBuilder with user specified settings and starting string.
NewStringReader | Returns a new StringReader object.
NewStrings | Returns an array of Strings generated from the values passed in.
NewStringWriter | Returns a new StringWriter object.
NewSystemException | Creates a new SystemException object.
NewTicker | Creates a new Ticker.
NewTime | Returns a new TimeSpan representing the time portion of the date.
NewTimeSpan | Creates a new TimeSpan object set to the specified amount of time.
NewUnauthorizedAccessException | Creates a new UnauthorizedAccessException object.
NewUnicodeEncoding | Returns a new UnicodeEncoding object with the specified settings.
NewUTF7Encoding | Returns a new UTF7Encoding object.
NewUTF8Encoding | Returns a new UTF8Encoding object.
NewVariants | Returns a Variant array containing the values passed in.
NewVersion | Creates a new Version object with specified version information.
NewWeakReference | Creates a new WeakReference object.
NewWinResourceReader | Creates a new WinResourceReader reader object.
NewXmlSyntaxException | Creates a new XmlSyntaxException object.


Constructors: BInt

BInt

Attempts to convert a value to a valid BigInteger instance.

 Public Function BInt(
      ByRef value As Variant ) As BigInteger

Parameters

value
[ByRef] Variant. The value to be converted to BigInteger.

Return Values

BigInteger - A new BigInteger instance representing the converted value.

Remarks

The follow datatypes are supported:
vbString
vbLong
vbInteger
vbByte
vbDoube
vbSingle
vbCurrency
vbDecimal
vbByte Or vbArray
BigInteger (returns same instance)
Nothing (returns BigInteger.Zero)

 Dim b As BigInteger
 Set b = BInt(somevalue)

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: CreateEnumerator

CreateEnumerator

Creates a For..Each compatible wrapper around an IEnumerator object.

 Public Function CreateEnumerator(
      ByVal Obj As IEnumerator ) As IUnknown

Parameters

Obj
[ByVal] IEnumerator. The IEnumerator object that is to be called during For..Each.

Return Values

IUnknown - A For..Each compatible enumerator.

Remarks

VBCorLib allows for the building of custom enumerators to be used in a For..Each loop context.

To create a custom enumerator please refer to the IEnumerator interface.

In order for VB to utilize your custom IEnumerator object, it must be wrapped in an object that implements the IEnumVariant interface. This is the only interface that VB can use in a For..Each context. By passing in the custom enumerator into the CreateEnumerator function, a wrapper is applied and returned that is then returned in the typical NewEnum function of a class.

Example

 Public Function NewEnum() As IUnknown
     Dim en As New MyEnumerator
     en.Init Me
     Set NewEnum = CreateEnumerator(en)
 End Sub
This example creates a custom enumerator object and initializes it with the object that is to be enumerated using the custom enumerator. The custom enumerator is then passed into the CreateEnumerator function and the returned value is then passed back to the calling function.

See Also

Project VBCorLib Overview | Class Constructors Overview | IEnumerator


Constructors: NewApplicationException

NewApplicationException

Creates a new ApplicationException object.

 Public Function NewApplicationException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As ApplicationException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

ApplicationException - A fully created ApplicationException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | ApplicationException


Constructors: NewArgumentException

NewArgumentException

Creates a new ArgumentException object.

 Public Function NewArgumentException(
      ByVal Message As String,
      Optional ByVal ParamName As String,
      Optional ByVal InnerException As Exception ) As ArgumentException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
ParamName
[ByVal] Optional. String. The parameter that caused the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

ArgumentException - A fully created ArgumentException object.

Remarks

When throwing an ArgumentException a meaningful error message describing the invalid argument, the name of the argument, as well as the expected range of values for the argument should be defined.

Example

 ' Throws a default ArgumentException object
 Throw New ArgumentException

 ' Throws an ArgumentException with a custom message and parameter name
 Throw Cor.NewArgumentException("Your argument is wrong.", "MyParam")

 ' Throws an ArgumentException with a custom message and error code and parameter name
 Dim ex As ArgumentException
 Set ex = Cor.NewArgumentException("Your argument is wrong.", "MyParam")
 ex.HResult = 123
 Throw ex

This example shows how to throw three different variations of the same ArgumentException object.

See Also

Project VBCorLib Overview | Class Constructors Overview | ArgumentException


Constructors: NewArgumentNullException

NewArgumentNullException

Creates a new ArgumentNullException object.

 Public Function NewArgumentNullException(
      ByVal Message As String,
      Optional ByVal ParamName As String,
      Optional ByVal InnerException As Exception ) As ArgumentNullException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
ParamName
[ByVal] Optional. String. The parameter that caused the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

ArgumentNullException - A fully created ArgumentNullException object.

Remarks

When throwing an ArgumentNullException a meaningful error message describing the invalid argument and the name of the argument should be defined.

Example

 ' Throws a default ArgumentNullException object
 Throw New ArgumentNullException

 ' Throws an ArgumentNullException with a custom message and parameter name
 Throw Cor.NewArgumentNullException("A valid object is required.", "MyParam")

 ' Throws an ArgumentNullException with a custom message and error code and parameter name
 Dim ex As ArgumentNullException
 Set ex = Cor.NewArgumentNullException("A valid object is required.", "MyParam")
 ex.HResult = 123
 Throw ex

This example shows how to throw three different variations of the same ArgumentNullException object.

See Also

Project VBCorLib Overview | Class Constructors Overview | ArgumentNullException


Constructors: NewArgumentOutOfRangeException

NewArgumentOutOfRangeException

Creates a new ArgumentOutOfRangeException object.

 Public Function NewArgumentOutOfRangeException(
      Optional ByVal Message As String,
      Optional ByVal ParamName As String,
      Optional ByVal ActualValue As Variant,
      Optional ByVal InnerException As Exception ) As ArgumentOutOfRangeException

Parameters

Message
[ByVal] Optional. String. A human-readable message explaining the exception.
ParamName
[ByVal] Optional. String. The parameter that caused the exception.
ActualValue
[ByVal] Optional. Variant. The value of the parameter that caused the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

ArgumentOutOfRangeException - A fully created AgrumentOutOfRangeException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | ArgumentOutOfRangeException


Constructors: NewArray

NewArray

Creates an array of values.

 Public Function NewArray(
      ByVal ArrayType As ciArrayTypes,
      ParamArray ArrayElements ( ) As Variant ) As Variant

Parameters

ArrayType
[ByVal] ciArrayTypes. The target datatype of the resultant array and the values to be converted to.
ArrayElements
[ByRef] Variant. The values to be put into the new array.

Return Values

Variant - An array of the specified datatype and containing the array elements with conversion, or an empty array if no elements are defined.

Elements of a size that are a multiple of 4 will not create a new array when being returned. All other datatype sizes will cause a new array to be created.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewArrayList

NewArrayList

Creates a new ArrayList object with the specified settings.

 Public Function NewArrayList(
      Optional ByVal Comparer As IComparer,
      Optional ByRef c As Variant ) As ArrayList

Parameters

Comparer
[ByVal] Optional. IComparer. A comparer to be used for searching and sorting items in the list.
c
[ByRef] Optional. Variant. A collection to initialize the list with. Count will reflect the number of items added.

Return Values

ArrayList - A new ArrayList object.

Remarks

Sometimes the comparison of two items in the list cannot be accomplished by the default comparer that ArrayList uses. Cases like this may be when using different datatypes, UDTs, or objects that do not implement IComparable. In cases such as these, a custom comparer object may be supplied during the construction of an ArrayList. This comparer will be used as the default comparer for methods that require comparing items.

An ArrayList can be initialized with a default set of items. This is the same as creating a new ArrayList and using AddRange to add the items.

ArrayList accepts a VBA.Collection, ICollection, and an array as a list of items to initialize the new ArrayList to.

Example

 Dim MyItems(10) As Long

 Set list = NewArrayList(New MyComparer, MyItems)
This will create a new ArrayList that uses MyComparer as the default comparer for the items. The ArrayList is also initialized with an array of Longs. The fully initialized ArrayList will have a Count of 11 items, each item being a Long datatype with the value of 0.

See Also

Project VBCorLib Overview | Class Constructors Overview | ArrayList | IComparer


Constructors: NewArrayTypeMismatchException

NewArrayTypeMismatchException

Creates a new ArrayTypeMismatchException object.

 Public Function NewArrayTypeMismatchException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As ArrayTypeMismatchException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

ArrayTypeMismatchException - A fully created ArrayTypeMismatchException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBigInteger

NewBigInteger

Creates a new BigInteger instance.

 Public Function NewBigInteger(
      ByRef value As Variant ) As BigInteger

Parameters

value
[ByRef] Variant. The value to intialize a new instance of BitInteger to.

Return Values

BigInteger - A new BigInteger instance containing the specified value.

Remarks

The follow datatypes are supported:
vbLong
vbInteger
vbByte
vbDoube
vbSingle
vbCurrency
vbDecimal
vbByte Or vbArray

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBinaryReader

NewBinaryReader

Returns a new BinaryReader that can read from the specified stream usind the specified Encoding.

 Public Function NewBinaryReader(
      ByVal Stream As Stream,
      Optional ByVal Encoding As Encoding ) As BinaryReader

Parameters

Stream
[ByVal] Stream. The stream to read the data from.
Encoding
[ByVal] Optional. Encoding. The encoding system to be used to decode the bytes from the stream.

Return Values

BinaryReader - The new BinaryReader with the specified stream and encoding.

Remarks

If no Encoding is specified, then the reader uses an Encoding of New UTF8Encoding.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBinaryWriter

NewBinaryWriter

Returns a new BinaryWriter used to write to a Stream object.

 Public Function NewBinaryWriter(
      ByVal Stream As Stream,
      Optional ByVal Encoding As Encoding ) As BinaryWriter

Parameters

Stream
[ByVal] Stream. The stream to be written to by the writer.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when converting chars to bytes.

Return Values

BinaryWriter - The new BinaryWriter object.

Remarks

The Stream object must support writing.

If no Encoding object is supplied, then an encoding of Cor.NewUTF8Encoding(False, True) is used.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBitArray

NewBitArray

Creates a new BitArray object.

 Public Function NewBitArray(
      ByVal Length As Long,
      Optional ByVal value As Boolean = False ) As BitArray

Parameters

Length
[ByVal] Long. The number of bits the object will represent.
value
[ByVal] Optional. Boolean. The value to initialize all the bits to (True = 1, False = 0).

Default: False

Return Values

BitArray - A new BitArray object set to the specified length with the specified value.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBooleans

NewBooleans

Returns an array of Boolean values generated from the values passed in.

 Public Function NewBooleans(
      ParamArray Values ( ) As Variant ) As Boolean ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Boolean() -

Remarks

The values need to be convertable to a boolean or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewBytes

NewBytes

Returns an array of Bytes generated from the values passed in.

 Public Function NewBytes(
      ParamArray Values ( ) As Variant ) As Byte ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Byte() -

Remarks

The values need to be convertable to a byte or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewcDateTime

NewcDateTime

Creates a new cDateTime object set to the specified date.

 Public Function NewcDateTime(
      Optional ByVal Year As Long,
      Optional ByVal Month As Long,
      Optional ByVal Day As Long,
      Optional ByVal Hour As Long,
      Optional ByVal Minute As Long,
      Optional ByVal Second As Long,
      Optional ByVal Millisecond As Long,
      Optional ByVal Calendar As Calendar,
      Optional ByVal Kind As DateTimeKind = UnspecifiedKind ) As cDateTime

Parameters

Year
[ByVal] Optional. Long. The year of the date.
Month
[ByVal] Optional. Long. The month of the date.
Day
[ByVal] Optional. Long. The day of the date.
Hour
[ByVal] Optional. Long. The hour of the time portion of the date.
Minute
[ByVal] Optional. Long. The minute of the time portion of the date.
Second
[ByVal] Optional. Long. The second of the time portion of the date.
Millisecond
[ByVal] Optional. Long. The millisecond of the time portion of the date.
Calendar
[ByVal] Optional. Calendar. The calendar to use to create a cDateTime for a specific culture.
Kind
[ByVal] Optional. DateTimeKind. Specifies whether the cDateTime is a UTC, Local, or unspecified time type.

Default: UnspecifiedKind

Return Values

cDateTime - A new cDateTime object initialized to the specified date and time.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewCharEnumerator

NewCharEnumerator

Creates an enumerator used to iterate over the Unicode characters of a String.

 Public Function NewCharEnumerator(
      ByRef s As String,
      Optional ByVal CopyString As Boolean = True ) As CharEnumerator

Parameters

s
[ByRef] String. The string to iterate each character of.
CopyString
[ByVal] Optional. Boolean. Indicates if the enumerator should create a copy of the passed in string, or use the existing string in memory.

Default: True

Return Values

CharEnumerator - A CharEnumerator used to iterate over each character of a String.

Remarks

By default CharEnumerator makes a copy of the passed in String. The original string can be changed as normal. If CopyString is set to False, then the original string must not change or go out of scope for the duration of the CharEnumerator objects existance. By telling CharEnumerator to not make a copy of the original string, memory is not allocated for the string, which can be helpful for large strings.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewConsoleKeyInfo

NewConsoleKeyInfo

Returns a new ConsoleKeyInfo object that represents the state of a key press.

 Public Function NewConsoleKeyInfo(
      ByVal KeyChar As Integer,
      ByVal Key As ConsoleKey,
      ByVal Shift As Boolean,
      ByVal Alt As Boolean,
      ByVal Control As Boolean ) As ConsoleKeyInfo

Parameters

KeyChar
[ByVal] Integer. The Asc value of the key pressed.
Key
[ByVal] ConsoleKey. The key code of the pressed key.
Shift
[ByVal] Boolean. Whether the shift key was pressed.
Alt
[ByVal] Boolean. Wheter the alt key was pressed.
Control
[ByVal] Boolean. Whether the control key was pressed.

Return Values

ConsoleKeyInfo - A new ConsoleKeyInfo object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewCryptoAPIHash

NewCryptoAPIHash

Creates a new CryptoAPIHash object.

 Public Function NewCryptoAPIHash(
      ByVal HashAlg As Long,
      ByVal HashSize As Long ) As CryptoAPIHash

Parameters

HashAlg
[ByVal] Long. The algorithm of the hash to be used.
HashSize
[ByVal] Long. The size of the hash output.

Return Values

CryptoAPIHash - A new CryptoAPIHash object.

Remarks

A CryptoAPIHash object is an implementation of the IHashAlgorithm callback that uses the CryptoAPI hash routines.

See Also

Project VBCorLib Overview | Class Constructors Overview | CryptoAPIHash


Constructors: NewCryptographicException

NewCryptographicException

Creates a new CryptographicException object.

 Public Function NewCryptographicException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As CryptographicException

Parameters

Message
[ByVal] String. The message contained within the exception object.
InnerException
[ByVal] Optional. Exception. A reference to an exception that may have cause this exception to occur.

Return Values

CryptographicException - A new CryptoGraphicException object.

Remarks

Most of the exceptions that occur within the cryptography set of classes will be a CryptographicException.

See Also

Project VBCorLib Overview | Class Constructors Overview | CryptographicException


Constructors: NewCryptoStream

NewCryptoStream

Creates a new CryptoStream object used to read or write transformed data to or from an underlying stream.

 Public Function NewCryptoStream(
      ByVal Stream As Stream,
      ByVal Transform As ICryptoTransform,
      ByVal Mode As CryptoStreamMode ) As CryptoStream

Parameters

Stream
[ByVal] Stream. The underlying stream to read or write the transformed data.
Transform
[ByVal] ICryptoTransform. The object used to transfrom data to or from plain text.
Mode
[ByVal] CryptoStreamMode. Sets the CryptoStream to be either in read mode or write mode.

Return Values

CryptoStream - A new CryptoStream object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | CryptoStream


Constructors: NewCspKeyContainerInfo

NewCspKeyContainerInfo

Creates a new CspKeyContainerInfo object.

 Public Function NewCspKeyContainerInfo(
      ByVal Parameters As CspParameters ) As CspKeyContainerInfo

Parameters

Parameters
[ByVal] CspParameters. The parameters used to derive information from.

Return Values

CspKeyContainerInfo - A new CspKeyContainerInfo object.

Remarks

This object is usually created by crypto service provider. Instantiating an object directly may result in property throwing an exception when accessed.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewCspParameters

NewCspParameters

Creates a new CspParameters object.

 Public Function NewCspParameters(
      ByVal TypeIn As Long,
      Optional ByVal ProviderNameIn As String,
      Optional ByVal ContainerNameIn As String ) As CspParameters

Parameters

TypeIn
[ByVal] Long. The type code used to specify the kind of provider to create.
ProviderNameIn
[ByVal] Optional. String. The provider name.
ContainerNameIn
[ByVal] Optional. String. The provider container name.

Return Values

CspParameters - Returns a new CspParameters object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewCultureInfo

NewCultureInfo

Creates a new CultureInfo object for the specified culture.

 Public Function NewCultureInfo(
      ByRef NameOrLCID As Variant,
      Optional ByVal UseUserOverride As Boolean = True ) As CultureInfo

Parameters

NameOrLCID
[ByRef] Variant. The name or Locale ID of the culture to be created.
UseUserOverride
[ByVal] Optional. Boolean. A flag indicating if the local machine settings should be used instead of the stored setting. This only applies to the culture of the current machine.

Default: True

Return Values

CultureInfo - The newly created CultureInfo object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewCurrencys

NewCurrencys

Returns an array of Currency values generated from the values passed in.

 Public Function NewCurrencys(
      ParamArray Values ( ) As Variant ) As Currency ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Currency() -

Remarks

The values need to be convertable to Currency or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDate

NewDate

Allows for quickly creating a cDateTime object from a VB Date value.

 Public Function NewDate(
      ByVal value As Date,
      Optional ByVal Kind As DateTimeKind = UnspecifiedKind ) As cDateTime

Parameters

value
[ByVal] Date. The date of the new cDateTime.
Kind
[ByVal] Optional. DateTimeKind. Specifies whether the cDateTime is a UTC, Local, or unspecified time type.

Default: UnspecifiedKind

Return Values

cDateTime - A cDateTime object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDates

NewDates

Returns an array of Date values generated from the values passed in.

 Public Function NewDates(
      ParamArray Values ( ) As Variant ) As Date ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Date() -

Remarks

The values need to be convertable to dates or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDayLightTime

NewDayLightTime

Creates a new DayLightTime object with the specified start and end times for daylight savings.

 Public Function NewDayLightTime(
      ByRef StartTime As Variant,
      ByRef EndTime As Variant,
      ByVal Delta As TimeSpan ) As DayLightTime

Parameters

StartTime
[ByRef] Variant. The starting of the daylight savings period.
EndTime
[ByRef] Variant. The ending of the daylight savings period.
Delta
[ByVal] TimeSpan. The time difference between daylight savings time and standard time.

Return Values

DayLightTime - A newly created DayLightTime object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDictionaryEntry

NewDictionaryEntry

Creates a new DictionaryEntry object initialized with key and value.

 Public Function NewDictionaryEntry(
      ByRef Key As Variant,
      ByRef value As Variant ) As DictionaryEntry

Parameters

Key
[ByRef] Variant. A value designated as the key of the pair.
value
[ByRef] Variant. A value designated as the value of the pair.

Return Values

DictionaryEntry - A new DictionaryEntry containing a key/value pair.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDirectoryInfo

NewDirectoryInfo

Creates a new DirectoryInfo object that describes the specified path.

 Public Function NewDirectoryInfo(
      ByVal Path As String ) As DirectoryInfo

Parameters

Path
[ByVal] String. The directory path this instance describes and manipulates.

Return Values

DirectoryInfo - The new object used to manage a directory path.

Remarks

When a DirectoryInfo object is created, there is no attempt at verifying the Path. Only when an attempt to manipulate the actual directroy is the path validated.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDirectoryNotFoundException

NewDirectoryNotFoundException

Creates a new DirectoryNotFoundException object with the specified message and optional exception.

 Public Function NewDirectoryNotFoundException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As DirectoryNotFoundException

Parameters

Message
[ByVal] String. A human-readable message describing the exception.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception to be thrown.

Return Values

DirectoryNotFoundException - A new DirectoryNotFoundException object with the specified message and optional exception.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDoubles

NewDoubles

Returns an array of Doubles generated from the values passed in.

 Public Function NewDoubles(
      ParamArray Values ( ) As Variant ) As Double ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Double() -

Remarks

The values need to be convertable to a Double or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDriveInfo

NewDriveInfo

Creates a new DriveInfo object used to inspect a drives information.

 Public Function NewDriveInfo(
      ByVal Name As String ) As DriveInfo

Parameters

Name
[ByVal] String. The name of the drive (C:\, \\Server\Share).

Return Values

DriveInfo - A DriveInfo object representing the specified drive.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewDSACryptoServiceProvider

NewDSACryptoServiceProvider

Creates a new DSACryptoServiceProvider object.

 Public Function NewDSACryptoServiceProvider(
      Optional ByVal KeySize As Long,
      Optional ByVal Parameters As CspParameters ) As DSACryptoServiceProvider

Parameters

KeySize
[ByVal] Optional. Long. The key size in bits. This can be from 384bits to 1024bits.
Parameters
[ByVal] Optional. CspParameters. A CspParameters object used to specify custom service provider options.

Return Values

DSACryptoServiceProvider - A new DSACryptoServiceProvider object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | DSACryptoServiceProvider


Constructors: NewEndOfStreamException

NewEndOfStreamException

Returns a new EndOfStreamException with the specified message and optional exception.

 Public Function NewEndOfStreamException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As EndOfStreamException

Parameters

Message
[ByVal] String. A human-readable message that describes the cause of the exception.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

EndOfStreamException - The new exception object.

Remarks

This exception can be thrown whenever an attempt to read passed the end of a stream is attempted. Such classes as BinaryReader may throw this exception if necessary.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewException

NewException

Creates a new Exception object.

 Public Function NewException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As Exception

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

Exception - The fully created Exception object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | Exception


Constructors: NewExceptionBase

NewExceptionBase

Creates a new base utility class that can be contained within an exception class.

 Public Function NewExceptionBase(
      Optional ByVal Subclass As Object,
      Optional ByVal AppTitle As String,
      Optional ByVal Message As String,
      Optional ByVal InnerException As Exception,
      Optional ByVal HResult As Long = 5,
      Optional ByVal Source As String,
      Optional ByVal HelpLink As String ) As ExceptionBase

Parameters

Subclass
[ByVal] Optional. Object. The containing exception class that will contain this object instance.
AppTitle
[ByVal] Optional. String. The title of the application that contains the exception class.
Message
[ByVal] Optional. String. An understandable message that describes the exception being thrown.
InnerException
[ByVal] Optional. Exception. The exception that caused the current exception to be thrown.
HResult
[ByVal] Optional. Long. The error code for the current exception.

Default: 5

Source
[ByVal] Optional. String. A description of the source of the current exception.
HelpLink
[ByVal] Optional. String. A file or URL link to a help resource.

Return Values

ExceptionBase - A new base class used for default handling of exception routines.

Remarks

Most exception classes simply contain this information to be retrieved for viewing. Few exception classes have additional requirements. This class can be used to handle the default set of information for an exception class. By containing this class inside the exception class, the exception class can delegate calls to this class for standard handling.

If additional values need to be maintained, then this class also supports the ability to set and get additional values using a String name as the key. The ArgumentException class uses this to hold the name of the parameter that caused the exception.

This class is persistable and will also attempt to persist the custom values that have been added to it. If the persistence fails, then an error will occur.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewExternalException

NewExternalException

Creates a new ExternalException object.

 Public Function NewExternalException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As ExternalException

Parameters

Message
[ByVal] String. A user-defined message specific to the exception.
InnerException
[ByVal] Optional. Exception. A reference to an exception that caused this exception.

Return Values

ExternalException - A new ExternalException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFileInfo

NewFileInfo

Creates a new FileInfo object used to describe and manage a file.

 Public Function NewFileInfo(
      ByVal FileName As String ) As FileInfo

Parameters

FileName
[ByVal] String. The name of the file to manage (may need path information as well.)

Return Values

FileInfo - The FileInfo object to manage a file.

Remarks

When the FileInfo object is first created, it does not verify the existence. of the actual file. Once access to the file through the object is attempt, the file will be verified at that time. Portions of the object that doesnt directly interact with the file will not verify the existence of the file.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFileNotFoundException

NewFileNotFoundException

Creates a new FileNotFoundException with the specified Message, FileName, and InnerException.

 Public Function NewFileNotFoundException(
      Optional ByVal FileName As String,
      Optional ByVal Message As String,
      Optional ByVal InnerException As Exception ) As FileNotFoundException

Parameters

FileName
[ByVal] Optional. String. The filename that caused the exception.
Message
[ByVal] Optional. String. A human-readable error message.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

FileNotFoundException - A new FileNotFoundException with the specified values.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFileStream

NewFileStream

Returns a new FileStream to access an underyling file.

 Public Function NewFileStream(
      ByVal Path As String,
      ByVal Mode As FileMode,
      Optional ByVal Access As FileAccess = - 1,
      Optional ByVal Share As FileShare = FileShare. ReadShare,
      Optional ByVal BufferSize As Long = 4096,
      Optional ByVal UseAsync As Boolean = False ) As FileStream

Parameters

Path
[ByVal] String. The name of the file to manipulate.
Mode
[ByVal] FileMode. The method used to create or open a file.
Access
[ByVal] Optional. FileAccess. The access allowed to the file for this FileStream.

Default: - 1

Share
[ByVal] Optional. FileShare. The access allowed to the file for other processes.

Default: FileShare . ReadShare

BufferSize
[ByVal] Optional. Long. The number of bytes used to cache reads and writes from the physical file.

Default: 4096

UseAsync
[ByVal] Optional. Boolean. Flag used to open the file in asyncronous mode.

Default: False

Return Values

FileStream - The new FileStream opened to the specified file.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFileStreamFromHandle

NewFileStreamFromHandle

Returns a new FileStream to access a file other than that on disk, such as pipes.

 Public Function NewFileStreamFromHandle(
      ByVal Handle As Long,
      ByVal Access As FileAccess,
      Optional ByVal OwnsHandle As Boolean = True,
      Optional ByVal BufferSize As Long = 4096 ) As FileStream

Parameters

Handle
[ByVal] Long. The handle to the already opened filed.
Access
[ByVal] FileAccess. The access allowed to the file for this FileStream.
OwnsHandle
[ByVal] Optional. Boolean. Determines if the FileStream object is responsible for closing the file passed in.

Default: True

BufferSize
[ByVal] Optional. Long. The number of bytes used to cache reads and writes from the physical file.

Default: 4096

Return Values

FileStream - The new FileStream opened to the specified file.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFormatException

NewFormatException

Creates a new FormatException object.

 Public Function NewFormatException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As FormatException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

FormatException - A fully created FormatException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewFromBase64Transform

NewFromBase64Transform

Creates a new FromBase64Transform object used to convert base64 characters to plain text.

 Public Function NewFromBase64Transform(
      ByVal WhiteSpaces As FromBase64TransformMode ) As FromBase64Transform

Parameters

WhiteSpaces
[ByVal] FromBase64TransformMode. Determines how whitespace should be handled during the transformation process.

Return Values

FromBase64Transform - A new FromBase64Transfrom object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | FromBase64Transform


Constructors: NewGregorianCalendar

NewGregorianCalendar

Creates a new instance of the Gregorian calendar class.

 Public Function NewGregorianCalendar(
      ByVal CalendarType As GregorianCalendarTypes ) As GregorianCalendar

Parameters

CalendarType
[ByVal] GregorianCalendarTypes. The language type the calendar is set to.

Return Values

GregorianCalendar - A new instance of a GregorianCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewHashAlgorithmBase

NewHashAlgorithmBase

Creates a base classed used by hash algorithms.

 Public Function NewHashAlgorithmBase(
      ByVal Callback As IHashAlgorithm,
      Optional ByVal KeepWeakReference As Boolean,
      Optional ByVal UseBuffer As Boolean,
      Optional ByVal BlockSize As Long ) As HashAlgorithmBase

Parameters

Callback
[ByVal] IHashAlgorithm. Used to call back into the specifics of an algorithm implementation.
KeepWeakReference
[ByVal] Optional. Boolean. Indicates if the base class should maintain a weak reference to the Callback object to prevent a circular reference from occuring if the Callback object is the same object as the one instantiating this instance.
UseBuffer
[ByVal] Optional. Boolean. Indicates if the internal buffering mechanism in the base class should be used, or if all data should be passed to the Callback object to allow custom buffering.
BlockSize
[ByVal] Optional. Long. The size of the byte block that is processed at a time by the specific algorithm using this base class. This is to help with the buffering.

Return Values

HashAlgorithmBase - A new HashAlgorithmBase object.

Remarks

This base class can handle most hash algorithm implementation requirement except for the specifics of a hash algorithm. That is where the Callback is used.

See Also

Project VBCorLib Overview | Class Constructors Overview | HashAlgorithmBase


Constructors: NewHashtable

NewHashtable

Creates a new Hashtable object with specific settings.

 Public Function NewHashtable(
      Optional ByVal d As IDictionary,
      Optional ByVal hcp As IHashcodeProvider,
      Optional ByVal Comparer As IComparer ) As Hashtable

Parameters

d
[ByVal] Optional. IDictionary. An IDictionary object containing keys and values to be added to the Hashtable.
hcp
[ByVal] Optional. IHashcodeProvider. A hashcode generator used in place of the default hashcode algorithm.
Comparer
[ByVal] Optional. IComparer. A custom comparer used to compare specific values.

Return Values

Hashtable - A new Hashtable object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewHMACBase

NewHMACBase

Creates a base class that can be used as a base implementation of an HMAC class.

 Public Function NewHMACBase(
      ByVal HashAlgorithm As HashAlgorithm,
      ByVal KeySize As Long,
      Optional ByVal HashName As String,
      Optional ByRef Key As Variant ) As HMACBase

Parameters

HashAlgorithm
[ByVal] HashAlgorithm. An instance of an algorithm to be used Hash Message Authentication Code.
KeySize
[ByVal] Long. The size of the key to be used for signing the message.
HashName
[ByVal] Optional. String. The name of the hash being used.
Key
[ByRef] Optional. Variant. The key used to sign the message.

Return Values

HMACBase - A new HMACBase object.

Remarks

This class implements many of the common routines used by HMAC classes.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewHMACMD5

NewHMACMD5

Creates a new HMACMD5 object.

 Public Function NewHMACMD5(
      ByRef Key ( ) As Byte ) As HMACMD5

Parameters

Key
[ByRef] Byte. The key used to sign the message.

Return Values

HMACMD5 - A new HMACMD5 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACMD5


Constructors: NewHMACRIPEMD160

NewHMACRIPEMD160

Creates a new HMACRIPEMD160 object.

 Public Function NewHMACRIPEMD160(
      ByRef Key ( ) As Byte ) As HMACRIPEMD160

Parameters

Key
[ByRef] Byte. The key used to sign the message.

Return Values

HMACRIPEMD160 - A new HMACRIPEMD160 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACRIPEMD160


Constructors: NewHMACSHA1

NewHMACSHA1

Creates a new HMACSHA1 object.

 Public Function NewHMACSHA1(
      ByRef Key ( ) As Byte,
      Optional ByVal UseManagedSha1 As Boolean = False ) As HMACSHA1

Parameters

Key
[ByRef] Byte. The key used to sign the message.
UseManagedSha1
[ByVal] Optional. Boolean. Indicates if the SHA1Managed or SHA1CryptoServiceProvider should be used.

Default: False

Return Values

HMACSHA1 - A new HMACSHA1 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACSHA1


Constructors: NewHMACSHA256

NewHMACSHA256

Creates a new HMACSHA256 object.

 Public Function NewHMACSHA256(
      ByRef Key ( ) As Byte ) As HMACSHA256

Parameters

Key
[ByRef] Byte. The key used to sign the message.

Return Values

HMACSHA256 - A new HMACSHA256 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACSHA256


Constructors: NewHMACSHA384

NewHMACSHA384

Creates a new HMACSHA384 object.

 Public Function NewHMACSHA384(
      ByRef Key ( ) As Byte ) As HMACSHA384

Parameters

Key
[ByRef] Byte. The key used to sign the message.

Return Values

HMACSHA384 - A new HMACSHA384 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACSHA384


Constructors: NewHMACSHA512

NewHMACSHA512

Creates a new HMACSHA512 object.

 Public Function NewHMACSHA512(
      ByRef Key ( ) As Byte ) As HMACSHA512

Parameters

Key
[ByRef] Byte. The key used to sign the message.

Return Values

HMACSHA512 - A new HMACSHA512 object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | HMACSHA512


Constructors: NewIndexOutOfRangeException

NewIndexOutOfRangeException

Creates a new IndexOutOfRangeException object.

 Public Function NewIndexOutOfRangeException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As IndexOutOfRangeException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

IndexOutOfRangeException - A fully created IndexOutOfRangeException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewINIFile

NewINIFile

Returns an object used to manipulate an INI file.

 Public Function NewINIFile(
      ByVal FileName As String ) As INIFile

Parameters

FileName
[ByVal] String. The INI filename.

Return Values

INIFile - The INIFile object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewIntegers

NewIntegers

Returns an array of Integers generated from the values passed in.

 Public Function NewIntegers(
      ParamArray Values ( ) As Variant ) As Integer ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Integer() -

Remarks

The values need to be convertable to an Integer or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewInvalidCastException

NewInvalidCastException

Creates a new InvalidCaseException object.

 Public Function NewInvalidCastException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As InvalidCastException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

InvalidCastException - A fully created InvalidCastException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewInvalidOperationException

NewInvalidOperationException

Creates a new InvalidOperationException object.

 Public Function NewInvalidOperationException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As InvalidOperationException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

InvalidOperationException - A fully created InvalidOperationException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewIOException

NewIOException

Creates a new IOException object with the specified Message, HResult, and InnerException.

 Public Function NewIOException(
      ByVal Message As String,
      Optional ByVal HResult As Long = COR_E_IO,
      Optional ByVal InnerException As Exception ) As IOException

Parameters

Message
[ByVal] String. A human-readable error message.
HResult
[ByVal] Optional. Long. The underlying error code.

Default: COR_E_IO

InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

IOException - A new IOException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewKeySizes

NewKeySizes

Creates a new KeySizes object with the Min, Max and Skip sizes defined.

 Public Function NewKeySizes(
      ByVal MinSize As Long,
      ByVal MaxSize As Long,
      ByVal SkipSize As Long ) As KeySizes

Parameters

MinSize
[ByVal] Long. The smallest key size defined by this KeySizes instance.
MaxSize
[ByVal] Long. The largest key size defined by this KeySizes instance.
SkipSize
[ByVal] Long. The step size from MinSize to MaxSize of legal key sizes between the smallest and largest legal key sizes in this instance.

Return Values

KeySizes - A new KeySizes object with the Min, Max and Skip sizes defined.

Remarks

A KeySizes object represents a set of legal key sizes. It defines all the possible legal key sizes by defining the smallest and largest key sizes allows, then defining a step size used to calculate the additional legal key sizes between the smallest and largest key sizes.

If the smallest key size is 64 and the largest key size is 128 and a skip size of 32 is defined, then all possible legal key sizes are from 64 to 128 in increments of 32. In this case, the valid key sizes are 64, 96 and 128.

See Also

Project VBCorLib Overview | Class Constructors Overview | KeySizes


Constructors: NewLongs

NewLongs

Returns an array of Longs generated from the values passed in.

 Public Function NewLongs(
      ParamArray Values ( ) As Variant ) As Long ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Long() -

Remarks

The values need to be convertable to a Long or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewMACTripleDES

NewMACTripleDES

Creates a new MACTripleDES object.

 Public Function NewMACTripleDES(
      ByRef RgbKey ( ) As Byte,
      Optional ByVal StrTripleDES As String = "3DES" ) As MACTripleDES

Parameters

RgbKey
[ByRef] Byte. The key to be used by the implementation of the TripleDES algorithm.
StrTripleDES
[ByVal] Optional. String. The name of the TripleDES implementation to be used.

Default: "3DES"

Return Values

MACTripleDES - A new MACTripleDES object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewMemoryMappedFile

NewMemoryMappedFile

Creates a memory-mapped view of a file.

 Public Function NewMemoryMappedFile(
      ByVal Path As String,
      Optional ByVal Access As FileAccess = FileAccess. ReadAccess,
      Optional ByVal Share As FileShare = FileShare. ReadShare ) As MemoryMappedFile

Parameters

Path
[ByVal] String. The file to be mapped to memory.
Access
[ByVal] Optional. FileAccess. The access to this mapping of the file.

Default: FileAccess . ReadAccess

Share
[ByVal] Optional. FileShare. How should the file be shared with other processes.

Default: FileShare . ReadShare

Return Values

MemoryMappedFile - The new mapped view object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewMemoryStream

NewMemoryStream

Returns a new memoryStream object which uses a supplied byte array.

 Public Function NewMemoryStream(
      ByRef Buffer ( ) As Byte,
      Optional ByVal index As Variant,
      Optional ByVal count As Variant,
      Optional ByVal Writable As Boolean = True ) As MemoryStream

Parameters

Buffer
[ByRef] Byte. The supplied byte array to act upon.
index
[ByVal] Optional. Variant. The starting index in the array to begin usage.
count
[ByVal] Optional. Variant. The total bytes that can be used by the stream.
Writable
[ByVal] Optional. Boolean. Whether or not to allow the stream to be written to.

Default: True

Return Values

MemoryStream - The newly created MemoryStream containing the supplied byte buffer.

Remarks

By using a user supplied buffer, the user can decide how much of the buffer is actually accessable. The buffer cannot be increased in size. The stream does not release the byte Buffer. The user still must maintain a reference to the array and keep it alive for the duration of the MemoryStreams life.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewNotSupportedException

NewNotSupportedException

Creates a new NotSupportedException object.

 Public Function NewNotSupportedException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As NotSupportedException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

NotSupportedException - A fully created NotSupportedException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewObjectDisposedException

NewObjectDisposedException

Returns a new ObjectDisposedException

 Public Function NewObjectDisposedException(
      ByVal ObjectName As String,
      Optional ByVal Message As String ) As ObjectDisposedException

Parameters

ObjectName
[ByVal] String. The name of the object that has been disposed of.
Message
[ByVal] Optional. String. A human-readable message.

Return Values

ObjectDisposedException - The newly created ObjectDisposedException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewOperatingSystem

NewOperatingSystem

Returns a new OperatingSystem object with the specified Platform and Version.

 Public Function NewOperatingSystem(
      ByVal Platform As PlatformID,
      ByVal Version As Version,
      Optional ByVal ServicePack As String ) As OperatingSystem

Parameters

Platform
[ByVal] PlatformID. The platform the OS is.
Version
[ByVal] Version. The version of the specified platform.
ServicePack
[ByVal] Optional. String. A message describing a service pack.

Return Values

OperatingSystem - The new OperatingSystem object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewOverflowException

NewOverflowException

Returns a new OverflowException with the specified message and exception.

 Public Function NewOverflowException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As OverflowException

Parameters

Message
[ByVal] String. A human-readable message describing the exception.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

OverflowException - This exception is thrown when a value may not fit into an existing datatype.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewPathTooLongException

NewPathTooLongException

Returns a new PathTooLongException object.

 Public Function NewPathTooLongException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As PathTooLongException

Parameters

Message
[ByVal] String. A human-readable message.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

PathTooLongException - The new PathTooLongException.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewPlatformNotSupportedException

NewPlatformNotSupportedException

Returns a new PlatformNotSupportedException with the specified Message and InnerException.

 Public Function NewPlatformNotSupportedException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As PlatformNotSupportedException

Parameters

Message
[ByVal] String. A human-readable error message.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception.

Return Values

PlatformNotSupportedException - The new PlatformNotSupportedException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewQueue

NewQueue

Creates a new Queue initialized with the elements in the collection.

 Public Function NewQueue(
      ByRef Col As Variant ) As Queue

Parameters

Col
[ByRef] Variant. The elements to place in the queue upon creation.

Return Values

Queue - A Queue object with the elements placed in it.

Remarks

The Col parameter can be a VBA.Collection, ICollection object or an Array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewRandom

NewRandom

Creates a new Random object initialized with the specified seed.

 Public Function NewRandom(
      ByVal seed As Long ) As Random

Parameters

seed
[ByVal] Long. The value used to initialize the random number generator with.

Return Values

Random - A new Random object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewRankException

NewRankException

Creates a new RankException object.

 Public Function NewRankException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As RankException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

RankException - A fully created RankException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewResourceKey

NewResourceKey

Creates a new object used to uniquely identify a resource.

 Public Function NewResourceKey(
      ByRef Name As Variant,
      ByRef ResourceType As Variant,
      ByVal LanguageID As Long ) As ResourceKey

Parameters

Name
[ByRef] Variant. The name of the resource being identified.
ResourceType
[ByRef] Variant. The type of resource being identified.
LanguageID
[ByVal] Long. The Locale ID associated with the resource.

Return Values

ResourceKey - An object that can be used to uniquely identify a resource.

Remarks

Name and ResourceType can be a string or number.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewResourceManager

NewResourceManager

Loads all resources from a source for all cultures in the source.

 Public Function NewResourceManager(
      ByRef Source As Variant ) As ResourceManager

Parameters

Source
[ByRef] Variant. A .RES file, IResourceReader or Stream to read all resources from.

Return Values

ResourceManager - A new ResourceManager object.

Remarks

If a set of resource files is to be loaded into a resource manager then use the ResourceManager.CreateFileBasedResourceManager method.

See Also

Project VBCorLib Overview | Class Constructors Overview | ResourceManager | ResourceManagerStatic


Constructors: NewResourceReader

NewResourceReader

Enumerates through the resources in a .RES file.

 Public Function NewResourceReader(
      ByRef Source As Variant ) As ResourceReader

Parameters

Source
[ByRef] Variant. The filename or stream to read from.

Return Values

ResourceReader - A reader used to enumerate the resources.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewResourceSet

NewResourceSet

Creates a new set of resources for a specific culture.

 Public Function NewResourceSet(
      ByVal CultureID As Variant,
      ByRef Source As Variant ) As ResourceSet

Parameters

CultureID
[ByVal] Variant. The specific culture to retrieve resources for.
Source
[ByRef] Variant. A .RES filename, IResourceReader, or Stream object.

Return Values

ResourceSet - A new ResourceSet.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewResourceWriter

NewResourceWriter

Provides a method to create a new .RES file.

 Public Function NewResourceWriter(
      ByRef Source As Variant ) As ResourceWriter

Parameters

Source
[ByRef] Variant. A .RES filename or Stream.

Return Values

ResourceWriter - A ResourceWriter used to create a resource file.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewResPictureGroup

NewResPictureGroup

Creates a picture group object used to contain information about resources that are grouped together.

 Public Function NewResPictureGroup(
      ByVal GroupType As PictureGroupTypes ) As ResPictureGroup

Parameters

GroupType
[ByVal] PictureGroupTypes. The type of resource the group represents.

Return Values

ResPictureGroup - A group of container for a specific resource type.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewRfc2898DeriveBytes

NewRfc2898DeriveBytes

Creates a new Rfc2898DeriveBytes object.

 Public Function NewRfc2898DeriveBytes(
      ByRef Password As Variant,
      ByRef Salt As Variant,
      Optional ByVal Iterations As Long = 1000 ) As Rfc2898DeriveBytes

Parameters

Password
[ByRef] Variant. This can be a String password or a Byte array.
Salt
[ByRef] Variant. This can be a Byte array to be used as salt or an Integer value indicating the size of the salt to be generated.
Iterations
[ByVal] Optional. Long. The number of times the operation should be performed when generating a password.

Default: 1000

Return Values

Rfc2898DeriveBytes - A new Rfc2898DeriveBytes object.

Remarks

This is used to create Byte array passwords from standard plain text passwords.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewRNGCryptoServiceProvider

NewRNGCryptoServiceProvider

Creates a new random number generator that uses a crypto service provider to generate random numbers.

 Public Function NewRNGCryptoServiceProvider(
      ByVal CspParams As CspParameters ) As RNGCryptoServiceProvider

Parameters

CspParams
[ByVal] CspParameters. Parameters used to allow a specific crypto service provider to be used instead of the default.

Return Values

RNGCryptoServiceProvider - A new RNGCryptoServiceProvider object that generated random numbers using a crypto service provider.

Remarks

Crypto service providers generally produce a more random set of numbers than the standard Windows API set of random number generators. This is because cryptography depends a great deal on go random number generation to be effective.

The default provider will be one of Microsofts cryptography service providers such as "Microsoft Base Cryptographic Provider v1.0" or "Microsoft Enhanced Cryptographic Provider v1.0."

Using the CspParams allows for a specific or custom provider to be used instead of the Microsoft providers.

See Also

Project VBCorLib Overview | Class Constructors Overview | RNGCryptoServiceProvider


Constructors: NewRSACryptoServiceProvider

NewRSACryptoServiceProvider

Creates a new RSACryptoServiceProvider object.

 Public Function NewRSACryptoServiceProvider(
      Optional ByVal KeySize As Long,
      Optional ByVal Parameters As CspParameters ) As RSACryptoServiceProvider

Parameters

KeySize
[ByVal] Optional. Long. The size of the key used by the service provider.
Parameters
[ByVal] Optional. CspParameters. A CspParameters object used to specify custom service provider options.

Return Values

RSACryptoServiceProvider - A new RSACryptoServiceProvider.

Remarks

The key size can is 384bit to 512bit for non-high encryption machines and 384bit to 16384bit for high encryption machines.

See Also

Project VBCorLib Overview | Class Constructors Overview | RSACryptoServiceProvider


Constructors: NewSecurityElement

NewSecurityElement

Creates a new SecurityElement object.

 Public Function NewSecurityElement(
      ByVal Tag As String,
      Optional ByVal Text As String ) As SecurityElement

Parameters

Tag
[ByVal] String. The name of the security element.
Text
[ByVal] Optional. String. The text within the element tags.

Return Values

SecurityElement - A new SecurityElement object.

Remarks

A SecurityElement is a simple version of an XML tag with attributes and text.

See Also

Project VBCorLib Overview | Class Constructors Overview | SecurityElement


Constructors: NewSerializationException

NewSerializationException

Creates a new SerializationException object.

 Public Function NewSerializationException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As SerializationException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

SerializationException - A fully created SerializationException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewSingles

NewSingles

Returns an array of Singles generated from the values passed in.

 Public Function NewSingles(
      ParamArray Values ( ) As Variant ) As Single ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Single() -

Remarks

The values need to be convertable to a Single or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewSortedList

NewSortedList

Creates a new SortedList object with specific initialization options.

 Public Function NewSortedList(
      Optional ByVal List As IDictionary,
      Optional ByVal Comparer As IComparer,
      Optional ByVal Capacity As Long = 16 ) As SortedList

Parameters

List
[ByVal] Optional. IDictionary. An object implementing IDictionary used to initialize the list from.
Comparer
[ByVal] Optional. IComparer. An object implementing IComparer used to search and sort keys in the list.
Capacity
[ByVal] Optional. Long. An initial list size.

Default: 16

Return Values

SortedList - A new SortedList object with the specific initializations.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStack

NewStack

Creates a new Stack object initialized with data in col.

 Public Function NewStack(
      ByRef Col As Variant ) As Stack

Parameters

Col
[ByRef] Variant. A collection of items to initalize the Stack object with.

Return Values

Stack - A new Stack object containing the collection of values.

Remarks

col can be a VBA.Collection, an object implementing ICollection, or an Array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStreamReader

NewStreamReader

Creates a new StreamReader from either a FileName or an existing stream to read from.

 Public Function NewStreamReader(
      ByVal Source As Variant,
      Optional ByVal Encoding As Encoding,
      Optional ByVal determineEncodingFromByteOrderMarks As Boolean = True,
      Optional ByVal BufferSize As Long = 4096 ) As StreamReader

Parameters

Source
[ByVal] Variant. A FileName used to open an existing file as a FileStream, or an existing Stream object.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when decoding bytes from the stream.
determineEncodingFromByteOrderMarks
[ByVal] Optional. Boolean. Requests that the reader attempt to determine what type of encoding is being used in the stream by reading the first few bytes.

Default: True

BufferSize
[ByVal] Optional. Long. The size of the internal cache used to improve performance.

Default: 4096

Return Values

StreamReader - A newly initialized StreamReader object.

Remarks

If a filename is specified, then an internal FileStream object is created using an initialization of Cor.NewFileStream(Source, FileMode.OpenExisting, FileAccess.ReadAccess, FileShare.ReadShare).

If determineEncodingFromByteOrderMarks is True, then up to 3 bytes are read from the stream upon the first attempt to read any data from the stream. The bytes are used to determine if a specific encoding has been used. There are 3 encoding signatures that are looked for.
&HFE, &HFF - UnicodeEncoding with Little Endian byte ordering
&HFF, &HFE - UnicodeEncoding with Big Endian byte ordering
&HEF, &HBB, &HBF - UTF8Encoding
If no encoding is identified, then Encoding.UTF8 is used.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStreamWriter

NewStreamWriter

Creates a new StreamWriter with either a filename or other stream as a source to write to in the specified Encoding.

 Public Function NewStreamWriter(
      ByVal Source As Variant,
      Optional ByVal Encoding As Encoding,
      Optional ByVal BufferSize As Long = 4096,
      Optional ByVal Append As Boolean = False ) As StreamWriter

Parameters

Source
[ByVal] Variant. Either a FileName or Stream object to write to.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when writing to the stream.
BufferSize
[ByVal] Optional. Long. The minimum size of the internal buffer used to cache writes.

Default: 4096

Append
[ByVal] Optional. Boolean. Indicates if a file is to be appended to or overwritten.

Default: False

Return Values

StreamWriter - A new StreamWriter ready to write to an underlying stream in the specified Encoding.

Remarks

If a FileName is passed in, then a FileStream is created internally Using either FileMode.Create or FileMode.Append depending on Append, FileAccess.WriteAccess, FileShare.ReadShare.

If Encoding is not supplied, then an encoding of Cor.NewUTF8Encoding(False, True) is used.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStringBuilder

NewStringBuilder

Returns a new StringBuilder with user specified settings and starting string.

 Public Function NewStringBuilder(
      Optional ByRef s As String,
      Optional ByRef startIndex As Variant,
      Optional ByRef count As Variant,
      Optional ByVal Capacity As Long = 512 ) As StringBuilder

Parameters

s
[ByRef] Optional. String. A string to be inititially placed in the builder. If this is specified, then Capacity will be set to no less than Count.
startIndex
[ByRef] Optional. Variant. The starting index in s to begin placing into the buffer.
count
[ByRef] Optional. Variant. The number of characters in s to place into the buffer.
Capacity
[ByVal] Optional. Long. The capacity of the internal buffer. If this is less than Count, then Count will override this value.

Default: 512

Return Values

StringBuilder - A new StringBuilder with s already placed in the buffer.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStringReader

NewStringReader

Returns a new StringReader object.

 Public Function NewStringReader(
      ByRef s As String,
      Optional ByVal IsOwner As Boolean ) As StringReader

Parameters

s
[ByRef] String. The string to be read from.
IsOwner
[ByVal] Optional. Boolean. Tells StringReader to steal the string from the source.

Return Values

StringReader - The new StringReader object.

Remarks

If IsOwner is True, then the variable passed into as s will become an empty string after the object is constructed.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStrings

NewStrings

Returns an array of Strings generated from the values passed in.

 Public Function NewStrings(
      ParamArray Values ( ) As Variant ) As String ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

String() -

Remarks

The values need to be convertable to a String or an exception will occur.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewStringWriter

NewStringWriter

Returns a new StringWriter object.

 Public Function NewStringWriter(
      Optional ByVal sb As StringBuilder,
      Optional ByVal Provider As IFormatProvider ) As StringWriter

Parameters

sb
[ByVal] Optional. StringBuilder. A supplied StringBuilder object that is written to. This allows the StringWriter to start with an already created string.
Provider
[ByVal] Optional. IFormatProvider. An object that provided formatting information for numbers and dates.

Return Values

StringWriter - The new StringWriter object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewSystemException

NewSystemException

Creates a new SystemException object.

 Public Function NewSystemException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As SystemException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

SystemException - A fully created SystemException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | SystemException | Exception


Constructors: NewTicker

NewTicker

Creates a new Ticker.

 Public Function NewTicker(
      ByVal Interval As Long,
      Optional ByVal Data As Variant,
      Optional ByVal AutoReset As Boolean = True,
      Optional ByVal AddressOfCallback As Long ) As Ticker

Parameters

Interval
[ByVal] Long. The delay between events in milliseconds.
Data
[ByVal] Optional. Variant. A user supplied value to be associated with the timer.
AutoReset
[ByVal] Optional. Boolean. True to have the timer event recur, False for one event.

Default: True

AddressOfCallback
[ByVal] Optional. Long. An address to a callback method that can be called when the timer has elapsed. Setting this to zero will stop the callback.

Return Values

Ticker - A new Ticker object.

Remarks

A callback method is used to allow a timer object to notify the function without having to use an Event. A function callback must have the following signature, or the application may crash.

 Public Sub TickerCallback(ByRef Ticker As Ticker, ByRef Data As Variant)
      do stuff
 End Sub
The two parameters must be declared as ByRef.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewTime

NewTime

Returns a new TimeSpan representing the time portion of the date.

 Public Function NewTime(
      ByVal DateValue As Variant ) As TimeSpan

Parameters

DateValue
[ByVal] Variant. The date to retrieve the time portion of.

Return Values

TimeSpan - A TimeSpan object representing the time portion.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewTimeSpan

NewTimeSpan

Creates a new TimeSpan object set to the specified amount of time.

 Public Function NewTimeSpan(
      Optional ByVal Days As Long,
      Optional ByVal Hours As Long,
      Optional ByVal Minutes As Long,
      Optional ByVal Seconds As Long,
      Optional ByVal Milliseconds As Long ) As TimeSpan

Parameters

Days
[ByVal] Optional. Long. The number of days in the timespan.
Hours
[ByVal] Optional. Long. The number of hours in the timespan.
Minutes
[ByVal] Optional. Long. The number of minutes in the timespan.
Seconds
[ByVal] Optional. Long. The number of seconds in the timespan.
Milliseconds
[ByVal] Optional. Long. The number of milliseconds in the timespan.

Return Values

TimeSpan - A TimeSpan with the specified time.

Remarks

The values can be both positive and negative.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewUnauthorizedAccessException

NewUnauthorizedAccessException

Creates a new UnauthorizedAccessException object.

 Public Function NewUnauthorizedAccessException(
      ByVal Message As String,
      Optional ByVal InnerException As Exception ) As UnauthorizedAccessException

Parameters

Message
[ByVal] String. A human-readable message explaining the exception.
InnerException
[ByVal] Optional. Exception. An exception that caused this exception.

Return Values

UnauthorizedAccessException - A fully created UnauthorizedAccessException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewUnicodeEncoding

NewUnicodeEncoding

Returns a new UnicodeEncoding object with the specified settings.

 Public Function NewUnicodeEncoding(
      ByVal BigEndian As Boolean,
      ByVal ByteOrderMark As Boolean ) As UnicodeEncoding

Parameters

BigEndian
[ByVal] Boolean. Indicates if the byte order for a character should be high byte first (default is low byte first.)
ByteOrderMark
[ByVal] Boolean. Indicates whether or not the encoding should emit the preamble bytes in the GetPreamble method.

Return Values

UnicodeEncoding - The new UnicodeEncoding object.

Remarks

If ByteOrderMark is True then the GetPreamble will emit one of the following byte arrays.

BigEnding = True: &HFE, &HFF
BigEnding = False: &HFF, &HFE

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewUTF7Encoding

NewUTF7Encoding

Returns a new UTF7Encoding object.

 Public Function NewUTF7Encoding(
      ByVal AllowOptionals As Boolean ) As UTF7Encoding

Parameters

AllowOptionals
[ByVal] Boolean. Signals whether or not to allow the optional character set of O from RFC2152 to be directly encoded or not.

Return Values

UTF7Encoding - The new UTF7Encoding object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewUTF8Encoding

NewUTF8Encoding

Returns a new UTF8Encoding object.

 Public Function NewUTF8Encoding(
      ByVal ShouldEmitUTF8Identifier As Boolean,
      Optional ByVal ShouldThrowException As Boolean ) As UTF8Encoding

Parameters

ShouldEmitUTF8Identifier
[ByVal] Boolean. Indicates whether or not the encoding should emit the preamble bytes in the GetPreamble method.
ShouldThrowException
[ByVal] Optional. Boolean. Signals whether or not the encoding should throw an exception if the the source bytes are invalid for creating a character array.

Return Values

UTF8Encoding -

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewVariants

NewVariants

Returns a Variant array containing the values passed in.

 Public Function NewVariants(
      ParamArray Values ( ) As Variant ) As Variant ( )

Parameters

Values
[ByRef] Variant. The values to create the array from.

Return Values

Variant() -

Remarks

This is the same as using the Array function.

The array is zero-based.

If no values are passed in then an empty array is returned, not a null array.

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewVersion

NewVersion

Creates a new Version object with specified version information.

 Public Function NewVersion(
      ByVal Major As Long,
      ByVal Minor As Long,
      Optional ByRef Build As Variant,
      Optional ByRef Revision As Variant ) As Version

Parameters

Major
[ByVal] Long. The number to describe an application level change.
Minor
[ByVal] Long. The number that describes a component level change.
Build
[ByRef] Optional. Variant. The number used to describe an integration compiling of the application.
Revision
[ByRef] Optional. Variant. Minor adjustments to the application.

Return Values

Version - A new Version object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewWeakReference

NewWeakReference

Creates a new WeakReference object.

 Public Function NewWeakReference(
      ByVal Target As Object ) As WeakReference

Parameters

Target
[ByVal] Object. The object to maintain a weak reference to.

Return Values

WeakReference - A new WeakReference object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewWinResourceReader

NewWinResourceReader

Creates a new WinResourceReader reader object.

 Public Function NewWinResourceReader(
      ByVal FileName As String ) As WinResourceReader

Parameters

FileName
[ByVal] String. The path and name of the EXE or DLL from which to read the resources.

Return Values

WinResourceReader - A new WinResourceReader object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview


Constructors: NewXmlSyntaxException

NewXmlSyntaxException

Creates a new XmlSyntaxException object.

 Public Function NewXmlSyntaxException(
      Optional ByVal LineNumber As Variant,
      Optional ByVal Message As Variant,
      Optional ByVal InnerException As Exception ) As XmlSyntaxException

Parameters

LineNumber
[ByVal] Optional. Variant. The number in the Xml string the exception occurred.
Message
[ByVal] Optional. Variant. The exception message.
InnerException
[ByVal] Optional. Exception. The exception that caused this exception to occur.

Return Values

XmlSyntaxException - A new XmlSyntaxException object.

Remarks

See Also

Project VBCorLib Overview | Class Constructors Overview | XmlSyntaxException


Convert

Convert

Provides methods used to encode and decode byte arrays to and from base-64 encoded characters.

Remarks

To access the methods of this class, simply call the method using the Convert.* syntax.

'This example takes a byte array containing 10 values
'from 1 to 10 and encodes it into a Base-64 string encoding.
'The encoded string is then decoded back into the original
'byte array and displayed for view.

Private Sub Main()
    Dim original() As Byte
    Dim decoded() As Byte
    Dim s As String

    ' Create a byte array containing values 1 to 10.
    original = Cor.NewBytes( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

    ' Display the original byte array values
    Console.WriteLine "Original Bytes"
    DisplayBytes original

    ' Encode the byte array into a Base-64 Encoded string.
    s = Convert.ToBase64String(original)

    ' Display Base-64 Encoded string.
    Console.WriteLine
    Console.WriteLine "Base-64 Encoded String"
    Console.WriteLine " " & s

    ' Decode Base-64 string into byte array.
    decoded = Convert.FromBase64String(s)

    ' Display decoded byte array.
    Console.WriteLine "Bytes After Decoding"
    DisplayBytes decoded

    ' Wait for user to press enter
    Console.ReadLine
End Sub

'Displays the contents of a byte array.
Private Sub DisplayBytes(ByRef bytes() As Byte)
    Dim i As Long

    For i = LBound(bytes) To UBound(bytes)
        Console.WriteValue " " & bytes(i)
    Next i
End Sub

'This code produces the following output.

'original bytes
' 1 2 3 4 5 6 7 8 9 10
'Base-64 Encoded String
' AQIDBAUGBwgJCg==
'Bytes After Decoding
' 1 2 3 4 5 6 7 8 9 10

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
FromBase64CharArray | Decodes a base-64 character array to a byte array. The Offset and length specify a subset of the character array to be decoded.
FromBase64String | A base-64 string containing characters to be decoded to a byte array.
ToBase64CharArray | Converts the value of a subset of a byte array to an equivalent subset of a Unicode character array consisting of base 64 digits. Parameters specify the subsets as offsets of the input and output arrays and the number of elements in the input array.
ToBase64String | Converts the value of a subset of a byte array to an equivalent subset of a Unicode character string consisting of base-64 characters. Parameters specify the subsets as offsets of the input array and the number of elements in the input array to process.
ToString | Converts a datatype value to a string representation using any supplied formatting or provider arguments.


Convert: FromBase64CharArray

FromBase64CharArray

Decodes a base-64 character array to a byte array. The Offset and length specify a subset of the character array to be decoded.

 Public Function FromBase64CharArray(
      ByRef InArray ( ) As Integer,
      ByVal Offset As Long,
      ByVal Length As Long ) As Byte ( )

Parameters

InArray
[ByRef] Integer. A base-64 character array to be decoded to a byte array.
Offset
[ByVal] Long. The character within the character array to begin decoding.
Length
[ByVal] Long. The number of characters to be decoded into the byte array.

Return Values

Byte() - A byte array that has been decoded from a base-64 character array.

Remarks

See Also

Project VBCorLib Overview | Class Convert Overview


Convert: FromBase64String

FromBase64String

A base-64 string containing characters to be decoded to a byte array.

 Public Function FromBase64String(
      ByRef s As String ) As Byte ( )

Parameters

s
[ByRef] String. The base-64 string to be decoded.

Return Values

Byte() - A byte array containing the decoded base-64 characters.

Remarks

See Also

Project VBCorLib Overview | Class Convert Overview


Convert: ToBase64CharArray

ToBase64CharArray

Converts the value of a subset of a byte array to an equivalent subset of a Unicode character array consisting of base 64 digits. Parameters specify the subsets as offsets of the input and output arrays and the number of elements in the input array.

 Public Function ToBase64CharArray(
      ByRef InArray ( ) As Byte,
      ByVal OffsetIn As Long,
      ByVal Length As Long,
      ByRef OutArray ( ) As Integer,
      ByVal OffsetOut As Long,
      Optional ByVal InsertLineBreaks As Boolean = False ) As Long

Parameters

InArray
[ByRef] Byte. The bytes to be converted to a base-64 character array.
OffsetIn
[ByVal] Long. Offset within InArray to begin encoding to base-64 characters.
Length
[ByVal] Long. The number of bytes to encode.
OutArray
[ByRef] Integer. The output character array containing the base-64 characters.
OffsetOut
[ByVal] Long. The starting index in OutArray to place base-64 characters.
InsertLineBreaks
[ByVal] Optional. Boolean. Indicates if a vbCrLf should be inserted every 76 characters to conform with MIME line formatting.

Default: False

Return Values

Long - The number of base-64 characters created.

Remarks

Added .NET 2.0 ability to insert linebreaks every 76 characters for MIME formatting.

See Also

Project VBCorLib Overview | Class Convert Overview


Convert: ToBase64String

ToBase64String

Converts the value of a subset of a byte array to an equivalent subset of a Unicode character string consisting of base-64 characters. Parameters specify the subsets as offsets of the input array and the number of elements in the input array to process.

 Public Function ToBase64String(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant,
      Optional ByVal InsertLineBreaks As Boolean = False ) As String

Parameters

Bytes
[ByRef] Byte. The bytes to be converted to a base-64 character array.
Index
[ByRef] Optional. Variant. Index within Bytes to begin encoding to base-64 characters.
Count
[ByRef] Optional. Variant. The number of bytes to encode.
InsertLineBreaks
[ByVal] Optional. Boolean. Indicates if a vbCrLf should be inserted every 76 characters to conform with MIME line formatting.

Default: False

Return Values

String - A string containg the byte array encoded as base-64 characters.

Remarks

See Also

Project VBCorLib Overview | Class Convert Overview


Convert: ToString

ToString

Converts a datatype value to a string representation using any supplied formatting or provider arguments.

 Public Function ToString(
      ByRef Value As Variant,
      Optional ByVal Format As String,
      Optional ByVal Provider As IFormatProvider ) As String

Parameters

Value
[ByRef] Variant. The value to convert to a string.
Format
[ByVal] Optional. String. Formatting information for converting the value.
Provider
[ByVal] Optional. IFormatProvider. A formatting provider to help custom formatting.

Return Values

String - A string representation of the value.

Remarks

See Also

Project VBCorLib Overview | Class Convert Overview


CryptoAPIHash

CryptoAPIHash

Wraps the CryptoAPI hash functions to be used in the HashAlgorithmBase callback methods.

See Also

Project VBCorLib Overview

Implements:

IHashAlgorithm


CryptoAPIHash: IHashAlgorithm

IHashAlgorithm

 Implements IHashAlgorithm

Return Values

IHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPIHash Overview


CryptoAPITransform

CryptoAPITransform

Utilizes the Windows CryptoAPI cryptography services to perform data transformations.

Remarks

This class is used to support 3 cryptographic service providers within the CryptoAPI: DES, TripleDES, and RC2.

See Also

Project VBCorLib Overview | DESCryptoServiceProvider | TripleDESCryptoServiceProvider | RC2CryptoServiceProvider

Implements:

ICryptoTransform
IObject

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the current transfrom can be reused after calling TransformFinalBlock.
CanTransformMultipleBlocks (get) | Returns if this transform can process more than one block per TransformBlock call.
InputBlockSize (get) | Returns the size of one block of data that is to be processed.
KeyHandle (get) | This returns the actual handle to a key created by the CryptoAPI service.
OutputBlockSize (get) | Returns the size of the resulting block of data after an input block of data has been processed.

Methods:

Name | Description
Clear | This will release the key and context of the CryptoAPI provider.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
Reset | Resets the transform so a new set of data can begin to be processed.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.
TransformBlock | Processes a set of data, encrypting or decrypting it.
TransformFinalBlock | Processes a set of data adding any padding needed to complete the process.


CryptoAPITransform: CanReuseTransform (get)

CanReuseTransform

Returns if the current transfrom can be reused after calling TransformFinalBlock.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if it can be reused, False otherwise.

Remarks

This always returns True.

Read Only.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can process more than one block per TransformBlock call.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - This always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: Clear

Clear

This will release the key and context of the CryptoAPI provider.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview | IObject


CryptoAPITransform: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: InputBlockSize (get)

InputBlockSize

Returns the size of one block of data that is to be processed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The size of one block of data to be processed.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: KeyHandle (get)

KeyHandle

This returns the actual handle to a key created by the CryptoAPI service.

 Public Property Get KeyHandle ( ) As Long

Return Values

Long - A handle to a CryptoAPI key.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: OutputBlockSize (get)

OutputBlockSize

Returns the size of the resulting block of data after an input block of data has been processed.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the resulting block of data after an input block of data has been processed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: Reset

Reset

Resets the transform so a new set of data can begin to be processed.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: TransformBlock

TransformBlock

Processes a set of data, encrypting or decrypting it.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to be processed.
InputOffset
[ByVal] Long. The index to begin processing from.
InputCount
[ByVal] Long. The amount of data to be processed.
OutputBuffer
[ByRef] Byte. The buffer to place the processed data.
OutputOffset
[ByVal] Long. The index to begin placing the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The InputCount must be an exact multiple of the InputBlockSize or an exception will be thrown.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoAPITransform: TransformFinalBlock

TransformFinalBlock

Processes a set of data adding any padding needed to complete the process.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final data to be processed.
InputOffset
[ByVal] Long. The index to begin processing from.
InputCount
[ByVal] Long. The amount of data to be processed.

Return Values

Byte() - The final block of processed data.

Remarks

Once a final block has been processed, the transform is reset to begin transforming new data.

See Also

Project VBCorLib Overview | Class CryptoAPITransform Overview


CryptoConfig

CryptoConfig

Used to access cryptography information.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CreateFromName | Creates a cryptography object based on the name.
EncodeOID | Returns the encoded version of an Object Identifier.
MapNameToOID | Returns an object identifier for a specific name.


CryptoConfig: CreateFromName

CreateFromName

Creates a cryptography object based on the name.

 Public Function CreateFromName(
      ByVal AlgName As String ) As Object

Parameters

AlgName
[ByVal] String. The name of the cryptography object to be created.

Return Values

Object - An instance of the object or Nothing if an empty name is provided.

Remarks

The supported names are:

 DES
 3DES
 TripleDES
 Triple DES
 RC2
 Rijndael
 SHA
 SHA1
 HashAlgorithm
 SHA256
 SHA-256
 SHA384
 SHA-384
 SHA512
 SHA-512
 MD5
 HMACSHA1
 HMACSHA256
 HMACSHA384
 HMACSHA512
 HMACMD5
 HMACRIPEMD160
 MACTripleDES
 RSA
 DSA
If a custom object is required, then the standard . format can be used.

See Also

Project VBCorLib Overview | Class CryptoConfig Overview


CryptoConfig: EncodeOID

EncodeOID

Returns the encoded version of an Object Identifier.

 Public Function EncodeOID(
      ByVal Str As String ) As Byte ( )

Parameters

Str
[ByVal] String. The object identifier as described in the X.690 standard.

Return Values

Byte() - An encoded version of the object identifier as described in the X.690 standard.

Remarks

See Also

Project VBCorLib Overview | Class CryptoConfig Overview


CryptoConfig: MapNameToOID

MapNameToOID

Returns an object identifier for a specific name.

 Public Function MapNameToOID(
      ByVal Name As String ) As String

Parameters

Name
[ByVal] String. The name of the object to obtain the identifier for.

Return Values

String - The object identifier (OID) for the object.

Remarks

See Also

Project VBCorLib Overview | Class CryptoConfig Overview


CryptographicException

CryptographicException

An exception that represents an error occuring during some form of cryptographic operation.

See Also

Project VBCorLib Overview

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


CryptographicException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview | Exception


CryptographicException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview | Exception


CryptographicException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewException.

Read Only.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptographicException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class CryptographicException Overview


CryptoStream

CryptoStream

Provides a streaming mechanism for ciphering data.

Remarks

A CryptoStream can be written to or read from in the same manner as other stream objects. A CryptoStream is designed to be used in a daisy-chain fashion, allowing for multiple transformations to be applied as a single process.

By supplying another Stream object to the Cor.NewCryptoStream function, an automatic daisy-chaining of the two streams is created. The Stream does not have to be another CryptoStream object. It can be any object implementing the Stream interface.

See Also

Project VBCorLib Overview | Constructors

Implements:

IObject
Stream

Public:

Types:

Name | Description
CryptoStreamMode | Specifies modes for a CryptoStream.

Properties:

Name | Description
CanRead (get) | Returns if the Stream can be read from.
CanSeek (get) | Returns if the Stream can seek.
CanTimeout (get) | Returns if the Stream can timeout.
CanWrite (get) | Returns if the Stream can be written to.
Length (get) | Returns the length of the current Stream.
Position (get) | Returns the current position withing the Stream.
Position (let) | Sets the current position within the Stream.
ReadTimeout (get) | Returns the amount of time must pass before a Read timeout occurs.
ReadTimeout (let) | Sets the timeout period for Read operations.
WriteTimeout (get) | Returns the timeout period for a write operation.
WriteTimeout (let) | Sets the timeout period for a write operation.

Methods:

Name | Description
BeginRead | Begins an Asynchronous read operation (currently is only synchronous)
BeginWrite | Begins an asynchronous buffer write. Currently the CryptoStream class does not support asynchronous buffer writing.
CloseStream | Closes the underlying Stream.
EndRead | Signifies the end of an asynchronous read from the stream.
EndWrite | Signifies the end of an asynchronous write to the stream.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Flushes the buffers of the underlying Stream.
FlushFinalBlock | Flushes the remaining data to the underlying stream.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ReadBlock | Reads a requested amount of data from the stream.
ReadByte | Reads a single byte from the Stream.
SeekPosition | Seeks a new position within the Stream.
SetLength | Sets the length of the current Stream.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.
WriteBlock | Writes an array of bytes to the Stream.
WriteByte | Writes a single byte to the Stream.


CryptoStream: BeginRead

BeginRead

Begins an Asynchronous read operation (currently is only synchronous)

 Public Function BeginRead(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The array to store the bytes that are read from the stream.
Offset
[ByVal] Long. The index in Buffer to begin storing bytes.
Count
[ByVal] Long. The number of bytes to be read from the stream.
Callback
[ByVal] Optional. AsyncCallback. An object that is called when the read operation is complete.
State
[ByVal] Optional. Variant. user-defined data to be kept with the Callback object for later retrieval.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding Endread and report information about the buffer read.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: BeginWrite

BeginWrite

Begins an asynchronous buffer write. Currently the CryptoStream class does not support asynchronous buffer writing.

 Public Function BeginWrite(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The source array to copy the bytes from into the stream.
Offset
[ByVal] Long. The starting index in the source Buffer to begin copying from.
Count
[ByVal] Long. The maximum number of bytes to be copied into the stream.
Callback
[ByVal] Optional. AsyncCallback. A user supplied object to be notified of the finish of the writing.
State
[ByVal] Optional. Variant. User data that can be carried within the IAsyncResult object return.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding EndBread and report information about the buffer read.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CanRead (get)

CanRead

Returns if the Stream can be read from.

 Public Property Get CanRead ( ) As Boolean

Return Values

Boolean - Returns True if the Stream supports reading, False otherwise.

Remarks

A CryptoStream object supports only reading or writing, not both simultaneously.

Read Only.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CanSeek (get)

CanSeek

Returns if the Stream can seek.

 Public Property Get CanSeek ( ) As Boolean

Return Values

Boolean - Always returns False.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CanTimeout (get)

CanTimeout

Returns if the Stream can timeout.

 Public Property Get CanTimeout ( ) As Boolean

Return Values

Boolean - Returns True if the Stream can timeout, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CanWrite (get)

CanWrite

Returns if the Stream can be written to.

 Public Property Get CanWrite ( ) As Boolean

Return Values

Boolean - Returns True if the Stream supports writing, False otherwise.

Remarks

A CryptoStream object supports only ready or writing, not both simultaneously.

Read Only.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CloseStream

CloseStream

Closes the underlying Stream.

 Public Sub CloseStream ( )

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: CryptoStreamMode

CryptoStreamMode

Specifies modes for a CryptoStream.

 Public Enum CryptoStreamMode

Values

ReadMode = 0
Sets the CryptoStream to a reading mode.
WriteMode = 1
Sets the CryptoStream to a writing mode.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: EndRead

EndRead

Signifies the end of an asynchronous read from the stream.

 Public Function EndRead(
      ByVal AsyncResult As IAsyncResult ) As Long

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult object returned from the BeginRead function.

Return Values

Long - The number of bytes read from the stream in to Buffer in the BeginRead method.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: EndWrite

EndWrite

Signifies the end of an asynchronous write to the stream.

 Public Sub EndWrite(
      ByVal AsyncResult As IAsyncResult )

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult returned from the BeginWrite function.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview | IObject


CryptoStream: Flush

Flush

Flushes the buffers of the underlying Stream.

 Public Sub Flush ( )

Remarks

This does not flush the buffers within the CryptoStream. Call FlushFinalBlock to flush the remaining data to the underlying stream.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: FlushFinalBlock

FlushFinalBlock

Flushes the remaining data to the underlying stream.

 Public Sub FlushFinalBlock ( )

Remarks

This can only be called once.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: Length (get)

Length

Returns the length of the current Stream.

 Public Property Get Length ( ) As Currency

Return Values

Currency - The length of the Stream.

Remarks

Always throws a NotSupportedException exception.

Read Only.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: Position (get)

Position

Returns the current position withing the Stream.

 Public Property Get Position ( ) As Currency

Return Values

Currency - The current position.

Remarks

Always throws a NotSupportedException exception.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: Position (let)

Position

Sets the current position within the Stream.

 Public Property Let Position(
      ByVal RHS As Currency )

Parameters

RHS
[ByVal] Currency. The new position.

Remarks

Always throws a NotSupportedException exception.

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: ReadBlock

ReadBlock

Reads a requested amount of data from the stream.

 Public Function ReadBlock(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long ) As Long

Parameters

Buffer
[ByRef] Byte. The byte array that will receive the requested data.
Offset
[ByVal] Long. The starting index within Buffer to begin writing data.
Count
[ByVal] Long. The number of bytes to read.

Return Values

Long - The actual number of bytes read.

Remarks

The number of bytes read may be less than the actual number of bytes requested.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: ReadByte

ReadByte

Reads a single byte from the Stream.

 Public Function ReadByte ( ) As Long

Return Values

Long - Returns the byte data or -1 if the end of the stream was reached.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: ReadTimeout (get)

ReadTimeout

Returns the amount of time must pass before a Read timeout occurs.

 Public Property Get ReadTimeout ( ) As Long

Return Values

Long - Returns the timeout period in milliseconds.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: ReadTimeout (let)

ReadTimeout

Sets the timeout period for Read operations.

 Public Property Let ReadTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The timeout period in milliseconds.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: SeekPosition

SeekPosition

Seeks a new position within the Stream.

 Public Function SeekPosition(
      ByVal Offset As Currency,
      ByVal Origin As SeekOrigin ) As Currency

Parameters

Offset
[ByVal] Currency. The number of bytes to move.
Origin
[ByVal] SeekOrigin. The starting position in the stream to move from.

Return Values

Currency - The new position in the Stream.

Remarks

Always throws a NotSupportedException exception.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: SetLength

SetLength

Sets the length of the current Stream.

 Public Sub SetLength(
      ByVal Value As Currency )

Parameters

Value
[ByVal] Currency. The new length of the Stream.

Remarks

Always throws a NotSupportedException exception.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: Stream

Stream

 Implements Stream

Return Values

Stream -

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: WriteBlock

WriteBlock

Writes an array of bytes to the Stream.

 Public Sub WriteBlock(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long )

Parameters

Buffer
[ByRef] Byte. The array of bytes to be written to the Stream.
Offset
[ByVal] Long. The index within Buffer to begin writing from.
Count
[ByVal] Long. The number of bytes to be written.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: WriteByte

WriteByte

Writes a single byte to the Stream.

 Public Sub WriteByte(
      ByVal Value As Byte )

Parameters

Value
[ByVal] Byte. The byte to be written to the stream.

Remarks

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: WriteTimeout (get)

WriteTimeout

Returns the timeout period for a write operation.

 Public Property Get WriteTimeout ( ) As Long

Return Values

Long - The timeout period in milliseconds.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CryptoStream: WriteTimeout (let)

WriteTimeout

Sets the timeout period for a write operation.

 Public Property Let WriteTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The timeout period in milliseconds.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CryptoStream Overview


CspKeyContainerInfo

CspKeyContainerInfo

Represents information about a Crypto Service Providers Key Container.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
Accessible (get) | Returns if a key in a key container is accessible.
Exportable (get) | Returns if a key in a key container can be exported out of the container.
KeyContainerName (get) | Returns the name of the key container.
KeyNumber (get) | Returns the key number, representing the type of key.
MachineKeyStore (get) | Returns if the key is stored in a machine storage container.
Protected (get) | Returns if the key is protected.
ProviderName (get) | Returns the name of the cryptography service provider.
ProviderType (get) | Returns the type of cryptography service provider.
RandomlyGenerated (get) | Returns if the key container was randomly generated or imported.
Removable (get) | Returns if the key can be removed from the key container.
UniqueKeyContainerName (get) | Returns a unique key container name.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


CspKeyContainerInfo: Accessible (get)

Accessible

Returns if a key in a key container is accessible.

 Public Property Get Accessible ( ) As Boolean

Return Values

Boolean - Returns True if the key is accessible, False otherwise.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview | IObject


CspKeyContainerInfo: Exportable (get)

Exportable

Returns if a key in a key container can be exported out of the container.

 Public Property Get Exportable ( ) As Boolean

Return Values

Boolean - Returns True if the key can be exported, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: KeyContainerName (get)

KeyContainerName

Returns the name of the key container.

 Public Property Get KeyContainerName ( ) As String

Return Values

String - The name of the key container.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: KeyNumber (get)

KeyNumber

Returns the key number, representing the type of key.

 Public Property Get KeyNumber ( ) As KeyNumber

Return Values

KeyNumber - Returns 1 for Exchange, 2 for Signature.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: MachineKeyStore (get)

MachineKeyStore

Returns if the key is stored in a machine storage container.

 Public Property Get MachineKeyStore ( ) As Boolean

Return Values

Boolean - Returns True if the key is in a machine set, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: Protected (get)

Protected

Returns if the key is protected.

 Public Property Get Protected ( ) As Boolean

Return Values

Boolean - Returns True if protected, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: ProviderName (get)

ProviderName

Returns the name of the cryptography service provider.

 Public Property Get ProviderName ( ) As String

Return Values

String - A string containing the name of the provider.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: ProviderType (get)

ProviderType

Returns the type of cryptography service provider.

 Public Property Get ProviderType ( ) As Long

Return Values

Long - Returns the type of the provider.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: RandomlyGenerated (get)

RandomlyGenerated

Returns if the key container was randomly generated or imported.

 Public Property Get RandomlyGenerated ( ) As Boolean

Return Values

Boolean - Returns True if the key container was randomly generated, False otherwise.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: Removable (get)

Removable

Returns if the key can be removed from the key container.

 Public Property Get Removable ( ) As Boolean

Return Values

Boolean - Returns True if the key can be removed, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspKeyContainerInfo: UniqueKeyContainerName (get)

UniqueKeyContainerName

Returns a unique key container name.

 Public Property Get UniqueKeyContainerName ( ) As String

Return Values

String - A unique key container name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CspKeyContainerInfo Overview


CspParameters

CspParameters

Contains parameter values that can be passed on to cryptography providers.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Types:

Name | Description
CspProviderFlags | A set of flags that can be used to modify the behavior of cryptographic providers.

Properties:

Name | Description
Flags (get) | Returns flags used to modify the behavior of cryptographic providers.
Flags (let) | Sets flags used to modify the behavior of cryptographic providers.
KeyContainerName (get) | Returns the key container name.
KeyContainerName (let) | Sets the key container name.
KeyNumber (get) | Returns if an Asymmetric algorithm key is a Signature or Exchange key.
KeyNumber (let) | Sets if an Asymmetric algorithm key is a Signature or Exchange key.
ProviderName (get) | Returns the Provider name of the crypto service provider.
ProviderName (let) | Sets the name of the provider to create when acquiring a crypto service provider.
ProviderType (get) | Returns the provider type code.
ProviderType (let) | Sets the provider type code.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


CspParameters: CspProviderFlags

CspProviderFlags

A set of flags that can be used to modify the behavior of cryptographic providers.

 Public Enum CspProviderFlags

Values

NoFlags = 0
No flags are to be set.
NoPrompt = 64
Prevents the service provider from display any UI for this context.
UseArchivableKey = 16
Allows a key to be exported for archival or recovery.
UseDefaultKeyContainer = 2
Use the key information from the default container.
UseExistingKey = 8
Use the key information from the current key.
UseMachineKeyStore = 1
Use the key information from the computers key store.
UseNonExportableKey = 4
Use key information that cannot be exported.
UseUserProtectedKey = 32
Notify the user through a dialog box or another method when certain actions are attempting to use a key. This flag is not compatible with the NoPrompt flag.

Remarks

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CspParameters Overview | IObject


CspParameters: Flags (get)

Flags

Returns flags used to modify the behavior of cryptographic providers.

 Public Property Get Flags ( ) As CspProviderFlags

Return Values

CspProviderFlags - The flags set for cryptographic providers.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: Flags (let)

Flags

Sets flags used to modify the behavior of cryptographic providers.

 Public Property Let Flags(
      ByVal RHS As CspProviderFlags )

Parameters

RHS
[ByVal] CspProviderFlags. The flags set for cryptographic providers.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: KeyContainerName (get)

KeyContainerName

Returns the key container name.

 Public Property Get KeyContainerName ( ) As String

Return Values

String - The name of the key container holding a key.

Remarks

A key can be kept within a container for later retrieval. This is the name of that container.

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: KeyContainerName (let)

KeyContainerName

Sets the key container name.

 Public Property Let KeyContainerName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The key container name that will hold a key.

Remarks

A key can be kept within a container for later retrieval. This is the name of that container.

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: KeyNumber (get)

KeyNumber

Returns if an Asymmetric algorithm key is a Signature or Exchange key.

 Public Property Get KeyNumber ( ) As Long

Return Values

Long - Returns 1 for Exchange, or 2 for Signature.

Remarks

An Exchange key is a public/private key pair use for Asymmetric encryption. A Signature is a key pair used to digitally sign a message or file.

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: KeyNumber (let)

KeyNumber

Sets if an Asymmetric algorithm key is a Signature or Exchange key.

 Public Property Let KeyNumber(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. Set to 1 for Exchange, or 2 for Signature.

Remarks

An Exchange key is a public/private key pair use for Asymmetric encryption. A Signature is a key pair used to digitally sign a message or file.

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: ProviderName (get)

ProviderName

Returns the Provider name of the crypto service provider.

 Public Property Get ProviderName ( ) As String

Return Values

String - Returns the name of the provider.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: ProviderName (let)

ProviderName

Sets the name of the provider to create when acquiring a crypto service provider.

 Public Property Let ProviderName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The provider name to acquire.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: ProviderType (get)

ProviderType

Returns the provider type code.

 Public Property Get ProviderType ( ) As Long

Return Values

Long - The code of the provider.

Remarks

Some provider type codes are:

 PROV_RSA_FULL         = 1
 PROV_RSA_SIG          = 2
 PROV_DSS              = 3
 PROV_FORTEZZA         = 4
 PROV_MS_EXCHANGE      = 5
 PROV_SSL              = 6
 PROV_RSA_SCHANNEL     = 12
 PROV_DSS_DH           = 13
 PROV_EC_ECDSA_SIG     = 14
 PROV_EC_ECNRA_SIG     = 15
 PROV_EC_ECDSA_FULL    = 16
 PROV_EC_ECNRA_FULL    = 17
 PROV_DH_SCHANNEL      = 18
 PROV_SPYRUS_LYNKS     = 20
 PROV_RNG              = 21
 PROV_INTEL_SEC        = 22
 PROV_REPLACE_OWF      = 23
 PROV_RSA_AES          = 24

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: ProviderType (let)

ProviderType

Sets the provider type code.

 Public Property Let ProviderType(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The provider type code.

Remarks

Some provider type codes are:

 PROV_RSA_FULL         = 1
 PROV_RSA_SIG          = 2
 PROV_DSS              = 3
 PROV_FORTEZZA         = 4
 PROV_MS_EXCHANGE      = 5
 PROV_SSL              = 6
 PROV_RSA_SCHANNEL     = 12
 PROV_DSS_DH           = 13
 PROV_EC_ECDSA_SIG     = 14
 PROV_EC_ECNRA_SIG     = 15
 PROV_EC_ECDSA_FULL    = 16
 PROV_EC_ECNRA_FULL    = 17
 PROV_DH_SCHANNEL      = 18
 PROV_SPYRUS_LYNKS     = 20
 PROV_RNG              = 21
 PROV_INTEL_SEC        = 22
 PROV_REPLACE_OWF      = 23
 PROV_RSA_AES          = 24

Read/Write.

See Also

Project VBCorLib Overview | Class CspParameters Overview


CspParameters: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class CspParameters Overview


cString

cString

Provides static functions to format and manipulate string values.

Remarks

This class cannot be directly instantiated. The methods are accessed through the class name itself.

 s = cString.Trim(s, "\")

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CharCount |
Format | Formats a string by replacing each argument with the formatted equivalent.
FormatArray | Formats a string by replacing each argument with the formatted equivalent.
FormatArrayEx | Formats a string by replacing each argument with the formatted equivalent.
FormatEx | Formats a string by replacing each argument with the formatted equivalent.
FromCharArray | Returns a string from the characters in an integer array.
IndexOfAny | Returns the index of the first character found in the OfAny set of characters.
Insert | Inserts a string into an existing string, returning the result.
IsNull | Returns if the string is null.
Join | Joins an array or subarray of strings into a single string, separated by the Delimiter.
LastIndexOfAny | Returns the index of the first character found in the OfAny set of characters searching from the end of the string.
PadLeft | Pads a strings left side.
PadRight | Pads a strings right side.
Remove | Removes a substring from the string, returning a new string with the gap filled with the remaining characters.
ToCharArray | Creates and array of chars (Integers) from the specified string.
Trim | Trims both the beginning and end of the string.
TrimEnd | Trims the end of the string.
TrimStart | Trims the beginning of the string.


cString: Format

Format

Formats a string by replacing each argument with the formatted equivalent.

 Public Function Format(
      ByRef fmt As String,
      ParamArray args ( ) As Variant ) As String

Parameters

fmt
[ByRef] String. The string containing formatting information.
args
[ByRef] Variant. A list of arguments to use in replacing the formatting information.

Return Values

String - A formatted string.

Remarks

Formatting is performed by inserting argument values into indexed locations within the supplied formatting string. To indicate the index for an argument to be inserted into the string, a pair of curly braces encloses the index value '{n}'. The indexes begin at zero. So the first argument can be referenced with '{0}' in the formatting string. The braces and index value will be replaced with the argument at index 0 in the list.

Additional formatting information can be supplied along with the index to further customize how the argument is to be formatted as a string. A colon is used to indicate additional formatting information '{0:n}'. In this case the 'n' indicates that value should be formatted as a numeric value.

Example

' This example shows how to format values when creating
' string output. It demonstrates the indexing property
' for the arguments and how they are inserted into the
' formatted string. It also demonstrates how additional
' formatting information can be used to customize the
' formatted output for the number values.
Private Sub Main()
    Dim b(9) As Byte
    Dim r As Random
    Dim i As Long

    ' Fill the array with random numbers.
    Set r = NewRandom(-13)
    r.NextBytes b

    ' Display normal formatted values.
    Debug.Print
    Debug.Print "normal formatting"
    For i = 0 To 9
        Debug.Print cString.Format("b({0}) = {1}", i, b(i))
    Next i

    ' Display 3-digit formatted values.
    Debug.Print
    Debug.Print "3-digit formatting"
    For i = 0 To 9
        Debug.Print cString.Format("b({0}) = {1:d3}", i, b(i))
    Next i

    ' Display Lowercase hexadecimal values.
    Debug.Print
    Debug.Print "Lowercase hexadecimal"
    For i = 0 To 9
        Debug.Print cString.Format("b({0}) = {1:x}", i, b(i))
    Next i

    ' Display Uppercase 2-digit hexadecimal values.
    Debug.Print
    Debug.Print "Uppercase 2-digit hexadecimal"
    For i = 0 To 9
        Debug.Print cString.Format("b({0}) = {1:X2}", i, b(i))
    Next i
End Sub

' This code produces the following output.
'
'Normal formatting
'b(0) = 153
'b(1) = 114
'b(2) = 8
'b(3) = 87
'b(4) = 232
'b(5) = 175
'b(6) = 25
'b(7) = 10
'b(8) = 91
'b(9) = 238
'
'3-digit formatting
'b(0) = 153
'b(1) = 114
'b(2) = 008
'b(3) = 087
'b(4) = 232
'b(5) = 175
'b(6) = 025
'b(7) = 010
'b(8) = 091
'b(9) = 238
'
'Lowercase hexadecimal
'b(0) = 99
'b(1) = 72
'b(2) = 8
'b(3) = 57
'b(4) = e8
'b(5) = af
'b(6) = 19
'b(7) = a
'b(8) = 5b
'b(9) = ee
'
'Uppercase 2-digit hexadecimal
'b(0) = 99
'b(1) = 72
'b(2) = 08
'b(3) = 57
'b(4) = E8
'b(5) = AF
'b(6) = 19
'b(7) = 0A
'b(8) = 5B
'b(9) = EE

See Also

Project VBCorLib Overview | Class cString Overview | NumberFormatInfo | DateTimeFormatInfo


cString: FormatArray

FormatArray

Formats a string by replacing each argument with the formatted equivalent.

 Public Function FormatArray(
      ByRef fmt As String,
      ByRef args ( ) As Variant ) As String

Parameters

fmt
[ByRef] String. The string containing formatting information.
args
[ByRef] Variant. A list of arguments to use in replacing the formatting information.

Return Values

String - A formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview | NumberFormatInfo | DateTimeFormatInfo


cString: FormatArrayEx

FormatArrayEx

Formats a string by replacing each argument with the formatted equivalent.

 Public Function FormatArrayEx(
      ByVal Provider As IFormatProvider,
      ByRef fmt As String,
      ByRef args ( ) As Variant ) As String

Parameters

Provider
[ByVal] IFormatProvider. A custom format provider that is used to format the argument instead of the default formatting.
fmt
[ByRef] String. The string containing formatting information.
args
[ByRef] Variant. A list of arguments to use in replacing the formatting information.

Return Values

String - A formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview | NumberFormatInfo | DateTimeFormatInfo


cString: FormatEx

FormatEx

Formats a string by replacing each argument with the formatted equivalent.

 Public Function FormatEx(
      ByVal Provider As IFormatProvider,
      ByRef fmt As String,
      ParamArray args ( ) As Variant ) As String

Parameters

Provider
[ByVal] IFormatProvider. A custom format provider that is used to format the argument instead of the default formatting.
fmt
[ByRef] String. The string containing formatting information.
args
[ByRef] Variant. A list of arguments to use in replacing the formatting information.

Return Values

String - A formatted string.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview | NumberFormatInfo | DateTimeFormatInfo


cString: FromCharArray

FromCharArray

Returns a string from the characters in an integer array.

 Public Function FromCharArray(
      ByRef Chars ( ) As Integer,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Chars
[ByRef] Integer. The array to create the string from.
Index
[ByRef] Optional. Variant. The starting index in the array.
Count
[ByRef] Optional. Variant. The number of characters to use.

Return Values

String - A string created from the chars in an integer array.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview


cString: IndexOfAny

IndexOfAny

Returns the index of the first character found in the OfAny set of characters.

 Public Function IndexOfAny(
      ByRef s As String,
      ByRef OfAny As Variant,
      Optional ByVal Index As Variant,
      Optional ByVal Count As Variant ) As Long

Parameters

s
[ByRef] String. The string to be searched.
OfAny
[ByRef] Variant. The set of characters to search for (String or Integer() Array).
Index
[ByVal] Optional. Variant. The starting index of s to begin searching.
Count
[ByVal] Optional. Variant. The number of characters in s to search.

Return Values

Long - The index of a character from the set, or -1 if none are found.

Remarks

The indexing of s is zero-based.

See Also

Project VBCorLib Overview | Class cString Overview


cString: Insert

Insert

Inserts a string into an existing string, returning the result.

 Public Function Insert(
      ByRef s As String,
      ByVal Index As Long,
      ByRef Value As String ) As String

Parameters

s
[ByRef] String. The string to insert to.
Index
[ByVal] Long. The starting position to insert the string.
Value
[ByRef] String. The string to be inserted.

Return Values

String - A string containing the new string created from the insertion.

Remarks

Index is zero-based.

See Also

Project VBCorLib Overview | Class cString Overview


cString: IsNull

IsNull

Returns if the string is null.

 Public Function IsNull(
      ByRef s As String ) As Boolean

Parameters

s
[ByRef] String. The string to be tested for null.

Return Values

Boolean - Indication if the string is null.

Remarks

If the string is null it will return True. An empty string will return false. A null string is equal to StrPtr(s) = 0.

See Also

Project VBCorLib Overview | Class cString Overview


cString: Join

Join

Joins an array or subarray of strings into a single string, separated by the Delimiter.

 Public Function Join(
      ByRef Arr As Variant,
      Optional ByRef Delimiter As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Arr
[ByRef] Variant. An array of strings or variants to join together.
Delimiter
[ByRef] Optional. Variant. A string inserted between each element when joining into a string.
Index
[ByRef] Optional. Variant. The starting element in Arr to begin joining from.
Count
[ByRef] Optional. Variant. The number of strings elements to join together.

Return Values

String - A string containing elements joined from the array separated by the delimiter.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview


cString: LastIndexOfAny

LastIndexOfAny

Returns the index of the first character found in the OfAny set of characters searching from the end of the string.

 Public Function LastIndexOfAny(
      ByRef s As String,
      ByRef OfAny As Variant,
      Optional ByVal Index As Variant,
      Optional ByVal Count As Variant ) As Long

Parameters

s
[ByRef] String. The string to be searched.
OfAny
[ByRef] Variant. The set of characters to search for (String or Integer() Array).
Index
[ByVal] Optional. Variant. The starting index of s to begin searching.
Count
[ByVal] Optional. Variant. The number of characters in s to search.

Return Values

Long - The index of a character from the set, or -1 if none are found.

Remarks

The indexing of s is zero-based.

See Also

Project VBCorLib Overview | Class cString Overview


cString: PadLeft

PadLeft

Pads a strings left side.

 Public Function PadLeft(
      ByRef s As String,
      ByVal totalWidth As Long,
      Optional ByRef paddingChar As Variant = 32 ) As String

Parameters

s
[ByRef] String. The string to be padded.
totalWidth
[ByVal] Long. The total length of the final string.
paddingChar
[ByRef] Optional. Variant. The character to pad the left of the string with.

Default: 32

Return Values

String - The padded string.

Remarks

The paddingChar parameter can accept either a number or chr$ value.

See Also

Project VBCorLib Overview | Class cString Overview


cString: PadRight

PadRight

Pads a strings right side.

 Public Function PadRight(
      ByRef s As String,
      ByVal totalWidth As Long,
      Optional ByRef paddingChar As Variant = 32 ) As String

Parameters

s
[ByRef] String. The string to be padded.
totalWidth
[ByVal] Long. The total length of the final string.
paddingChar
[ByRef] Optional. Variant. The character to pad the right of the string with.

Default: 32

Return Values

String - The padded string.

Remarks

The paddingChar parameter can accept either a number or chr$ value.

See Also

Project VBCorLib Overview | Class cString Overview


cString: Remove

Remove

Removes a substring from the string, returning a new string with the gap filled with the remaining characters.

 Public Function Remove(
      ByRef s As String,
      ByVal StartIndex As Long,
      ByVal Count As Long ) As String

Parameters

s
[ByRef] String. The string to remove characters from.
StartIndex
[ByVal] Long. The index of the first character to begin removing. This index is zero-based.
Count
[ByVal] Long. The number of characters to be removed.

Return Values

String - A new string with the substring removed.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview


cString: ToCharArray

ToCharArray

Creates and array of chars (Integers) from the specified string.

 Public Function ToCharArray(
      ByRef s As String,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Length As Variant ) As Integer ( )

Parameters

s
[ByRef] String. The string to create the chars from.
StartIndex
[ByRef] Optional. Variant. The start index in the string to begin converting to a char array. This is zero-based.
Length
[ByRef] Optional. Variant. The number of characters to convert to chars.

Return Values

Integer() - An array containing the converted characters from the string.

Remarks

See Also

Project VBCorLib Overview | Class cString Overview


cString: Trim

Trim

Trims both the beginning and end of the string.

 Public Function Trim(
      ByRef s As String,
      Optional ByRef TrimChars As Variant ) As String

Parameters

s
[ByRef] String. The string to be trimmed.
TrimChars
[ByRef] Optional. Variant. The characters to remove.

Return Values

String - The trimmed string.

Remarks

Unlike VBs Trim function, this can trim multiple character types, not just spaces.

The trimChars can be either a string of the characters or an integer array of characters that will be trimmed from both ends.

See Also

Project VBCorLib Overview | Class cString Overview


cString: TrimEnd

TrimEnd

Trims the end of the string.

 Public Function TrimEnd(
      ByRef s As String,
      Optional ByRef TrimChars As Variant ) As String

Parameters

s
[ByRef] String. The string to be trimmed.
TrimChars
[ByRef] Optional. Variant. The characters to remove.

Return Values

String - The trimmed string.

Remarks

Unlike VBs RTrim function, this can trim multiple character types, not just spaces.

The trimChars can be either a string of the characters or an integer array of characters that will be trimmed from the end.

See Also

Project VBCorLib Overview | Class cString Overview


cString: TrimStart

TrimStart

Trims the beginning of the string.

 Public Function TrimStart(
      ByRef s As String,
      Optional ByRef TrimChars As Variant ) As String

Parameters

s
[ByRef] String. The string to be trimmed.
TrimChars
[ByRef] Optional. Variant. The characters to remove.

Return Values

String - The trimmed string.

Remarks

Unlike VBs LTrim function, this can trim multiple character types, not just spaces.

The trimChars can be either a string of the characters or an integer array of characters that will be trimmed from the beginning.

See Also

Project VBCorLib Overview | Class cString Overview


CultureInfo

CultureInfo

Represents information about a culture, such as number and date formatting.

See Also

Project VBCorLib Overview Constructors | CultureInfoStatic | ICloneable | IFormatProvider

Implements:

ICloneable
IFormatProvider
IObject

Public:

Properties:

Name | Description
Calendar (get) | Returns the default calendar for the current culture.
DateTimeFormat (get) | Returns the DateTimeFormatInfo associated with this culture.
DateTimeFormat (set) | Sets the DateTimeFormatInfo for the specific culture object.
DisplayName (get) | Returns a displayable name for the culture name.
EnglishName (get) | Returns the english translation for the culture name.
IsNeutralCulture (get) | Returns if this culture is neutral.
IsReadOnly (get) | Returns if this instance is ReadOnly.
LCID (get) | Returns the Locale ID for this culture instance.
Name (get) | Returns the name of the culture.
NativeName (get) | Returns the native name for this culture instance.
NumberFormat (get) | Returns the NumberFormatInfo associated with this culture.
NumberFormat (set) | Sets the NumberFormatInfo for the specific culture object.
OptionalCalendars (get) | Returns a list of optional calendars supported by the culture.
Parent (get) | Returns the parent culture for this culture.
ThreeLetterISOLanguageName (get) | Returns the 3 letter ISO 639-2 standard of the culture name.
ThreeLetterWindowsLanguageName (get) | Returns the 3 letter Windows name of the culture name.
TwoLetterISOLanguageName (get) | Returns the 2 letter ISO 639-1 standard of the culture name.
UseUserOverride (get) | Returns whether the culture instance is using the user settings.

Methods:

Name | Description
Clone | Returns a clone of this culture instance.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetFormat | Returns a format provider of the specified type.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


CultureInfo: Calendar (get)

Calendar

Returns the default calendar for the current culture.

 Public Property Get Calendar ( ) As Calendar

Return Values

Calendar - The calendar associated with the current culture.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: Clone

Clone

Returns a clone of this culture instance.

 Public Function Clone ( ) As CultureInfo

Return Values

CultureInfo - An instance of this culture. ReadOnly status is retained.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: DateTimeFormat (get)

DateTimeFormat

Returns the DateTimeFormatInfo associated with this culture.

 Public Property Get DateTimeFormat ( ) As DateTimeFormatInfo

Return Values

DateTimeFormatInfo - The DateTimeFormatInfo for this culture that can be used to format dates and times specific to this culture.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: DateTimeFormat (set)

DateTimeFormat

Sets the DateTimeFormatInfo for the specific culture object.

 Public Property Set DateTimeFormat(
      ByVal RHS As DateTimeFormatInfo )

Parameters

RHS
[ByVal] DateTimeFormatInfo. The DateTimeFormatInfo object to associate with this object instance.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: DisplayName (get)

DisplayName

Returns a displayable name for the culture name.

 Public Property Get DisplayName ( ) As String

Return Values

String - The name as it should be displayed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: EnglishName (get)

EnglishName

Returns the english translation for the culture name.

 Public Property Get EnglishName ( ) As String

Return Values

String - The name in the english language.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: GetFormat

GetFormat

Returns a format provider of the specified type.

 Public Function GetFormat(
      ByVal FormatType As String ) As Object

Parameters

FormatType
[ByVal] String. The type of format provider that is requested.

Return Values

Object - The format provider, or Nothing if a provider was not found.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: IFormatProvider

IFormatProvider

 Implements IFormatProvider

Return Values

IFormatProvider -

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: IsNeutralCulture (get)

IsNeutralCulture

Returns if this culture is neutral.

 Public Property Get IsNeutralCulture ( ) As Boolean

Return Values

Boolean - Indication of the cultures neutrality.

Remarks

A neutral culture is a culture that has no region specified. en is a neutral culture, where as en-US is not.

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: IsReadOnly (get)

IsReadOnly

Returns if this instance is ReadOnly.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - The readonly status of this instance.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: LCID (get)

LCID

Returns the Locale ID for this culture instance.

 Public Property Get LCID ( ) As Long

Return Values

Long - The Locale ID.

Remarks

A 32 bit LCID is in the format of: 31 - 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +-----+ +---------+ +---------------+ +-----------------+ | | | Primary language ID (10 bits) | | +----------- Sublanguage ID (6 its) | +----------------------- Sort ID (4 bits) +--------------------------------- Reserved (12 bits)

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: Name (get)

Name

Returns the name of the culture.

 Public Property Get Name ( ) As String

Return Values

String - The name of the culture.

Remarks

The culture name follows the RFC 1766 standard in that there are 2 parts. A 2 letter culture and 2 letter region: en-US = English (United States)

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: NativeName (get)

NativeName

Returns the native name for this culture instance.

 Public Property Get NativeName ( ) As String

Return Values

String - The name using native characters to spell the culture name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: NumberFormat (get)

NumberFormat

Returns the NumberFormatInfo associated with this culture.

 Public Property Get NumberFormat ( ) As NumberFormatInfo

Return Values

NumberFormatInfo - The NumberFormatInfo for this culture that can be used to format numbers specific to this culture.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: NumberFormat (set)

NumberFormat

Sets the NumberFormatInfo for the specific culture object.

 Public Property Set NumberFormat(
      ByVal RHS As NumberFormatInfo )

Parameters

RHS
[ByVal] NumberFormatInfo. The NumberFormatInfo to associate with this object instance.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: OptionalCalendars (get)

OptionalCalendars

Returns a list of optional calendars supported by the culture.

 Public Property Get OptionalCalendars ( ) As Calendar ( )

Return Values

Calendar() - A list of calendars associated with the current culture.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: Parent (get)

Parent

Returns the parent culture for this culture.

 Public Property Get Parent ( ) As CultureInfo

Return Values

CultureInfo - The parent culture for this culture. If this culture is invariant, then invariant is returned.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: ThreeLetterISOLanguageName (get)

ThreeLetterISOLanguageName

Returns the 3 letter ISO 639-2 standard of the culture name.

 Public Property Get ThreeLetterISOLanguageName ( ) As String

Return Values

String - The name of the culture in three letters.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: ThreeLetterWindowsLanguageName (get)

ThreeLetterWindowsLanguageName

Returns the 3 letter Windows name of the culture name.

 Public Property Get ThreeLetterWindowsLanguageName ( ) As String

Return Values

String - The name of the culture found in windows.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: TwoLetterISOLanguageName (get)

TwoLetterISOLanguageName

Returns the 2 letter ISO 639-1 standard of the culture name.

 Public Property Get TwoLetterISOLanguageName ( ) As String

Return Values

String - The name of the culture in 2 letters.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfo: UseUserOverride (get)

UseUserOverride

Returns whether the culture instance is using the user settings.

 Public Property Get UseUserOverride ( ) As Boolean

Return Values

Boolean - Indication as to if the culture is using the user setting defined in the control panel.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfo Overview


CultureInfoStatic

CultureInfoStatic

Provides a set of static methods retrieve CultureInfo objects.

Remarks

This class cannot be instantiated. In order to access the methods use the variable name directly.

 Dim Cultures() As CultureInfo
 Cultures = Culture.GetCultures(AllCultures)

See Also

Project VBCorLib Overview | CultureInfo

Public:

Types:

Name | Description
CultureTypes | A list of culture type filters used in GetCultures.

Properties:

Name | Description
CurrentCulture (get) | Returns the current culture associated with this machine.
CurrentUICulture (get) | Returns the culture for the current thread.
InstalledUICulture (get) | Returns the culture for the current systems language.
InvariantCulture (get) | Returns a ReadOnly version of the invariant culture.

Methods:

Name | Description
GetCultures | Returns a set of CultureInfo objects.
ReadOnly | Returns a ReadOnly wrapped CultureInfo object.


CultureInfoStatic: CultureTypes

CultureTypes

A list of culture type filters used in GetCultures.

 Public Enum CultureTypes

Values

NeutralCultures = 1
1) Refers to cultures that are associated with a language but are not specific to a country/region. The names of these cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture. The invariant culture is included in the array of cultures returned by CultureInfo.GetCultures with this value.
SpecificCultures = 2
2) Refers to cultures that are specific to a country/region. The names of these cultures follow the RFC 1766 standard in the format "-", where is a lowercase two-letter code derived from ISO 639-1 and is an uppercase two-letter code derived from ISO 3166. For example, "en-US" (English - United States) is a specific culture.
InstalledWin32Cultures = 4
4) Refers to all cultures that are installed in the Windows system. Note that not all cultures supported by the .NET Framework are installed in the Windows system.
AllCultures = 7
7) Refers to all cultures.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: CurrentCulture (get)

CurrentCulture

Returns the current culture associated with this machine.

 Public Property Get CurrentCulture ( ) As CultureInfo

Return Values

CultureInfo - A ReadOnly version of CultureInfo specific for this machine.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: CurrentUICulture (get)

CurrentUICulture

Returns the culture for the current thread.

 Public Property Get CurrentUICulture ( ) As CultureInfo

Return Values

CultureInfo - A CultureInfo object for the current thread.

Remarks

The culture is determined by the language ID of the current thread by calling GetUserDefaultUILanguage API.

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: GetCultures

GetCultures

Returns a set of CultureInfo objects.

 Public Function GetCultures(
      ByVal Types As CultureTypes ) As CultureInfo ( )

Parameters

Types
[ByVal] CultureTypes. The culture types that are to be retrieved.

Return Values

CultureInfo() - An array of CultureInfo objects based on Types specified.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: InstalledUICulture (get)

InstalledUICulture

Returns the culture for the current systems language.

 Public Property Get InstalledUICulture ( ) As CultureInfo

Return Values

CultureInfo - A CultureInfo object for the current system language.

Remarks

The current system language is detemined by calling the GetSystemDefaultUILanguage API.

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: InvariantCulture (get)

InvariantCulture

Returns a ReadOnly version of the invariant culture.

 Public Property Get InvariantCulture ( ) As CultureInfo

Return Values

CultureInfo - A ReadOnly version of the invariant culture.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


CultureInfoStatic: ReadOnly

ReadOnly

Returns a ReadOnly wrapped CultureInfo object.

 Public Function ReadOnly(
      ByVal Culture As CultureInfo ) As CultureInfo

Parameters

Culture
[ByVal] CultureInfo. The culture to create a ReadOnly wrapper for.

Return Values

CultureInfo - The wrapped ReadOnly culture.

Remarks

See Also

Project VBCorLib Overview | Class CultureInfoStatic Overview


DateTimeFormatInfo

DateTimeFormatInfo

Provides a repository of formatting information to be used in formatting cDateTime and Date values to match that of a specific locale.

Remarks

Formatting dates can vary greatly across multiple cultures. Each culture can provide formatting information that is specific to itself. A DateTimeFormatInfo object contains all the formatting information necessary to create a wide range of formatted dates and times. Also, this class provides a Format method to allow for directly formatting dates and times.
The following table lists standard formats to be used when formatting dates. The format characters are associated with the DateTimeFormatInfo class in representing date formats. The characters are case-sensitive.

This table is taken from Microsoft .NET 1.1 MSDN.
Format Character | Description and Associated Properties
d | ShortDatePattern
D | LongDatePattern
f | Full Date and Time (Long Date and Short Time)
F | FullDateTimePattern (Long Date and Long Time)
g | General (Short Date and Short Time)
G | General (Short Date and Long Time)
m,M | MonthDayPattern
r,R | RFC1123Pattern
s | SortableDateTimePattern
t | ShortTimePattern
T | LongTimePattern
u | UniversalSortableDateTimePattern
U | Full Date and Time (Long Date, Long Time) using universal time
y,Y | YearMonthPattern
The following table lists custom formatting characters that are used to create custom date formats. Characters and whitespace contained within a pair of single or double quotes will be included in the output. The format characters are case-sensitive, so "MM" is recognized, but "mm" is not.
Format Character | Description and Associated Properties
d | The day of the month. Single-digit days will not have a leading zero.
dd | The day of the month. Single-digit days will have a leading zero.
ddd | The abbreviated name of the day of the week, as defined in AbbreviatedDayNames.
dddd | The full name of the day of the week, as defined in DayNames.
M | The numeric month. Single-digit months will not have a leading zero.
MM | The numeric month. Single-digit months will have a leading zero.
MMM | The abbreviated name of the month, as defined in AbbreviatedMonthNames.
MMMM | The full name of the month, as defined in MonthNames.
y | The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.
yy | The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.
yyyy | The year in four digits, including the century.
h | The hour in a 12-hour clock. Single-digit hours will not have a leading zero.
hh | The hour in a 12-hour clock. Single-digit hours will have a leading zero.
H | The hour in a 24-hour clock. Single-digit hours will not have a leading zero.
HH | The hour in a 24-hour clock. Single-digit hours will have a leading zero.
m | The minute. Single-digit minutes will not have a leading zero.
mm | The minute. Single-digit minutes will have a leading zero.
s | The second. Single-digit seconds will not have a leading zero.
ss | The second. Single-digit seconds will have a leading zero.
f | The fraction of a second in single-digit precision. The remaining digits are truncated.
ff | The fraction of a second in double-digit precision. The remaining digits are truncated.
fff | The fraction of a second in three-digit precision. The remaining digits are truncated.
ffff | The fraction of a second in four-digit precision. The remaining digits are truncated.
fffff | The fraction of a second in five-digit precision. The remaining digits are truncated.
ffffff | The fraction of a second in six-digit precision. The remaining digits are truncated.
fffffff | The fraction of a second in seven-digit precision. The remaining digits are truncated.
t | The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any.
tt | The AM/PM designator defined in AMDesignator or PMDesignator, if any.
z | The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8".
zz | The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".
zzz | The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".
: | The default time separator defined in TimeSeparator.
/ | The default date separator defined in DateSeparator.
%c | Where c is a format pattern if used alone. The "%" character can be omitted if the format pattern is combined with literal characters or other format patterns.
\c | Where c is any character. Displays the character literally. To display the backslash character, use "\\".

See Also

Project VBCorLib Overview | DateTimeFormatInfoStatic | ICloneable | IFormatProvider

Implements:

ICloneable
IFormatProvider
IObject

Public:

Properties:

Name | Description
AbbreviatedDayNames (get) | Returns an array of abbreviated weekday names.
AbbreviatedDayNames (let) | Sets the weekday names to be used by this FormatProvider.
AbbreviatedMonthNames (get) | Returns an array of names for all the months.
AbbreviatedMonthNames (let) | Sets the abbreviated month names to be used by the formatter.
AMDesignator (get) | Returns the string that is displayed for times from 12:00:00 AM to 11:59:59 AM.
AMDesignator (let) | Sets the string that is display for times from 12:00:00 AM to 11:59:59 AM.
Calendar (get) | Returns the Calendar associated with this DateTimeFormatInfo.
Calendar (set) | Sets the calendar associated with this DateTimeFormatInfo.
CalendarWeekRule (get) | Returns the definition of the first week of the calendar year.
CalendarWeekRule (let) | Sets the definition of the first week for the calendar year.
DateSeparator (get) | Returns the string that is displayed when separating the components of a date, such as year, month, day.
DateSeparator (let) | Sets the string that is display when separating the components of a date, such as year, month, day.
DayNames (get) | Returns the names of the weekdays.
DayNames (let) | Sets the names for the weekdays.
FirstDayOfWeek (get) | Returns the first day of the week.
FirstDayOfWeek (let) | Sets the first day of the week.
FullDateTimePattern (get) | Returns a formatting pattern that represents a full date and time associated with the F' formatting command.
FullDateTimePattern (let) | Sets the formatting pattern used for a full date and time formatting, and is associated with the F' formatting command.
IsReadOnly (get) | Returns if this formatter is ReadOnly.
LongDatePattern (get) | Returns a pattern for formatting just the date portion and is associated with the D' formatting command.
LongDatePattern (let) | Sets a pattern used for formatting just the date portion and is associated with the D' formatting command.
LongTimePattern (get) | Returns a pattern used in formatting the time portion and is associated with the T' formatting command.
LongTimePattern (let) | Sets the pattern used to format the time part when using the T' formatting command.
MonthDayPattern (get) | Returns the month/day pattern associated with either m' or 'M' formatting commands.
MonthDayPattern (let) | Sets the month/day formatting pattern associated with either m' or 'M' formatting commands.
MonthNames (get) | Returns the full names for the months of the year.
MonthNames (let) | Sets the full month names to be used by the formatter.
PMDesignator (get) | Returns the string diplayed for times between 12:00:00 PM and 12:00:00 AM.
PMDesignator (let) | Sets the string display for times between 12:00:00 PM and 12:00:00 AM.
RFC1123Pattern (get) | Returns the pattern as specified by RFC-1123 and associated with the r' or 'R' formatting commands.
ShortDatePattern (get) | Returns the pattern for short date formatting associated with the d' formatting command.
ShortDatePattern (let) | Sets the pattern used in formatting dates with the d' formatting command.
ShortTimePattern (get) | Returns the formatting pattern for a short time using the t' formatting command.
ShortTimePattern (let) | Sets the formatting pattern for a short time using the t' formatting command.
SortableDateTimePattern (get) | Returns a pattern that can be used in string sorting to produce an ascending sort with string based dates and times. This pattern is associated with the s' formatting command.
TimeSeparator (get) | Returns the separator of time components, such as hours, minutes, seconds.
TimeSeparator (let) | Set the separator for time components.
UniversalSortableDateTimePattern (get) | Returns a string sortable pattern that is associated with the u' or 'U' formatting commands.
YearMonthPattern (get) | Returns the pattern representing a YearMonth combination. This is associated with the y' or 'Y' formatting commands.
YearMonthPattern (let) | Sets the pattern that represents a YearMonth combination. This is associated with the y' or 'Y' formatting commands.

Methods:

Name | Description
Clone | Returns a clone of this instance. If this instance is ReadOnly, the clone will also be ReadOnly.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Format | Formats a cDateTime object or Date value in the pattern specified by the formatting command. If no command is specified, then G' is assumed. If the command cannot be found, then a custom pattern is assumed.
GetAbbreviatedDayName | Returns the abbreviated name for the specified day-of-the-week.
GetAbbreviatedEraName | Returns the name of the Era specified.
GetAbbreviatedMonthName | Retrieves the abbreviated name for a given month.
GetAllDateTimePatterns | Returns all of the patterns for a specified formatting command. Or if no command is specified, then all of the patterns are returned.
GetDayName | Returns the full name for the day of the week.
GetEra | Returns the numeric era value based on the name provided.
GetEraName | Returns the full name of the specified.
GetFormat | Returns a format provider for the specified format type.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMonthName | Returns the full name of the specified month.
ToString | Returns a string representation of this object instance.


DateTimeFormatInfo: AbbreviatedDayNames (get)

AbbreviatedDayNames

Returns an array of abbreviated weekday names.

 Public Property Get AbbreviatedDayNames ( ) As String ( )

Return Values

String() - A string array containing the abbreviated weekday names.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: AbbreviatedDayNames (let)

AbbreviatedDayNames

Sets the weekday names to be used by this FormatProvider.

 Public Property Let AbbreviatedDayNames(
      ByRef RHS ( ) As String )

Parameters

RHS
[ByRef] String. An array of weekday names to be uses as abbreviated weekday names.

Remarks

The array must contain exactly 7 days. If the DateTimeFormatInfo is ReadOnly then an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: AbbreviatedMonthNames (get)

AbbreviatedMonthNames

Returns an array of names for all the months.

 Public Property Get AbbreviatedMonthNames ( ) As String ( )

Return Values

String() - The array of names for all of the months.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: AbbreviatedMonthNames (let)

AbbreviatedMonthNames

Sets the abbreviated month names to be used by the formatter.

 Public Property Let AbbreviatedMonthNames(
      ByRef RHS ( ) As String )

Parameters

RHS
[ByRef] String. The array of month names to be used.

Remarks

There must be exactly 13 months. Some cultures have 13 months in the year. For those cultures that only have 12, and empty string as the 13 is all that is needed.
If the formatter is ReadOnly, an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: AMDesignator (get)

AMDesignator

Returns the string that is displayed for times from 12:00:00 AM to 11:59:59 AM.

 Public Property Get AMDesignator ( ) As String

Return Values

String - The AM designator. Generally AM' is used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: AMDesignator (let)

AMDesignator

Sets the string that is display for times from 12:00:00 AM to 11:59:59 AM.

 Public Property Let AMDesignator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new AM designator.

Remarks

If this formatter is ReadOnly, an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: Calendar (get)

Calendar

Returns the Calendar associated with this DateTimeFormatInfo.

 Public Property Get Calendar ( ) As Calendar

Return Values

Calendar - A calendar object.

Remarks

If no calendar is associated then a GregorianCalendar is returned.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: Calendar (set)

Calendar

Sets the calendar associated with this DateTimeFormatInfo.

 Public Property Set Calendar(
      ByVal RHS As Calendar )

Parameters

RHS
[ByVal] Calendar. The calendar to associate with this object.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: CalendarWeekRule (get)

CalendarWeekRule

Returns the definition of the first week of the calendar year.

 Public Property Get CalendarWeekRule ( ) As CalendarWeekRule

Return Values

CalendarWeekRule - A CalendarWeekRule value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: CalendarWeekRule (let)

CalendarWeekRule

Sets the definition of the first week for the calendar year.

 Public Property Let CalendarWeekRule(
      ByVal RHS As CalendarWeekRule )

Parameters

RHS
[ByVal] CalendarWeekRule. A CalendarWeekRule value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: Clone

Clone

Returns a clone of this instance. If this instance is ReadOnly, the clone will also be ReadOnly.

 Public Function Clone ( ) As DateTimeFormatInfo

Return Values

DateTimeFormatInfo -

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: DateSeparator (get)

DateSeparator

Returns the string that is displayed when separating the components of a date, such as year, month, day.

 Public Property Get DateSeparator ( ) As String

Return Values

String - The date separator string. Generally this is /'.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: DateSeparator (let)

DateSeparator

Sets the string that is display when separating the components of a date, such as year, month, day.

 Public Property Let DateSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new date separator. Generally this is /'.

Remarks

If this formatter is ReadOnly, an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: DayNames (get)

DayNames

Returns the names of the weekdays.

 Public Property Get DayNames ( ) As String ( )

Return Values

String() - An array containing the full names of the weekdays.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: DayNames (let)

DayNames

Sets the names for the weekdays.

 Public Property Let DayNames(
      ByRef RHS ( ) As String )

Parameters

RHS
[ByRef] String. An array containing the weekday names to be used.

Remarks

There must be exactly 7 names. If this formatter is ReadOnly, an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: FirstDayOfWeek (get)

FirstDayOfWeek

Returns the first day of the week.

 Public Property Get FirstDayOfWeek ( ) As DayOfWeek

Return Values

DayOfWeek - The enum for the first day of the week.

Remarks

This DayOfWeek is 0 based, unlike VBs vbDayOfWeek which is 1 based.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: FirstDayOfWeek (let)

FirstDayOfWeek

Sets the first day of the week.

 Public Property Let FirstDayOfWeek(
      ByVal RHS As DayOfWeek )

Parameters

RHS
[ByVal] DayOfWeek. The enum for the first day of the week.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: Format

Format

Formats a cDateTime object or Date value in the pattern specified by the formatting command. If no command is specified, then G' is assumed. If the command cannot be found, then a custom pattern is assumed.

 Public Function Format(
      ByRef Value As Variant,
      Optional ByVal fmt As String ) As String

Parameters

Value
[ByRef] Variant. The date to be formatted.
fmt
[ByVal] Optional. String. The formatting command or custom pattern to format the date to.

Return Values

String - The formatted date value.

Remarks

Formatting can be accomplished by either specifying a formatting command, or entering a custom date format.

D - LongDatePattern
d - ShortDateTimePattern
F - FullDateTimePattern (Long Date and Long Time)
f - Full date and time (Long Date and Short Time)
G - General (Short Date and Long Time)
g - General (Short Date and Short Time)
m,M - MonthDayPattern
r,R - RFC1123Pattern
s - SortableDateTimePattern
T - LongTimePattern
t - ShortTimePattern
U - Full Date and Time (Long Date, Long Time) using universal time
u - UniversalSortableDateTimePattern
y,Y - YearMonthPattern

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: FullDateTimePattern (get)

FullDateTimePattern

Returns a formatting pattern that represents a full date and time associated with the F' formatting command.

 Public Property Get FullDateTimePattern ( ) As String

Return Values

String - The full date and time pattern.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: FullDateTimePattern (let)

FullDateTimePattern

Sets the formatting pattern used for a full date and time formatting, and is associated with the F' formatting command.

 Public Property Let FullDateTimePattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new full date and time formatting pattern.

Remarks

If this formatter is ReadOnly, an exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetAbbreviatedDayName

GetAbbreviatedDayName

Returns the abbreviated name for the specified day-of-the-week.

 Public Function GetAbbreviatedDayName(
      ByVal dow As DayOfWeek ) As String

Parameters

dow
[ByVal] DayOfWeek. The Day-Of-Week to get the name of.

Return Values

String - The abbreviated version of the name for the day-of-week.

Remarks

DayOfWeek is 0 based. It is not identical to the vbDayOfweek, which is 1 based.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetAbbreviatedEraName

GetAbbreviatedEraName

Returns the name of the Era specified.

 Public Function GetAbbreviatedEraName(
      ByVal Era As Long ) As String

Parameters

Era
[ByVal] Long. The era to retrieve the name for.

Return Values

String - The name of the era.

Remarks

Eras are identified by number. The gregorian calendar has two era, BC and AD. Only AD is recognized in this case by a number 1.

This feature is not fully implemented. It will only return AD' regardless of the culture.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetAbbreviatedMonthName

GetAbbreviatedMonthName

Retrieves the abbreviated name for a given month.

 Public Function GetAbbreviatedMonthName(
      ByVal Month As Long ) As String

Parameters

Month
[ByVal] Long. The month number in the calendar starting at 1.

Return Values

String - The name of the specified month.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetAllDateTimePatterns

GetAllDateTimePatterns

Returns all of the patterns for a specified formatting command. Or if no command is specified, then all of the patterns are returned.

 Public Function GetAllDateTimePatterns(
      Optional ByRef Format As Variant ) As String ( )

Parameters

Format
[ByRef] Optional. Variant. The formatting command to retrieve all the patterns for.

Return Values

String() - An array of all the requested formatting patterns.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetDayName

GetDayName

Returns the full name for the day of the week.

 Public Function GetDayName(
      ByVal dow As DayOfWeek ) As String

Parameters

dow
[ByVal] DayOfWeek. The day of the week to get the name for.

Return Values

String - The name for the day of the week.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetEra

GetEra

Returns the numeric era value based on the name provided.

 Public Function GetEra(
      ByRef eraName As String ) As Long

Parameters

eraName
[ByRef] String. The name of the era to retrieve the numeric value for.

Return Values

Long - The numeric value for the era.

Remarks

This method is not fully implemented. It will return 1 for all era names and cultures.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetEraName

GetEraName

Returns the full name of the specified.

 Public Function GetEraName(
      ByVal Era As Long ) As String

Parameters

Era
[ByVal] Long. The numerical era in which to retrieve the name for.

Return Values

String - The full era name.

Remarks

This method is not fully implements. It will return A.D.' for all numbers and cultures.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetFormat

GetFormat

Returns a format provider for the specified format type.

 Public Function GetFormat(
      ByRef FormatType As String ) As Object

Parameters

FormatType
[ByRef] String. The name of the formatting type requested.

Return Values

Object - The formatting provider, or Nothing is none is available.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: GetMonthName

GetMonthName

Returns the full name of the specified month.

 Public Function GetMonthName(
      ByVal Month As Long ) As String

Parameters

Month
[ByVal] Long. The month to retrieve the name for.

Return Values

String - The full name of the month.

Remarks

The valid range is 1 to 13.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: IFormatProvider

IFormatProvider

 Implements IFormatProvider

Return Values

IFormatProvider -

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: IsReadOnly (get)

IsReadOnly

Returns if this formatter is ReadOnly.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Indication if is ReadOnly or not.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: LongDatePattern (get)

LongDatePattern

Returns a pattern for formatting just the date portion and is associated with the D' formatting command.

 Public Property Get LongDatePattern ( ) As String

Return Values

String - A date-only formatting.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: LongDatePattern (let)

LongDatePattern

Sets a pattern used for formatting just the date portion and is associated with the D' formatting command.

 Public Property Let LongDatePattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The pattern used to format the date.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: LongTimePattern (get)

LongTimePattern

Returns a pattern used in formatting the time portion and is associated with the T' formatting command.

 Public Property Get LongTimePattern ( ) As String

Return Values

String - The time-only formatting pattern.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: LongTimePattern (let)

LongTimePattern

Sets the pattern used to format the time part when using the T' formatting command.

 Public Property Let LongTimePattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new formatting pattern.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: MonthDayPattern (get)

MonthDayPattern

Returns the month/day pattern associated with either m' or 'M' formatting commands.

 Public Property Get MonthDayPattern ( ) As String

Return Values

String - The MonthDay formatting pattern.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: MonthDayPattern (let)

MonthDayPattern

Sets the month/day formatting pattern associated with either m' or 'M' formatting commands.

 Public Property Let MonthDayPattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new Month/Day pattern

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: MonthNames (get)

MonthNames

Returns the full names for the months of the year.

 Public Property Get MonthNames ( ) As String ( )

Return Values

String() - An array containing the full month names.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: MonthNames (let)

MonthNames

Sets the full month names to be used by the formatter.

 Public Property Let MonthNames(
      ByRef RHS ( ) As String )

Parameters

RHS
[ByRef] String. The array of month names.

Remarks

There must be exactly 13 months. Some cultures have 13 months in a calendar year. If a culture only has 12 months, then 13th month is empty. If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: PMDesignator (get)

PMDesignator

Returns the string diplayed for times between 12:00:00 PM and 12:00:00 AM.

 Public Property Get PMDesignator ( ) As String

Return Values

String - The current PM designator. Generally this is PM'.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: PMDesignator (let)

PMDesignator

Sets the string display for times between 12:00:00 PM and 12:00:00 AM.

 Public Property Let PMDesignator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new PM designator. Generally this is PM'.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: RFC1123Pattern (get)

RFC1123Pattern

Returns the pattern as specified by RFC-1123 and associated with the r' or 'R' formatting commands.

 Public Property Get RFC1123Pattern ( ) As String

Return Values

String - The RFC-1123 pattern .

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ShortDatePattern (get)

ShortDatePattern

Returns the pattern for short date formatting associated with the d' formatting command.

 Public Property Get ShortDatePattern ( ) As String

Return Values

String - The formatting pattern for a short date.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ShortDatePattern (let)

ShortDatePattern

Sets the pattern used in formatting dates with the d' formatting command.

 Public Property Let ShortDatePattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new short date formatting pattern.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ShortTimePattern (get)

ShortTimePattern

Returns the formatting pattern for a short time using the t' formatting command.

 Public Property Get ShortTimePattern ( ) As String

Return Values

String - The short time formatting pattern.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ShortTimePattern (let)

ShortTimePattern

Sets the formatting pattern for a short time using the t' formatting command.

 Public Property Let ShortTimePattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new short time formatting pattern.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: SortableDateTimePattern (get)

SortableDateTimePattern

Returns a pattern that can be used in string sorting to produce an ascending sort with string based dates and times. This pattern is associated with the s' formatting command.

 Public Property Get SortableDateTimePattern ( ) As String

Return Values

String - The string sortable pattern .

Remarks

This pattern is the same across all cultures.

Read Only.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: TimeSeparator (get)

TimeSeparator

Returns the separator of time components, such as hours, minutes, seconds.

 Public Property Get TimeSeparator ( ) As String

Return Values

String - The time component separator.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: TimeSeparator (let)

TimeSeparator

Set the separator for time components.

 Public Property Let TimeSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new time component separator.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: UniversalSortableDateTimePattern (get)

UniversalSortableDateTimePattern

Returns a string sortable pattern that is associated with the u' or 'U' formatting commands.

 Public Property Get UniversalSortableDateTimePattern ( ) As String

Return Values

String - The UniversalSortableDateTimePattern .

Remarks

The pattern can be used to sort string representations of a date using the universal time designator "Z". This pattern is the same across all cultures.

Read Only.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: YearMonthPattern (get)

YearMonthPattern

Returns the pattern representing a YearMonth combination. This is associated with the y' or 'Y' formatting commands.

 Public Property Get YearMonthPattern ( ) As String

Return Values

String - The YearMonth formatting pattern.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfo: YearMonthPattern (let)

YearMonthPattern

Sets the pattern that represents a YearMonth combination. This is associated with the y' or 'Y' formatting commands.

 Public Property Let YearMonthPattern(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new YearMonth formatting pattern.

Remarks

If this formatter is ReadOnly, an exception is thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfo Overview


DateTimeFormatInfoStatic

DateTimeFormatInfoStatic

Provides static methods to retrieve various DateTimeFormatInfo objects.

Remarks

This class cannot be directly instantiated. To access the methods use the variable directly.

 Dim Culture As CultureInfo
 Set Culture = CultureInfo.CurrentInfo

See Also

Project VBCorLib Overview | DateTimeFormatInfo

Public:

Properties:

Name | Description
CurrentInfo (get) | Returns the DateTimeFormatInfo object associated with the current CultureInfo.
InvariantInfo (get) | Returns the DateTimeFormatInfo object from the Invariant culture type.

Methods:

Name | Description
GetInstance | Returns the DateTimeFormatInfo object associated with the supplied IFormatProvider.
ReadOnly | Returns a ReadOnly version of a DateTimeFormatInfo object.


DateTimeFormatInfoStatic: CurrentInfo (get)

CurrentInfo

Returns the DateTimeFormatInfo object associated with the current CultureInfo.

 Public Property Get CurrentInfo ( ) As DateTimeFormatInfo

Return Values

DateTimeFormatInfo - The DateTimeFormatInfo for the current CultureInfo of this thread.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfoStatic Overview


DateTimeFormatInfoStatic: GetInstance

GetInstance

Returns the DateTimeFormatInfo object associated with the supplied IFormatProvider.

 Public Function GetInstance(
      ByVal FormatProvider As IFormatProvider ) As DateTimeFormatInfo

Parameters

FormatProvider
[ByVal] IFormatProvider. The provider of the DateTimeFormatInfo object.

Return Values

DateTimeFormatInfo - The DateTimeFormatInfo object from the provider.

Remarks

If the provider does not have a DateTimeFormatInfo object, then Nothing is returned.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfoStatic Overview


DateTimeFormatInfoStatic: InvariantInfo (get)

InvariantInfo

Returns the DateTimeFormatInfo object from the Invariant culture type.

 Public Property Get InvariantInfo ( ) As DateTimeFormatInfo

Return Values

DateTimeFormatInfo - A DateTimeFormatInfo object that is a general case. This returns the same formatting set of information as using New DateTimeFormatInfo.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfoStatic Overview


DateTimeFormatInfoStatic: ReadOnly

ReadOnly

Returns a ReadOnly version of a DateTimeFormatInfo object.

 Public Function ReadOnly(
      ByVal Info As DateTimeFormatInfo ) As DateTimeFormatInfo

Parameters

Info
[ByVal] DateTimeFormatInfo. The DateTimeFormatInfo object to create a ReadOnly version of.

Return Values

DateTimeFormatInfo - A ReadOnly version of the supplied DateTimeFormatInfo object.

Remarks

If the supplied DateTimeFormatInfo object is already ReadOnly, then that object is returned.

See Also

Project VBCorLib Overview | Class DateTimeFormatInfoStatic Overview


DayLightTime

DayLightTime

Represents the start and end times for a daylight savings period, and the difference between daylight savings time and standard time.

See Also

Project VBCorLib Overview Constructors | TimeZone | TimeZoneStatic

Implements:

IObject

Public:

Properties:

Name | Description
Delta (get) | Returns the difference between stadard time and daylight savings.
EndTime (get) | Returns the date for when the daylight savings period ends.
StartTime (get) | Returns the date for when the daylight savings period starts.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


DayLightTime: Delta (get)

Delta

Returns the difference between stadard time and daylight savings.

 Public Property Get Delta ( ) As TimeSpan

Return Values

TimeSpan - The difference between stadard time and daylight savings.

Remarks

This is the amount to change the current time when switching between standard and daylight savings time.

Read Only.

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: EndTime (get)

EndTime

Returns the date for when the daylight savings period ends.

 Public Property Get EndTime ( ) As cDateTime

Return Values

cDateTime - The date of the end of daylight savings.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: StartTime (get)

StartTime

Returns the date for when the daylight savings period starts.

 Public Property Get StartTime ( ) As cDateTime

Return Values

cDateTime - The date of the start of daylight savings.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DayLightTime Overview


DayLightTime: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DayLightTime Overview


Decoder

Decoder

Provides an interface to be used in converting blocks of bytes into unicode characters.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Equals | Returns an indication of equality with the passed in value.
GetCharCount | Returns the number of characters a block of bytes can produce.
GetChars | Returns the decoded unicode characters from a block of bytes.
GetHashCode | Returns a pseudo-unique number that describes this instance.
ToString | Returns a string representation of this instance.


Decoder: Equals

Equals

Returns an indication of equality with the passed in value.

 Public Function Equals(
      ByRef value As Variant ) As Boolean

Parameters

value
[ByRef] Variant. The value to test equality with.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class Decoder Overview


Decoder: GetCharCount

GetCharCount

Returns the number of characters a block of bytes can produce.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      ByVal Index As Long,
      ByVal Count As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to be used in decoding to characters.
Index
[ByVal] Long. The starting index in Bytes to begin decoding from.
Count
[ByVal] Long. The number of bytes to be used in the decoding process.

Return Values

Long - The number of characters that can be produced from Count number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class Decoder Overview


Decoder: GetChars

GetChars

Returns the decoded unicode characters from a block of bytes.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to be used in decoding to characters.
ByteIndex
[ByVal] Long. The starting index to begin decoding bytes into characters.
ByteCount
[ByVal] Long. The number of bytes to be used in the decoding process.
Chars
[ByRef] Integer. The output array for the decoded unicode characters.
CharIndex
[ByVal] Long. The starting index in the array to begin storing characters.

Return Values

Long - The number of characters actually decoded.

Remarks

See Also

Project VBCorLib Overview | Class Decoder Overview


Decoder: GetHashCode

GetHashCode

Returns a pseudo-unique number that describes this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A pseudo-unique number that describes this instance.

Remarks

See Also

Project VBCorLib Overview | Class Decoder Overview


Decoder: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that describes this instance.

Remarks

See Also

Project VBCorLib Overview | Class Decoder Overview


DES

DES

Represents a base interface that all DES algorithms should implement.

Remarks

Data Encryption Standard (DES) is a block cipher that uses a 56bit key encryption mechanism.

See Also

Project VBCorLib Overview | DESCryptoServiceProvider | SymmetricAlgorithm

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size in bits.
BlockSize (let) | Sets the block size in bits.
FeedbackSize (get) | Returns the feedback size in bits.
FeedbackSize (let) | Sets the feedback size in bits.
IV (get) | Returns the Initialization Vector (IV).
IV (let) | Sets the Initialization Vectory (IV).
Key (get) | Returns the secret key used by the cryptographic operation.
Key (let) | Sets the secret key to be used by the cryptographic operation.
KeySize (get) | Returns the size of the key, in bits, used by the cryptographic operation.
KeySize (let) | Sets the size of the key, in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the mode the current algoritm is set to.
Mode (let) | Sets the mode the current algorithm is set to.
Padding (get) | Returns the padding to be used by the algorithm.
Padding (let) | Sets the padding to be used by the algorithm.

Methods:

Name | Description
Clear | Releases all resources.
CreateDecryptor | Creates a new decryptor using the Data Encryption Standard algorithm.
CreateEncryptor | Creates a new encryptor using the Data Ecryption Standard algorithm.
Equals | Returns if this instance and the value are equal.
GenerateIV | Generates a new Initialization Vector array.
GenerateKey | Generates a new Key based on the key size.
GetHashCode | Returns a semi-unique value that represents this instance.
ToString | Returns a string representation of this instance.
ValidKeySize | Checks if the specific number of bits is a valid key size.


DES: BlockSize (get)

BlockSize

Returns the block size in bits.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

This always returns 64.

The block size is the amount of data that is processed as a single unit by the cipher. It will always require a block of 64 bits (8 bytes) to operate, therefore if a the last block to be operated on is not 64 bits in length it must be padded to meet the block size requirement. The padding is automatically performed by the routine

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: BlockSize (let)

BlockSize

Sets the block size in bits.

 Public Property Let BlockSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the block in bits.

Remarks

This always returns 64.

The block size is the amount of data that is processed as a single unit by the cipher. It will always require a block of 64 bits (8 bytes) to operate, therefore if a the last block to be operated on is not 64 bits in length it must be padded to meet the block size requirement. The padding is automatically performed by the routine

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Clear

Clear

Releases all resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: CreateDecryptor

CreateDecryptor

Creates a new decryptor using the Data Encryption Standard algorithm.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to decrypt the ciphered text back into plain text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to decrypt ciphered text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class DES Overview


DES: CreateEncryptor

CreateEncryptor

Creates a new encryptor using the Data Ecryption Standard algorithm.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to encrypt the plain text into ciphered text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to encrypt plain text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Equals

Equals

Returns if this instance and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare for equality.

Return Values

Boolean - Returns if the value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: FeedbackSize (get)

FeedbackSize

Returns the feedback size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The feedback size in bits.

Remarks

The always returns 64 bits.

The feedback size determines how much of the previous data processed is to be used on the next block of data. This is to prevent identical blocks of data to appear the same when encrypted.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: FeedbackSize (let)

FeedbackSize

Sets the feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of feedback in bits.

Remarks

DES only supports 64 bits.

The feedback size determines how much of the previous data processed is to be used on the next block of data. This is to prevent identical blocks of data to appear the same when encrypted.

Not all modes of DES support feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: GenerateIV

GenerateIV

Generates a new Initialization Vector array.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: GenerateKey

GenerateKey

Generates a new Key based on the key size.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: GetHashCode

GetHashCode

Returns a semi-unique value that represents this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns the semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: IV (get)

IV

Returns the Initialization Vector (IV).

 Public Property Get IV ( ) As Byte ( ) :

Return Values

Byte() - An array representing the IV.

Remarks

Only an 8-byte array is supported.

When the very first block of data is process there is no previous data to pull feedback data from, so the Initialization Vector is used as a dummy set of data for feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: IV (let)

IV

Sets the Initialization Vectory (IV).

 Public Property Let IV(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. A set of bytes representing the IV.

Remarks

Only an 8-byte array is supported.

When the very first block of data is process there is no previous data to pull feedback data from, so the Initialization Vector is used as a dummy set of data for feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Key (get)

Key

Returns the secret key used by the cryptographic operation.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - Returns the secret key.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Key (let)

Key

Sets the secret key to be used by the cryptographic operation.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new secret key to be used.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: KeySize (get)

KeySize

Returns the size of the key, in bits, used by the cryptographic operation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The size of the key in bits.

Remarks

This will aways return 64.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: KeySize (let)

KeySize

Sets the size of the key, in bits.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the key in bits.

Remarks

This will cause the Key property to reset and regenerate when needed.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal block sizes the cryptographic operation supports.

Remarks

Block sizes are represented in bits.

Read Only.

See Also

Project VBCorLib Overview | Class DES Overview


DES: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal key sizes the cryptographic operation supports.

Remarks

Key sizes are represented in bits.

Read Only.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Mode (get)

Mode

Returns the mode the current algoritm is set to.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - Returns a CipherMode value.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Mode (let)

Mode

Sets the mode the current algorithm is set to.

 Public Property Let Mode(
      ByVal RHS As CipherMode ) :

Parameters

RHS
[ByVal] CipherMode. The new mode for the algorithm.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Padding (get)

Padding

Returns the padding to be used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - A current padding being used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: Padding (let)

Padding

Sets the padding to be used by the algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode ) :

Parameters

RHS
[ByVal] PaddingMode. The new padding value to be used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class DES Overview


DES: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that represents this instance.

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DES: ValidKeySize

ValidKeySize

Checks if the specific number of bits is a valid key size.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. A value to determine if is a legal key size.

Return Values

Boolean - Returns True if the bit length is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class DES Overview


DESCryptoServiceProvider

DESCryptoServiceProvider

Defines a wrapper class around a DES cryptographic service provider.

Remarks

This provides access to the Windows CryptoAPI cryptography services.

This example shows a very simple method of encrypting then decrypting a String value.

Private Sub Main()
    ' Create a new DES key.
    Dim Key As New DESCryptoServiceProvider

    ' Encrypt a string to a byte array.
    Dim Buffer() As Byte
    Buffer = Encrypt("This is some plaintext!", Key)

    ' Decrypt the byte array back to a string.
    Dim PlainText As String
    PlainText = Decrypt(Buffer, Key)

    ' Display the PlainText value to the console.
    Console.WriteLine PlainText
    Console.ReadKey
End Sub Main

' Encrypt the string.
Private Function Encrypt(ByVal PlainText As String, ByVal Key As SymmetricAlgorithm) As Byte()
    Dim Buffer() As Byte
    Buffer = StrConv(PlainText, vbFromUnicode)

    Dim Encryptor As ICryptoTransform
    Set Encryptor = Key.CreateEncryptor
    Encrypt = Encryptor.TransformFinalBlock(Buffer, 0, cArray.GetLength(Buffer))
End Function

' Decrypt the byte array.
Public Function Decrypt(ByRef CypherText() As Byte, ByVal Key As SymmetricAlgorithm) As String
    Dim Decryptor As ICryptoTransform
    Set Decryptor = Key.CreateDecryptor

    Dim Buffer() As Byte
    Buffer = Decryptor.TransformFinalBlock(CypherText, 0, cArray.GetLength(CypherText))
    Decrypt = StrConv(Buffer, vbUnicode)
End Function

See Also

Project VBCorLib Overview | DES

Implements:

DES
IObject
SymmetricAlgorithm

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by this algorithm.
BlockSize (let) | Sets the block size, in bits, used by this algorithm.
FeedbackSize (get) | Returns the Feedback Size in bits.
FeedbackSize (let) | Sets the Feedback size in bits.
IV (get) | Returns the Initialization Vector.
IV (let) | Sets the Initialization Vector to be used.
Key (get) | Returns the current secret key.
Key (let) | Sets the secret key.
KeySize (get) | Returns the key size in bits.
KeySize (let) | Sets the key size in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of valid key sizes supported by this algorithm.
Mode (get) | Returns the Cipher mode this algorithm will use.
Mode (let) | Sets the Cipher mode this algorithm will use.
Padding (get) | Returns the padding mode being used.
Padding (let) | Sets the padding mode to be used.

Methods:

Name | Description
Clear | Clears the Key and IV arrays.
CreateDecryptor | Returns a new cipher used to decrypt data.
CreateEncryptor | Returns a new cipher used to encrypt data.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GenerateIV | Generates a random IV array to use.
GenerateKey | Generates a random key to be used.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
ValidKeySize | Tests if a specific bit length is valid for a key.


DESCryptoServiceProvider: BlockSize (get)

BlockSize

Returns the block size, in bits, used by this algorithm.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

This will always return 64 bits (8 bytes).

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: BlockSize (let)

BlockSize

Sets the block size, in bits, used by this algorithm.

 Public Property Let BlockSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new block size in bits.

Remarks

The only valid block size is 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Clear

Clear

Clears the Key and IV arrays.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: CreateDecryptor

CreateDecryptor

Returns a new cipher used to decrypt data.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to dencrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: CreateEncryptor

CreateEncryptor

Returns a new cipher used to encrypt data.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to encrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: DES

DES

 Implements DES

Return Values

DES -

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: FeedbackSize (get)

FeedbackSize

Returns the Feedback Size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The Feedback size in bits.

Remarks

Always returns 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: FeedbackSize (let)

FeedbackSize

Sets the Feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new feedback size in bits.

Remarks

Only 64 bits is valid.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: GenerateIV

GenerateIV

Generates a random IV array to use.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: GenerateKey

GenerateKey

Generates a random key to be used.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: IV (get)

IV

Returns the Initialization Vector.

 Public Property Get IV ( ) As Byte ( )

Return Values

Byte() - The Initialization Vector.

Remarks

If no IV has been set, then a new random IV will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: IV (let)

IV

Sets the Initialization Vector to be used.

 Public Property Let IV(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new IV to use.

Remarks

The array must be 8 bytes in length.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Key (get)

Key

Returns the current secret key.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The secret key.

Remarks

If no key has been set, then a new random key will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Key (let)

Key

Sets the secret key.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new secret key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: KeySize (get)

KeySize

Returns the key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: KeySize (let)

KeySize

Sets the key size in bits.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

Only 64 bits is supported for DES encryption.

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of legal block sizes.

Remarks

Only one block size is legal, 64 bits.

Read Only.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: LegalKeySizes (get)

LegalKeySizes

Returns a list of valid key sizes supported by this algorithm.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of valid key sizes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Mode (get)

Mode

Returns the Cipher mode this algorithm will use.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - The Cipher mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Mode (let)

Mode

Sets the Cipher mode this algorithm will use.

 Public Property Let Mode(
      ByVal RHS As CipherMode )

Parameters

RHS
[ByVal] CipherMode. The cipher mode to use.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Padding (get)

Padding

Returns the padding mode being used.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The current padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: Padding (let)

Padding

Sets the padding mode to be used.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: SymmetricAlgorithm

SymmetricAlgorithm

 Implements SymmetricAlgorithm

Return Values

SymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESCryptoServiceProvider: ValidKeySize

ValidKeySize

Tests if a specific bit length is valid for a key.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. The number of bits to test for.

Return Values

Boolean - Return True if the number of bits is supported, False otherwise.

Remarks

Only 64bits (8 bytes) is supported.

See Also

Project VBCorLib Overview | Class DESCryptoServiceProvider Overview


DESStatic

DESStatic

Provides static methods relating to the DES crypto service provider.

See Also

Project VBCorLib Overview DES | DESCryptoServiceProvider

Public:

Methods:

Name | Description
Create | Returns a DES cryptography service provider based on the name of the provider.
IsSemiWeakKey | Determins if a key is considered semi-weak.
IsWeakKey | Determines if a key is considered weak.


DESStatic: Create

Create

Returns a DES cryptography service provider based on the name of the provider.

 Public Function Create(
      Optional ByVal AlgName As String = "DES" ) As DES

Parameters

AlgName
[ByVal] Optional. String. The implementation name of the DES cryptography service provider.

Default: "DES"

Return Values

DES - Returns a DES implementation.

Remarks

If no name is given, then the default implementation is returned.

See Also

Project VBCorLib Overview | Class DESStatic Overview


DESStatic: IsSemiWeakKey

IsSemiWeakKey

Determins if a key is considered semi-weak.

 Public Function IsSemiWeakKey(
      ByRef RgbKey ( ) As Byte ) As Boolean

Parameters

RgbKey
[ByRef] Byte. The key to check for semi-weakness.

Return Values

Boolean - Returns True if the key is semi-weak, False otherwise.

Remarks

DES has a set of keys known to be semi-weak. The key to be tested is compared to this set of known semi-weak keys.

The set of semi-weak keys are:

    "E001E001F101F101"
    "01E001E001F101F1"
    "FE1FFE1FFE0EFE0E"
    "1FFE1FFE0EFE0EFE"
    "E01FE01FF10EF10E"
    "1FE01FE00EF10EF1"
    "01FE01FE01FE01FE"
    "FE01FE01FE01FE01"
    "011F011F010E010E"
    "1F011F010E010E01"
    "E0FEE0FEF1FEF1FE"
    "FEE0FEE0FEF1FEF1"

See Also

Project VBCorLib Overview | Class DESStatic Overview


DESStatic: IsWeakKey

IsWeakKey

Determines if a key is considered weak.

 Public Function IsWeakKey(
      ByRef RgbKey ( ) As Byte ) As Boolean

Parameters

RgbKey
[ByRef] Byte. The key to check for weakness.

Return Values

Boolean - Returns True if the key weak, False otherwise.

Remarks

DES has a set of keys known to be weak. The key to be tested is compared against this set of known weak keys.

The set of weak keys are:

    "0101010101010101"
    "FEFEFEFEFEFEFEFE"
    "E0E0E0E0F1F1F1F1"
    "1F1F1F1F0E0E0E0E"

What makes these keys weak is if test encrypted with one of these keys is encrypted a second time, the original plain text would be produced.

See Also

Project VBCorLib Overview | Class DESStatic Overview


DictionaryEntry

DictionaryEntry

A DictionaryEntry is used to contain a key/value pair. This enables collections to keep the two values together throughout an operation.

See Also

Project VBCorLib Overview Constructors

Implements:

IObject

Public:

Properties:

Name | Description
Key (get) | Returns the Key protion of the entry.
Key (let) | Sets the key portion of the entry.
Key (set) | Sets the key portion of the entry.
Value (get) | Returns the value portion of the entry pair.
Value (let) | Sets the value portion of the entry.
Value (set) | Sets the value portion of the entry.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


DictionaryEntry: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Key (get)

Key

Returns the Key protion of the entry.

 Public Property Get Key ( ) As Variant

Return Values

Variant - The key from the entry.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Key (let)

Key

Sets the key portion of the entry.

 Public Property Let Key(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. The new key to set the entry to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Key (set)

Key

Sets the key portion of the entry.

 Public Property Set Key(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. The new key to set the entry to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Value (get)

Value

Returns the value portion of the entry pair.

 Public Property Get Value ( ) As Variant

Return Values

Variant - The value from the entry.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Value (let)

Value

Sets the value portion of the entry.

 Public Property Let Value(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. The new value to set the entry to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


DictionaryEntry: Value (set)

Value

Sets the value portion of the entry.

 Public Property Set Value(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. The new value to set the entry to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DictionaryEntry Overview


Directory

Directory

Provides a set of static methods for manipulating and retrieving directory information.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CreateDirectory | Creates a directory and any subdirectories in the specified path.
Delete | Deletes directories and files within directories.
Exists | Checks if the path exists.
GetCreationTime | Returns the time of creation for the specified directory in local time.
GetCreationTimeUtc | Returns the time of creation for the specified directory in UTC time.
GetCurrentDirectory | Returns the current directory the application is set to.
GetDirectories | Returns a list of all the directories found in the specified directory that matches the search pattern.
GetDirectoryRoot | Returns the root directory of the specified path.
GetFiles | Returns a list of all the files that match a pattern within the specified directory.
GetFileSystemEntries | Returns both directories and files that match the specified pattern.
GetLastAccessTime | Returns the time the directory was last accessed in local time.
GetLastAccessTimeUtc | Returns the time the directory was last accessed in UTC time.
GetLastWriteTime | Returns the time the directory was last written to in local time.
GetLastWriteTimeUtc | Returns the time the directory was last written to in UTC time.
GetLogicalDrives | Returns a list of the logical drives installed on this machine.
GetParent | Returns the parent of the specified directory.
Move | Moves a directory and all of its contents to another location.
SetCreationTime | Sets the creation time of the specified directory to the local time.
SetCreationTimeUtc | Sets the creation time of the specified directory to UTC time.
SetCurrentDirectory | Changes the current directory to the specified directory.
SetLastAccessTime | Sets the time the directory was last accessed in local time.
SetLastAccessTimeUtc | Sets the time the directory was last accessed in UTC time.
SetLastWriteTime | Sets the time the directory was last written to in local time.
SetLastWriteTimeUtc | Sets the time the directory was last written to in UTC time.


Directory: CreateDirectory

CreateDirectory

Creates a directory and any subdirectories in the specified path.

 Public Function CreateDirectory(
      ByVal Path As String ) As DirectoryInfo

Parameters

Path
[ByVal] String. The directory path to be created.

Return Values

DirectoryInfo - A DirectoryInfo object that represents the created directory.

Remarks

The path to be created can be a relative or absolute path.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: Delete

Delete

Deletes directories and files within directories.

 Public Sub Delete(
      ByVal Path As String,
      Optional ByVal Recursive As Boolean = False )

Parameters

Path
[ByVal] String. The top directory to be deleted.
Recursive
[ByVal] Optional. Boolean. If set to True, then all directories and files in the top directory will be deleted along with the top directory. Otherwise, the specified directory must be empty to be deleted.

Default: False

Remarks

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: Exists

Exists

Checks if the path exists.

 Public Function Exists(
      ByVal Path As String ) As Boolean

Parameters

Path
[ByVal] String. The path to check for existence.

Return Values

Boolean - Indication of the existence of the path.

Remarks

The path can be relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetCreationTime

GetCreationTime

Returns the time of creation for the specified directory in local time.

 Public Function GetCreationTime(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The directory to retrieve the creation time of.

Return Values

cDateTime - A cDateTime object containing the creation time of the directory.

Remarks

The path can be relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetCreationTimeUtc

GetCreationTimeUtc

Returns the time of creation for the specified directory in UTC time.

 Public Function GetCreationTimeUtc(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The directory to retrieve the creation time of.

Return Values

cDateTime - A cDateTime object containing the creation time of the directory.

Remarks

The path can be relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetCurrentDirectory

GetCurrentDirectory

Returns the current directory the application is set to.

 Public Function GetCurrentDirectory ( ) As String

Return Values

String - The current set directory.

Remarks

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetDirectories

GetDirectories

Returns a list of all the directories found in the specified directory that matches the search pattern.

 Public Function GetDirectories(
      ByVal Path As String,
      Optional ByVal SearchPattern As String = "*" ) As String ( )

Parameters

Path
[ByVal] String. The directory to find the requested directories.
SearchPattern
[ByVal] Optional. String. A pattern to compare all the directories against, returning those that match the pattern.

Default: "*"

Return Values

String() - An array of the matching directories. If no directories match the pattern, then an empty zero-length array.

Remarks

The path can be absolute or relative.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetDirectoryRoot

GetDirectoryRoot

Returns the root directory of the specified path.

 Public Function GetDirectoryRoot(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The path to return the root of.

Return Values

String - The root of the specified directory.

Remarks

If the path is relative, then the current directory will be used as the root.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetFiles

GetFiles

Returns a list of all the files that match a pattern within the specified directory.

 Public Function GetFiles(
      ByVal Path As String,
      Optional ByVal SearchPattern As String = "*" ) As String ( )

Parameters

Path
[ByVal] String. The directory to search for the matching files.
SearchPattern
[ByVal] Optional. String. A pattern to match the files against.

Default: "*"

Return Values

String() - The list of matching file names. If no filenames matched, then an empty, zero-length array is returned.

Remarks

The path can be absolute or relative. The path is not included in the filename result.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetFileSystemEntries

GetFileSystemEntries

Returns both directories and files that match the specified pattern.

 Public Function GetFileSystemEntries(
      ByVal Path As String,
      Optional ByVal SearchPattern As String = "*" ) As String ( )

Parameters

Path
[ByVal] String. The directory to search for the files and directories.
SearchPattern
[ByVal] Optional. String. The pattern the filenames and directories must match.

Default: "*"

Return Values

String() - The list of files and directories that matched the pattern. If no files or directories matched the pattern, then an empty, zero-length array is returned.

Remarks

The path can be absolute or relative.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetLastAccessTime

GetLastAccessTime

Returns the time the directory was last accessed in local time.

 Public Function GetLastAccessTime(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The directory to retrieve the last time it was accessed.

Return Values

cDateTime - A cDateTime object containing the time the directory was last accessed.

Remarks

The path can be relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetLastAccessTimeUtc

GetLastAccessTimeUtc

Returns the time the directory was last accessed in UTC time.

 Public Function GetLastAccessTimeUtc(
      ByVal Path As Stream ) As cDateTime

Parameters

Path
[ByVal] Stream. The directory to retrieve the last time it was accessed.

Return Values

cDateTime - A cDateTime object containing the time the directory was last accessed.

Remarks

The path can be relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetLastWriteTime

GetLastWriteTime

Returns the time the directory was last written to in local time.

 Public Function GetLastWriteTime(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The directory to retrieve the last time it was written to.

Return Values

cDateTime - A cDateTime object containing the last time the directory was written to.

Remarks

The path can relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetLastWriteTimeUtc

GetLastWriteTimeUtc

Returns the time the directory was last written to in UTC time.

 Public Function GetLastWriteTimeUtc(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The directory to retrieve the last time it was written to.

Return Values

cDateTime - A cDateTime object containing the last time the directory was written to.

Remarks

The path can relative or absolute.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetLogicalDrives

GetLogicalDrives

Returns a list of the logical drives installed on this machine.

 Public Function GetLogicalDrives ( ) As String ( )

Return Values

String() - The list of logical drives on this machine.

Remarks

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: GetParent

GetParent

Returns the parent of the specified directory.

 Public Function GetParent(
      ByVal Path As String ) As DirectoryInfo

Parameters

Path
[ByVal] String. The directory to retrieve the parent of.

Return Values

DirectoryInfo - A DirectoryInfo object representing the parent directory.

Remarks

The path can be absolute or relative.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: Move

Move

Moves a directory and all of its contents to another location.

 Public Sub Move(
      ByVal SourceDirectory As String,
      ByVal DestinationDirectory As String )

Parameters

SourceDirectory
[ByVal] String. The directory to be moved.
DestinationDirectory
[ByVal] String. The directory to be moved to.

Remarks

The destination directory is the source directory renamed after the moving of the source directory.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetCreationTime

SetCreationTime

Sets the creation time of the specified directory to the local time.

 Public Sub SetCreationTime(
      ByVal Path As String,
      ByVal CreationTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the creation time for.
CreationTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

The time will have the UTC offset removed before setting the the directory to it. When the time is read, it will be in local time to the timezone.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetCreationTimeUtc

SetCreationTimeUtc

Sets the creation time of the specified directory to UTC time.

 Public Sub SetCreationTimeUtc(
      ByVal Path As String,
      ByVal CreationTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the creation time for in UTC.
CreationTime
[ByVal] Variant. A Date or cDateTime object of the new UTC time.

Remarks

The directory is set to the actual time passed in.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetCurrentDirectory

SetCurrentDirectory

Changes the current directory to the specified directory.

 Public Sub SetCurrentDirectory(
      ByVal Path As String )

Parameters

Path
[ByVal] String. The new directory to set as the current directory.

Remarks

The path can be absolute or relative.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetLastAccessTime

SetLastAccessTime

Sets the time the directory was last accessed in local time.

 Public Sub SetLastAccessTime(
      ByVal Path As String,
      ByVal LastAccessTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the new time for.
LastAccessTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

The UTC offset is removed from the time before setting the directory.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetLastAccessTimeUtc

SetLastAccessTimeUtc

Sets the time the directory was last accessed in UTC time.

 Public Sub SetLastAccessTimeUtc(
      ByVal Path As String,
      ByVal LastAccessTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the new time for.
LastAccessTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

The directory is set to the actual time passed in.

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetLastWriteTime

SetLastWriteTime

Sets the time the directory was last written to in local time.

 Public Sub SetLastWriteTime(
      ByVal Path As String,
      ByVal LastWriteTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the new time for.
LastWriteTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class Directory Overview


Directory: SetLastWriteTimeUtc

SetLastWriteTimeUtc

Sets the time the directory was last written to in UTC time.

 Public Sub SetLastWriteTimeUtc(
      ByVal Path As String,
      ByVal LastWriteTime As Variant )

Parameters

Path
[ByVal] String. The directory to set the new time for.
LastWriteTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class Directory Overview


DirectoryInfo

DirectoryInfo

Represents a directory to modify and retrieve information about.

Remarks

The DirectoryInfo object does not verify the existence of the directory until information has to be read or written to that directory.

See Also

Project VBCorLib Overview | Constructors

Implements:

FileSystemInfo
IObject

Public:

Properties:

Name | Description
Attributes (get) | Returns the directorys attributes (ReadOnly, Hidden, Archive, ...)
Attributes (let) | Sets the attributes for the directory.
CreationTime (get) | Returns the creation time for this directory in local time.
CreationTime (let) | Sets the creation time for the directory in local time.
CreationTime (set) | Sets the creation time for the directory in local time.
CreationTimeUtc (get) | Returns the creation time as UTC time.
CreationTimeUtc (let) | Sets the creation time as UTC time.
CreationTimeUtc (set) | Sets the creation time as UTC time.
Exists (get) | Checks if the directory actually exists.
Extension (get) | Returns an empty string for directories.
FullName (get) | Returns the name of the directory, including the full path to the directory.
LastAccessTime (get) | Returns the last time the directory was accessed in local time.
LastAccessTime (let) | Sets the time the directory was last accessed in local time.
LastAccessTime (set) | Sets the time the directory was last accessed in local time.
LastAccessTimeUtc (get) | Returns the last time the directory was accessed in UTC time.
LastAccessTimeUtc (let) | Sets the last time the directory was accessed in UTC time.
LastAccessTimeUtc (set) | Sets the last time the directory was accessed in UTC time.
LastWriteTime (get) | Returns the last time the directory was written to in local time.
LastWriteTime (let) | Sets the last time the directory was written to in local time.
LastWriteTime (set) | Sets the last time the directory was written to in local time.
LastWriteTimeUtc (get) | Returns the last time the directory was written to in UTC time.
LastWriteTimeUtc (let) | Sets the last time the directory was written to in UTC time.
LastWriteTimeUtc (set) | Sets the last time the directory was written to in UTC time.
Name (get) | Returns the name of the directory this instance represents.
Parent (get) | Returns the parent directory as a DirectoryInfo object.
Root (get) | Returns a DirectoryInfo object of the root directory of this instance.

Methods:

Name | Description
Create | Creates the path represented by this instance.
CreateSubdirectory | Creates a directory within this instance, returning the new subdirectory.
Delete | Deletes this directory if it is empty, or all of its contents and itself if Recursive is set to True.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDirectories | Returns a list of directories within this directory.
GetFiles | Returns a list of file matching the pattern in this directory.
GetFileSystemInfos | Returns a list of all entries in the directory that match the pattern.
GetHashCode | Returns a pseudo-unique number identifying this instance.
MoveTo | Moves this directory and its contents to the specified path.
Refresh | Reloads all of the attributes and timestamps for the directory.
ToString | Returns a string representation of this object instance.


DirectoryInfo: Attributes (get)

Attributes

Returns the directorys attributes (ReadOnly, Hidden, Archive, ...)

 Public Property Get Attributes ( ) As FileAttributes

Return Values

FileAttributes - The directories attributes since the last time Refresh was called.

Remarks

The attributes are not kept current. If the they are changed since last checked, then Refresh must be called to retrieve the current settings.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Attributes (let)

Attributes

Sets the attributes for the directory.

 Public Property Let Attributes(
      ByVal RHS As FileAttributes )

Parameters

RHS
[ByVal] FileAttributes. The attributes to set for the directory.

Remarks

Setting just one attribute will clear all the other attributes. To preserve any attributes, then OR must be used with the attributes to be preserved.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Create

Create

Creates the path represented by this instance.

 Public Sub Create ( )

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreateSubdirectory

CreateSubdirectory

Creates a directory within this instance, returning the new subdirectory.

 Public Function CreateSubdirectory(
      ByVal sPath As String ) As DirectoryInfo

Parameters

sPath
[ByVal] String. The new subdirectory to be created.

Return Values

DirectoryInfo - A DirectoryInfo object of the new subdirectory path.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTime (get)

CreationTime

Returns the creation time for this directory in local time.

 Public Property Get CreationTime ( ) As Variant

Return Values

Variant - A cDateTime object representing the creation time for this directory.

Remarks

The time returned is the UTC time with the timezone offset applied. For Pacific Coast, a -8 hours is added to the time before returning.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTime (let)

CreationTime

Sets the creation time for the directory in local time.

 Public Property Let CreationTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date of the new time.

Remarks

The time has the UTC timezone offset applied to it before being written to the directory.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTime (set)

CreationTime

Sets the creation time for the directory in local time.

 Public Property Set CreationTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A cDateTime object of the new time.

Remarks

The time has the UTC timezone offset applied to it before being written to the directory.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTimeUtc (get)

CreationTimeUtc

Returns the creation time as UTC time.

 Public Property Get CreationTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the UTC time.

Remarks

The time returned is the time on the directory without any offsets being applied.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTimeUtc (let)

CreationTimeUtc

Sets the creation time as UTC time.

 Public Property Let CreationTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date value as the new time.

Remarks

The time has the UTC timezone offset removed from it before being written to the directory.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: CreationTimeUtc (set)

CreationTimeUtc

Sets the creation time as UTC time.

 Public Property Set CreationTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A cDateTime object of the new time.

Remarks

The time has the UTC timezone offset removed from it before being written to the directory.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Delete

Delete

Deletes this directory if it is empty, or all of its contents and itself if Recursive is set to True.

 Public Sub Delete(
      Optional ByVal Recursive As Boolean )

Parameters

Recursive
[ByVal] Optional. Boolean. Indicates if all entries in the directory should be deleted.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Exists (get)

Exists

Checks if the directory actually exists.

 Public Property Get Exists ( ) As Boolean

Return Values

Boolean - An indication of the directory existing.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Extension (get)

Extension

Returns an empty string for directories.

 Public Property Get Extension ( ) As String

Return Values

String - An empty string.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: FileSystemInfo

FileSystemInfo

 Implements FileSystemInfo

Return Values

FileSystemInfo -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: FullName (get)

FullName

Returns the name of the directory, including the full path to the directory.

 Public Property Get FullName ( ) As String

Return Values

String -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: GetDirectories

GetDirectories

Returns a list of directories within this directory.

 Public Function GetDirectories(
      Optional ByVal SearchPattern As String = "*" ) As DirectoryInfo ( )

Parameters

SearchPattern
[ByVal] Optional. String. A pattern for all directories to match.

Default: "*"

Return Values

DirectoryInfo() - A list of all matching directories.

Remarks

If no matching directories were found, then an empty array is returned.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: GetFiles

GetFiles

Returns a list of file matching the pattern in this directory.

 Public Function GetFiles(
      Optional ByVal SearchPattern As String = "*" ) As FileInfo ( )

Parameters

SearchPattern
[ByVal] Optional. String. The pattern the files must match.

Default: "*"

Return Values

FileInfo() - A list of files that matched the pattern.

Remarks

If no files matched the pattern, a zero-length array is returned.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: GetFileSystemInfos

GetFileSystemInfos

Returns a list of all entries in the directory that match the pattern.

 Public Function GetFileSystemInfos(
      Optional ByVal SearchPattern As String = "*" ) As FileSystemInfo ( )

Parameters

SearchPattern
[ByVal] Optional. String. The pattern to match against all entries.

Default: "*"

Return Values

FileSystemInfo() - A list of all entries that matched the pattern.

Remarks

If no entries matched the pattern, a zero-length array is returned.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTime (get)

LastAccessTime

Returns the last time the directory was accessed in local time.

 Public Property Get LastAccessTime ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

The returned time is the UTC time with the UTC timezone offset applied.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTime (let)

LastAccessTime

Sets the time the directory was last accessed in local time.

 Public Property Let LastAccessTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTime (set)

LastAccessTime

Sets the time the directory was last accessed in local time.

 Public Property Set LastAccessTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTimeUtc (get)

LastAccessTimeUtc

Returns the last time the directory was accessed in UTC time.

 Public Property Get LastAccessTimeUtc ( ) As Variant

Return Values

Variant - a cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTimeUtc (let)

LastAccessTimeUtc

Sets the last time the directory was accessed in UTC time.

 Public Property Let LastAccessTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastAccessTimeUtc (set)

LastAccessTimeUtc

Sets the last time the directory was accessed in UTC time.

 Public Property Set LastAccessTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTime (get)

LastWriteTime

Returns the last time the directory was written to in local time.

 Public Property Get LastWriteTime ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTime (let)

LastWriteTime

Sets the last time the directory was written to in local time.

 Public Property Let LastWriteTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTime (set)

LastWriteTime

Sets the last time the directory was written to in local time.

 Public Property Set LastWriteTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTimeUtc (get)

LastWriteTimeUtc

Returns the last time the directory was written to in UTC time.

 Public Property Get LastWriteTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTimeUtc (let)

LastWriteTimeUtc

Sets the last time the directory was written to in UTC time.

 Public Property Let LastWriteTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: LastWriteTimeUtc (set)

LastWriteTimeUtc

Sets the last time the directory was written to in UTC time.

 Public Property Set LastWriteTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: MoveTo

MoveTo

Moves this directory and its contents to the specified path.

 Public Sub MoveTo(
      ByVal DestDirName As String )

Parameters

DestDirName
[ByVal] String. The new path and name of the directory.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Name (get)

Name

Returns the name of the directory this instance represents.

 Public Property Get Name ( ) As String

Return Values

String -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Parent (get)

Parent

Returns the parent directory as a DirectoryInfo object.

 Public Property Get Parent ( ) As DirectoryInfo

Return Values

DirectoryInfo - A DirectroyInfo object of the parent directory, or Nothing if the original directory is a root, such as c:\'

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Refresh

Refresh

Reloads all of the attributes and timestamps for the directory.

 Public Sub Refresh ( )

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: Root (get)

Root

Returns a DirectoryInfo object of the root directory of this instance.

 Public Property Get Root ( ) As DirectoryInfo

Return Values

DirectoryInfo - A DirectoryInfo object of the root.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryInfo Overview


DirectoryNotFoundException

DirectoryNotFoundException

An exception that is thrown when a specified directory was not found.

See Also

Project VBCorLib Overview

Implements:

Exception
IObject
IOException
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


DirectoryNotFoundException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview | Exception


DirectoryNotFoundException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview | Exception


DirectoryNotFoundException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: IOException

IOException

 Implements IOException

Return Values

IOException -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DirectoryNotFoundException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class DirectoryNotFoundException Overview


DriveInfo

DriveInfo

Provides methods to access information about a drive.

Remarks

A constructor is used to create a new DriveInfo.

 Set info = NewDriveInfo("c:\")

See Also

Project VBCorLib Overview | DriveInfoStatic | Constructors | FileInfo | DirectoryInfo

Implements:

IObject

Public:

Properties:

Name | Description
AvailableFreeSpace (get) | Returns the amount of free space is available allowed for the current account use.
DriveFormat (get) | Returns the drive format (NTFS, FAT32, ...)
DriveType (get) | Returns the type of drive this instance represents.
IsReady (get) | Returns if the drive is ready to be accessed.
Name (get) | Returns the name of the drive.
RootDirectory (get) | Returns a DirectoryInfo of the root directory for the drive.
SerialNumber (get) | Returns the serial number for the drive.
TotalFreeSpace (get) | Returns the amount of free space on the drive.
TotalSize (get) | Returns the amount of storage the drive media is capable of holding.
VolumeLabel (get) | Returns the volume name.
VolumeLabel (let) | Sets the volume name.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


DriveInfo: AvailableFreeSpace (get)

AvailableFreeSpace

Returns the amount of free space is available allowed for the current account use.

 Public Property Get AvailableFreeSpace ( ) As Currency

Return Values

Currency - The amount of free space available to the current account.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: DriveFormat (get)

DriveFormat

Returns the drive format (NTFS, FAT32, ...)

 Public Property Get DriveFormat ( ) As String

Return Values

String - The drive format.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: DriveType (get)

DriveType

Returns the type of drive this instance represents.

 Public Property Get DriveType ( ) As DriveType

Return Values

DriveType - The type of drive.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: IsReady (get)

IsReady

Returns if the drive is ready to be accessed.

 Public Property Get IsReady ( ) As Boolean

Return Values

Boolean - Whether the drive is ready to be accessed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: Name (get)

Name

Returns the name of the drive.

 Public Property Get Name ( ) As String

Return Values

String - The name of the drive.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: RootDirectory (get)

RootDirectory

Returns a DirectoryInfo of the root directory for the drive.

 Public Property Get RootDirectory ( ) As DirectoryInfo

Return Values

DirectoryInfo - The root directory of the drive.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: SerialNumber (get)

SerialNumber

Returns the serial number for the drive.

 Public Property Get SerialNumber ( ) As Long

Return Values

Long - The serial number.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: TotalFreeSpace (get)

TotalFreeSpace

Returns the amount of free space on the drive.

 Public Property Get TotalFreeSpace ( ) As Currency

Return Values

Currency - The amount of free space.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: TotalSize (get)

TotalSize

Returns the amount of storage the drive media is capable of holding.

 Public Property Get TotalSize ( ) As Currency

Return Values

Currency - The maximum storage amount.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: VolumeLabel (get)

VolumeLabel

Returns the volume name.

 Public Property Get VolumeLabel ( ) As String

Return Values

String - The volume name.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfo: VolumeLabel (let)

VolumeLabel

Sets the volume name.

 Public Property Let VolumeLabel(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new volume name.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DriveInfo Overview


DriveInfoStatic

DriveInfoStatic

Provides static methods for manipulating DriveInfo objects.

Remarks

This class cannot be instantiated directly. To access these methods use the DriveInfo.* syntax.

See Also

Project VBCorLib Overview | DriveInfo | Constructors

Public:

Types:

Name | Description
DriveType | Represents the type of drives a DriveInfo can be.

Methods:

Name | Description
GetDrives | Returns an array of all the local logical drives.


DriveInfoStatic: DriveType

DriveType

Represents the type of drives a DriveInfo can be.

 Public Enum DriveType

Values

Unknown = 0
The device is of an unknown type.
NoRootDirectory = 1
The DriveInfo is no a root directory.
Removable = 2
The drive is a removable storage device.
Fixed = 3
The device is a fixed disk.
Network = 4
The drive is a network drive.
CDRom = 5
The drive is a CD-Rom drive.
RamDisk = 6
The drive is a RAM disk.

Remarks

See Also

Project VBCorLib Overview | Class DriveInfoStatic Overview


DriveInfoStatic: GetDrives

GetDrives

Returns an array of all the local logical drives.

 Public Function GetDrives ( ) As DriveInfo ( )

Return Values

DriveInfo() - An array of DriveInfo objects.

Remarks

See Also

Project VBCorLib Overview | Class DriveInfoStatic Overview


DSA

DSA

Represents a base interface all DSA implementations must implement.

See Also

Project VBCorLib Overview DSACryptoServiceProvider

Public:

Properties:

Name | Description
KeyExchangeAlgorithm (get) | Gets the name of the Key Exchange algorithm.
KeySize (get) | Gets the key size for the current implementation.
KeySize (let) | Sets the key size for the current implementation.
LegalKeySizes (get) | Gets a set of valid key sizes represented as KeySizes objects.
SignatureAlgorithm (get) | Gets the name of the signature algorithm.

Methods:

Name | Description
Clear | Releases any resources used by the current object.
CreateSignature | Creates a signature for a hash value.
Equals | Returns if the value and the object are equal.
ExportParameters | Exports the DSA key in a DSAParameters object.
FromXmlString | Imports a DSA key from an XML string.
GetHashCode | Returns a semi-unique number identifying this instance.
ImportParameters | Imports a DSA key from a DSAParameters object.
ToString | Returns a string representation of this instance.
ToXmlString | Exports the DSA key to an XML string.
VerifySignature | Verifies a signature for a specified hash value.


DSA: Clear

Clear

Releases any resources used by the current object.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: CreateSignature

CreateSignature

Creates a signature for a hash value.

 Public Function CreateSignature(
      ByRef RgbHash ( ) As Byte ) As Byte ( ) :

Parameters

RgbHash
[ByRef] Byte. The hash value to create a signature for.

Return Values

Byte() - The signature created for the hash value.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: Equals

Equals

Returns if the value and the object are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to check for equality.

Return Values

Boolean - Returns True if the value and instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: ExportParameters

ExportParameters

Exports the DSA key in a DSAParameters object.

 Public Function ExportParameters(
      ByVal IncludePrivateParameters As Boolean ) As DSAParameters

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portion of the key should be exported.

Return Values

DSAParameters - A DSAParamters object containing the exported key.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: FromXmlString

FromXmlString

Imports a DSA key from an XML string.

 Public Sub FromXmlString(
      ByVal XmlString As String )

Parameters

XmlString
[ByVal] String. The XML string containing the DSA key information.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: GetHashCode

GetHashCode

Returns a semi-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A semi-unique number.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: ImportParameters

ImportParameters

Imports a DSA key from a DSAParameters object.

 Public Sub ImportParameters(
      ByVal Parameters As DSAParameters )

Parameters

Parameters
[ByVal] DSAParameters. The parameters object to import the key from.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: KeyExchangeAlgorithm (get)

KeyExchangeAlgorithm

Gets the name of the Key Exchange algorithm.

 Public Property Get KeyExchangeAlgorithm ( ) As String

Return Values

String - The name of the algorithm.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: KeySize (get)

KeySize

Gets the key size for the current implementation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - Returns the current key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: KeySize (let)

KeySize

Sets the key size for the current implementation.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: LegalKeySizes (get)

LegalKeySizes

Gets a set of valid key sizes represented as KeySizes objects.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - An array of KeySizes objects.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: SignatureAlgorithm (get)

SignatureAlgorithm

Gets the name of the signature algorithm.

 Public Property Get SignatureAlgorithm ( ) As String

Return Values

String - The name of the signature algorithm.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: ToXmlString

ToXmlString

Exports the DSA key to an XML string.

 Public Function ToXmlString(
      ByVal IncludePrivateParameters As Boolean ) As String

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portion of the key should be exported.

Return Values

String - An XML string of the DSA key.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSA: VerifySignature

VerifySignature

Verifies a signature for a specified hash value.

 Public Function VerifySignature(
      ByRef RgbHash ( ) As Byte,
      ByRef RgbSignature ( ) As Byte ) As Boolean

Parameters

RgbHash
[ByRef] Byte. The value the signature was created for.
RgbSignature
[ByRef] Byte. The signature to be verified.

Return Values

Boolean - Returns True if the signature is for the hash value, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class DSA Overview


DSACryptoServiceProvider

DSACryptoServiceProvider

Provides a wrapper to access a DSA crypto service provider.

Remarks

This class is used to create signatures for data and hashes and provide verification of those signatures generated.

See Also

Project VBCorLib Overview

Implements:

AsymmetricAlgorithm
DSA
ICspAsymmetricAlgorithm
IObject

Public:

Properties:

Name | Description
CspKeyContainerInfo (get) | Returns a CspKeyContainerInfo object containing information about this DSACryptoServiceProvider instance.
KeyExchangeAlgorithm (get) | Returns the name of the key exchange algorithm this instance represents.
KeySize (get) | Returns the DSA key size in bits.
KeySize (let) | Sets the key size.
LegalKeySizes (get) | Returns an array of KeySizes objects defining the valid key sizes.
PersistKeyInCsp (get) | Returns if the current key will be stored in the current provider container.
PersistKeyInCsp (let) | Sets if the current key will be stored in the current provider container.
PublicOnly (get) | Returns if the key for this DSA instance is only the public half of the key pair.
SignatureAlgorithm (get) | Returns the signature algorithm.

Methods:

Name | Description
Clear | Releases any resources and disposes the DSA instance.
CreateSignature | Creates a new signature for the hash value.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
ExportCspBlob | Exports the key information as a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB structure.
ExportParameters | Exports the DSA key parameters.
FromXmlString | Imports a DSA key in the form of an XML string.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ImportCspBlob | Imports a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB into the DSA provider.
ImportParameters | Imports the DSA key parameters.
SignData | Creates a signature for a Stream object or Byte array.
SignHash | Creates a signature for a hash value.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.
ToXmlString | Exports the DSA key as an XML string.
VerifyData | Verifies the signature for the specified data.
VerifyHash | Verifies the signature for the specified hash value.
VerifySignature | Verifies the signature for the hash value.


DSACryptoServiceProvider: AsymmetricAlgorithm

AsymmetricAlgorithm

 Implements AsymmetricAlgorithm

Return Values

AsymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: Clear

Clear

Releases any resources and disposes the DSA instance.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: CreateSignature

CreateSignature

Creates a new signature for the hash value.

 Public Function CreateSignature(
      ByRef RgbHash ( ) As Byte ) As Byte ( )

Parameters

RgbHash
[ByRef] Byte. The hash value to be signed.

Return Values

Byte() - The hash value signature.

Remarks

Only SHA1 hash values are supported.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: CspKeyContainerInfo (get)

CspKeyContainerInfo

Returns a CspKeyContainerInfo object containing information about this DSACryptoServiceProvider instance.

 Public Property Get CspKeyContainerInfo ( ) As CspKeyContainerInfo

Return Values

CspKeyContainerInfo - A CspKeyContainerInfo object.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: DSA

DSA

 Implements DSA

Return Values

DSA -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview | IObject


DSACryptoServiceProvider: ExportCspBlob

ExportCspBlob

Exports the key information as a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB structure.

 Public Function ExportCspBlob(
      ByVal IncludePrivateParameters As Boolean ) As Byte ( )

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if only the public key should be exported or is both the public and private keys should be exported.

Return Values

Byte() - A exported key blob structure.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ExportParameters

ExportParameters

Exports the DSA key parameters.

 Public Function ExportParameters(
      ByVal IncludePrivateParameters As Boolean ) As DSAParameters

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if only the public key should be exported or is both the public and private keys should be exported.

Return Values

DSAParameters - An DSAParameters object containing the parameters of the DSA algorithms.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: FromXmlString

FromXmlString

Imports a DSA key in the form of an XML string.

 Public Sub FromXmlString(
      ByVal XmlString As String )

Parameters

XmlString
[ByVal] String. The XML string containing the key information.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ICspAsymmetricAlgorithm

ICspAsymmetricAlgorithm

 Implements ICspAsymmetricAlgorithm

Return Values

ICspAsymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ImportCspBlob

ImportCspBlob

Imports a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB into the DSA provider.

 Public Sub ImportCspBlob(
      ByRef KeyBlob ( ) As Byte )

Parameters

KeyBlob
[ByRef] Byte. The blob key to be imported.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ImportParameters

ImportParameters

Imports the DSA key parameters.

 Public Sub ImportParameters(
      ByVal Parameters As DSAParameters )

Parameters

Parameters
[ByVal] DSAParameters. The parameters to be imported as the new key.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: KeyExchangeAlgorithm (get)

KeyExchangeAlgorithm

Returns the name of the key exchange algorithm this instance represents.

 Public Property Get KeyExchangeAlgorithm ( ) As String

Return Values

String - The name of the key exchange algorithm.

Remarks

When an DSACryptoServiceProvider is created as a key exchange instead of a signature service, this returns DSA-PKCS1-KeyEx', otherwise nothing is returned.

Read Only.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: KeySize (get)

KeySize

Returns the DSA key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits being used by this DSA instance.

Remarks

By default, the key size is 1024 for high encryption and 512 for base encryption providers.

Read/Write.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: KeySize (let)

KeySize

Sets the key size.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size.

Remarks

This property has no affect on the key size. To set the key size, use the Cor.NewDSACryptoServiceProvider constructor.

Read/Write.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: LegalKeySizes (get)

LegalKeySizes

Returns an array of KeySizes objects defining the valid key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - An array of KeySizes objects.

Remarks

For high encryption systems, the legal key sizes go from 384 bits to 16384 bits in steps of 8 bits. For base encryption systems, the key sizes go from 384 bits to 512 bits in steps of 8 bits.

Read Only.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: PersistKeyInCsp (get)

PersistKeyInCsp

Returns if the current key will be stored in the current provider container.

 Public Property Get PersistKeyInCsp ( ) As Boolean

Return Values

Boolean - Returns True if the key will be stored, False otherwise.

Remarks

By default this is set to False. If a container is specified using the Cor.NewDSACryptoServiceProvider, then this will be set to True.

A key is stored in the container to allow for each retrieval by any other service that knows where the key is. Only 1 key is stored in a container, therefore, if multiple providers share the same container, then the key may become invalid.

Read/Write.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: PersistKeyInCsp (let)

PersistKeyInCsp

Sets if the current key will be stored in the current provider container.

 Public Property Let PersistKeyInCsp(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Set to True to save the key on exit, False to have the key be deleted.

Remarks

By default this is set to False. If a container is specified using the Cor.NewDSACryptoServiceProvider, then this will be set to True.

A key is stored in the container to allow for each retrieval by any other service that knows where the key is. Only 1 key is stored in a container, therefore, if multiple providers share the same container, then the key may become invalid.

Read/Write.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: PublicOnly (get)

PublicOnly

Returns if the key for this DSA instance is only the public half of the key pair.

 Public Property Get PublicOnly ( ) As Boolean

Return Values

Boolean - Returns True if only the public half of the key is present, False otherwise.

Remarks

DSA uses a private/public key pair to encrypt and decrypt. Only the public part is required to encrypt data. The private key is used to decrypt data.

Read Only.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: SignatureAlgorithm (get)

SignatureAlgorithm

Returns the signature algorithm.

 Public Property Get SignatureAlgorithm ( ) As String

Return Values

String - Always returns http://www.w3.org/2000/09/xmldsig#DSA-sha1'

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: SignData

SignData

Creates a signature for a Stream object or Byte array.

 Public Function SignData(
      ByRef InputStreamOrBuffer As Variant,
      Optional ByRef Offset As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

InputStreamOrBuffer
[ByRef] Variant. The input source to be signed. This can be any Stream object or Byte array.
Offset
[ByRef] Optional. Variant. The starting index of the Byte array to begin processing. This is only applied to a Byte array.
Count
[ByRef] Optional. Variant. The number of bytes to be processed. This is only applied to a Byte array.

Return Values

Byte() - A byte array representing the signature for the data.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: SignHash

SignHash

Creates a signature for a hash value.

 Public Function SignHash(
      ByRef RgbHash ( ) As Byte,
      ByVal Str As String ) As Byte ( )

Parameters

RgbHash
[ByRef] Byte. The hash to create a signature for.
Str
[ByVal] String. The type of hash used to create the hash value.

Return Values

Byte() - A byte array representing the signature for the hash value.

Remarks

Only SHA1 hash values are supported.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: ToXmlString

ToXmlString

Exports the DSA key as an XML string.

 Public Function ToXmlString(
      ByVal IncludePrivateParameters As Boolean ) As String

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portions of the key should be exported as well.

Return Values

String - An XML string representation of the DSA key.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: VerifyData

VerifyData

Verifies the signature for the specified data.

 Public Function VerifyData(
      ByRef RgbData ( ) As Byte,
      ByRef Signature ( ) As Byte ) As Boolean

Parameters

RgbData
[ByRef] Byte. The data to verify the signature of.
Signature
[ByRef] Byte. The signature to be verified.

Return Values

Boolean - Returns True if the signature if valid for the data, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: VerifyHash

VerifyHash

Verifies the signature for the specified hash value.

 Public Function VerifyHash(
      ByRef RgbHash ( ) As Byte,
      ByVal Str As String,
      ByRef Signature ( ) As Byte ) As Boolean

Parameters

RgbHash
[ByRef] Byte. The hash value to verify the signature of.
Str
[ByVal] String. The type of hash used to create the hash value.
Signature
[ByRef] Byte. The signature to be verified.

Return Values

Boolean - Returns True if the signature is valid for the hash value, False otherwise.

Remarks

Only SHA1 hash values are supported.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSACryptoServiceProvider: VerifySignature

VerifySignature

Verifies the signature for the hash value.

 Public Function VerifySignature(
      ByRef RgbHash ( ) As Byte,
      ByRef RgbSignature ( ) As Byte ) As Boolean

Parameters

RgbHash
[ByRef] Byte. The hash value to verify the signature of.
RgbSignature
[ByRef] Byte. The signature to be verified.

Return Values

Boolean - Returns True if the signature if valid, False otherwise.

Remarks

Only SHA1 hash values are supported.

See Also

Project VBCorLib Overview | Class DSACryptoServiceProvider Overview


DSAParameters

DSAParameters

Represents the DSA key parameters.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
Counter (get) | Gets the Counter value for the DSA key.
Counter (let) | Sets the Counter value for the DSA key.
G (get) | Gets the G parameter of the key.
G (let) | Sets the G parameter of the key.
J (get) | Gets the J parameter of the key.
J (let) | Sets the J parameter of the key.
P (get) | Gets the P parameter of the key.
P (let) | Sets the P parameter of the key.
Q (get) | Gets the Q parameter of the key.
Q (let) | Sets the Q parameter of the key.
Seed (get) | Gets the Seed of the key.
Seed (let) | Sets the Seed for the key.
X (get) | Gets the X parameter of the key.
X (let) | Sets the X parameter of the key.
Y (get) | Gets the Y parameter of the key.
Y (let) | Sets the Y parameter of the key.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


DSAParameters: Counter (get)

Counter

Gets the Counter value for the DSA key.

 Public Property Get Counter ( ) As Long

Return Values

Long - Returns the Counter value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Counter (let)

Counter

Sets the Counter value for the DSA key.

 Public Property Let Counter(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new Counter value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef value As Variant ) As Boolean

Parameters

value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class DSAParameters Overview | IObject


DSAParameters: G (get)

G

Gets the G parameter of the key.

 Public Property Get G ( ) As Byte ( )

Return Values

Byte() - The G parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: G (let)

G

Sets the G parameter of the key.

 Public Property Let G(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new G value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: J (get)

J

Gets the J parameter of the key.

 Public Property Get J ( ) As Byte ( )

Return Values

Byte() - The J parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: J (let)

J

Sets the J parameter of the key.

 Public Property Let J(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new J parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: P (get)

P

Gets the P parameter of the key.

 Public Property Get P ( ) As Byte ( )

Return Values

Byte() - The P parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: P (let)

P

Sets the P parameter of the key.

 Public Property Let P(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new P parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Q (get)

Q

Gets the Q parameter of the key.

 Public Property Get Q ( ) As Byte ( )

Return Values

Byte() - The Q parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Q (let)

Q

Sets the Q parameter of the key.

 Public Property Let Q(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new Q parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Seed (get)

Seed

Gets the Seed of the key.

 Public Property Get Seed ( ) As Byte ( )

Return Values

Byte() - The Seed value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Seed (let)

Seed

Sets the Seed for the key.

 Public Property Let Seed(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new Seed value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: X (get)

X

Gets the X parameter of the key.

 Public Property Get X ( ) As Byte ( )

Return Values

Byte() - The X parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: X (let)

X

Sets the X parameter of the key.

 Public Property Let X(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new X parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Y (get)

Y

Gets the Y parameter of the key.

 Public Property Get Y ( ) As Byte ( )

Return Values

Byte() - The Y parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


DSAParameters: Y (let)

Y

Sets the Y parameter of the key.

 Public Property Let Y(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new Y parameter.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class DSAParameters Overview


Encoder

Encoder

Provides an interface for encoding unicode characters into bytes.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Equals | Used to determine if to objects are of equal value.
GetByteCount | Returns the number of encoded bytes the set of characters would produce.
GetBytes | Returns the encoded bytes generated from a set of unicode characters.
GetHashCode | Returns a pseudo-unique number to identify this instance.
ToString | Returns a string representation of this instance.


Encoder: Equals

Equals

Used to determine if to objects are of equal value.

 Public Function Equals(
      ByRef value As Variant ) As Boolean

Parameters

value
[ByRef] Variant. An object to be compared to this instance for equality.

Return Values

Boolean - An indication of equality.

Remarks

See Also

Project VBCorLib Overview | Class Encoder Overview


Encoder: GetByteCount

GetByteCount

Returns the number of encoded bytes the set of characters would produce.

 Public Function GetByteCount(
      ByRef Chars ( ) As Integer,
      ByVal Index As Long,
      ByVal Count As Long,
      ByVal Flush As Boolean ) As Long

Parameters

Chars
[ByRef] Integer. The set of characters that would be used to produce the encoded bytes.
Index
[ByVal] Long. The first character in the array to begin the encoding count.
Count
[ByVal] Long. The number of characters to be included in the encoding count.
Flush
[ByVal] Boolean. Indicates if the Encoder should maintain state between calls.

Return Values

Long - The number of bytes that would be produced if the character set was encoded.

Remarks

Setting Flush as false allows multiple bytes that are needed to

See Also

Project VBCorLib Overview | Class Encoder Overview


Encoder: GetBytes

GetBytes

Returns the encoded bytes generated from a set of unicode characters.

 Public Function GetBytes(
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal Flush As Boolean ) As Long

Parameters

Chars
[ByRef] Integer. The unicode characters to be encoded.
CharIndex
[ByVal] Long. The character to begin encoding at.
CharCount
[ByVal] Long. The number of characters to be used in the encoding process.
Bytes
[ByRef] Byte. The encoded set of bytes produced from encoding Chars.
ByteIndex
[ByVal] Long. The starting position in the array to place the encoded bytes.
Flush
[ByVal] Boolean. Indicates if the Encoder should maintain state between calls.

Return Values

Long - The number of bytes actually produced from the encoding.

Remarks

See Also

Project VBCorLib Overview | Class Encoder Overview


Encoder: GetHashCode

GetHashCode

Returns a pseudo-unique number to identify this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A pseudo-unique number to identify this instance.

Remarks

See Also

Project VBCorLib Overview | Class Encoder Overview


Encoder: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that describes this object instance.

Remarks

See Also

Project VBCorLib Overview | Class Encoder Overview


Encoding

Encoding

Provides an interface for a provider to encode and decode unicode characters to and from bytes. Also contains information on the ability to use the encoded characters in certain situations without integerity loss.

See Also

Project VBCorLib Overview EncodingStatic | UTF8Encoding | UTF7Encoding | UnicodeEncoding | ASCIIEncoding

Public:

Properties:

Name | Description
BodyName (get) | Returns the encoding name to be used in with the mail agent body tags.
CodePage (get) | Returns the code page identifier for this encoding.
EncodingName (get) | The name of this encoding.
HeaderName (get) | Returns the encoding name to be used in with the mail agent header tags.
IsBrowserDisplay (get) | Indicates if this encoding can be used by browsers to display text.
IsBrowserSave (get) | Indicates if this encoding can be used to save data with this encoding.
IsMailNewsDisplay (get) | Indicates if this encoding can be used to display mail and news by mail and news clients.
IsMailNewsSave (get) | Indicates if this encoding can be used to save date by mail and news clients.
IsSingleByte (get) | Returns if the current encoding uses single-byte code points.
WebName (get) | Returns the encoding name registered with the Internet Assigned Numbers Authority.
WindowsCodePage (get) | Returns the Windows Operating Systems code page for this encoding.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByteCount | Returns the number of bytes that would be produced from the set of characters using this encoding.
GetBytes | Encodes a set of characters into an array of bytes.
GetBytesEx | Encodes a set of characters into an array of bytes, returning the number of bytes produced.
GetCharCount | Returns the number of characters that would be produced by decoding a byte array.
GetChars | Decodes a set of bytes into a set of characters.
GetCharsEx | Decodes a set of bytes into the supplied Integer array.
GetDecoder | Returns a decoder that maintains state.
GetEncoder | Returns an encoder that maintains state.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMaxByteCount | Returns the maximum number of bytes that can be created from a specific number of characters.
GetMaxCharCount | Returns the maximum number of characters than can be decoded from the number of bytes specified.
GetPreamble | Returns an array of bytes that represents this encoding.
GetString | Decodes a set of bytes into a String.
ToString | Returns a string representation of this object instance.


Encoding: BodyName (get)

BodyName

Returns the encoding name to be used in with the mail agent body tags.

 Public Property Get BodyName ( ) As String

Return Values

String - The body tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: CodePage (get)

CodePage

Returns the code page identifier for this encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - Code page identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: EncodingName (get)

EncodingName

The name of this encoding.

 Public Property Get EncodingName ( ) As String

Return Values

String - The encodings name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetByteCount

GetByteCount

Returns the number of bytes that would be produced from the set of characters using this encoding.

 Public Function GetByteCount(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Chars
[ByRef] Variant. A set of characters used to calculated the number of bytes once encoded with this encoding.
Index
[ByRef] Optional. Variant. The starting index of the first character to be used.
Count
[ByRef] Optional. Variant. The number of characters to include in the calculation.

Return Values

Long - The number of bytes that would be produced by encoding the set of characters.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetBytes

GetBytes

Encodes a set of characters into an array of bytes.

 Public Function GetBytes(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Chars
[ByRef] Variant. The set of characters to be encoded into an array of bytes. This can be either an Integer array or a String.
Index
[ByRef] Optional. Variant. The index of the first character to begin encoding from.
Count
[ByRef] Optional. Variant. The number of characters to be encoded.

Return Values

Byte() - A byte array containing the encoded characters as bytes.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetBytesEx

GetBytesEx

Encodes a set of characters into an array of bytes, returning the number of bytes produced.

 Public Function GetBytesEx(
      ByRef Chars As Variant,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long ) As Long

Parameters

Chars
[ByRef] Variant. the set of characters to be encoded into bytes. This can be either an Integer array or a String.
CharIndex
[ByVal] Long. The index of the first character to begin encoding from.
CharCount
[ByVal] Long. The number of characters to be encoded.
Bytes
[ByRef] Byte. The destination for the encoded characters.
ByteIndex
[ByVal] Long. The index of the first byte stored in the destination array.

Return Values

Long - The number of bytes produce by the encoding.

Remarks

The Bytes array cannot be null and must be large enough to hold the encoded set of characters. To obtain the size required, use GetByteCount to find the necessary size. Or, use GetMaxByteCount to get the largest size that could be produced. The largest size is not the perfect size, only the maximum number of bytes that could ever be produced by a number of characters. Resizing of the resultant Bytes array may be necessary.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetCharCount

GetCharCount

Returns the number of characters that would be produced by decoding a byte array.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to use when calculating the number of characters.
Index
[ByRef] Optional. Variant. The starting index in Bytes to being calculating from.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the calculation.

Return Values

Long - The number of characters that would be decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetChars

GetChars

Decodes a set of bytes into a set of characters.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Integer ( ) :

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
Index
[ByRef] Optional. Variant. The index of the first byte to be used in decoding.
Count
[ByRef] Optional. Variant. The number of bytes to be used in decoding.

Return Values

Integer() - An array of characters decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetCharsEx

GetCharsEx

Decodes a set of bytes into the supplied Integer array.

 Public Function GetCharsEx(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
ByteIndex
[ByVal] Long. The index of the first byte to begin decoding from.
ByteCount
[ByVal] Long. The number of bytes to be used in decoding.
Chars
[ByRef] Integer. The destination character array for the decoded bytes.
CharIndex
[ByVal] Long. The first index to begin storing decoded bytes in Chars.

Return Values

Long - The number of characters decoded from the array of bytes.

Remarks

The Chars array must be large enough to handle all the bytes that will be decoded. To ensure the Chars array is large enough, use either GetCharCount or GetMaxCharCount to determine a size that will hold the decoded bytes.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetDecoder

GetDecoder

Returns a decoder that maintains state.

 Public Function GetDecoder ( ) As Decoder

Return Values

Decoder - The stateful decoder.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetEncoder

GetEncoder

Returns an encoder that maintains state.

 Public Function GetEncoder ( ) As Encoder

Return Values

Encoder - The stateful encoder.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetMaxByteCount

GetMaxByteCount

Returns the maximum number of bytes that can be created from a specific number of characters.

 Public Function GetMaxByteCount(
      ByVal CharCount As Long ) As Long

Parameters

CharCount
[ByVal] Long. The number of characters to be encoded.

Return Values

Long - The maximum number of bytes that can be generated from the specified number of characters.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetMaxCharCount

GetMaxCharCount

Returns the maximum number of characters than can be decoded from the number of bytes specified.

 Public Function GetMaxCharCount(
      ByVal ByteCount As Long ) As Long

Parameters

ByteCount
[ByVal] Long. The number of bytes to be decoded.

Return Values

Long - The maximum number of characters that can be decoded from the specified number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetPreamble

GetPreamble

Returns an array of bytes that represents this encoding.

 Public Function GetPreamble ( ) As Byte ( ) :

Return Values

Byte() - A byte array containg the bytes to be used to identify this encoding type.

Remarks

If no bytes are to be returned, then an empty Byte array should be returned, not a null array.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: GetString

GetString

Decodes a set of bytes into a String.

 Public Function GetString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into a string.
Index
[ByRef] Optional. Variant. The index of the first byte to be decoded.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the decoding.

Return Values

String - A string containing the decoded set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: HeaderName (get)

HeaderName

Returns the encoding name to be used in with the mail agent header tags.

 Public Property Get HeaderName ( ) As String

Return Values

String - The header tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: IsBrowserDisplay (get)

IsBrowserDisplay

Indicates if this encoding can be used by browsers to display text.

 Public Property Get IsBrowserDisplay ( ) As Boolean

Return Values

Boolean - The indication for browser display capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: IsBrowserSave (get)

IsBrowserSave

Indicates if this encoding can be used to save data with this encoding.

 Public Property Get IsBrowserSave ( ) As Boolean

Return Values

Boolean - The indication for the browser saving capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: IsMailNewsDisplay (get)

IsMailNewsDisplay

Indicates if this encoding can be used to display mail and news by mail and news clients.

 Public Property Get IsMailNewsDisplay ( ) As Boolean

Return Values

Boolean - Indication for mail and news client capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: IsMailNewsSave (get)

IsMailNewsSave

Indicates if this encoding can be used to save date by mail and news clients.

 Public Property Get IsMailNewsSave ( ) As Boolean

Return Values

Boolean - Indication for the mail and news clients to use this encoding for saving.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: IsSingleByte (get)

IsSingleByte

Returns if the current encoding uses single-byte code points.

 Public Property Get IsSingleByte ( ) As Boolean

Return Values

Boolean - Returns True for single-byte, False for multi-byte code points.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: WebName (get)

WebName

Returns the encoding name registered with the Internet Assigned Numbers Authority.

 Public Property Get WebName ( ) As String

Return Values

String - The registered encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


Encoding: WindowsCodePage (get)

WindowsCodePage

Returns the Windows Operating Systems code page for this encoding.

 Public Property Get WindowsCodePage ( ) As Long

Return Values

Long - The Windows code page for this encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Encoding Overview


EncodingInfo

EncodingInfo

Contains information about a specific encoding.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
CodePage (get) | Returns the code page for the specific encoding.
DisplayName (get) | Returns the displayable name of the encoding.
Name (get) | Returns the normal name of the encoding.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetEncoding | Returns an encoding object that used the code page specified by this encoding.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


EncodingInfo: CodePage (get)

CodePage

Returns the code page for the specific encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - The code page.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: DisplayName (get)

DisplayName

Returns the displayable name of the encoding.

 Public Property Get DisplayName ( ) As String

Return Values

String - A displayable name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean - Returns True if they value is equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: GetEncoding

GetEncoding

Returns an encoding object that used the code page specified by this encoding.

 Public Function GetEncoding ( ) As Encoding

Return Values

Encoding - A new encoding object using the code page of this encoding.

Remarks

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: Name (get)

Name

Returns the normal name of the encoding.

 Public Property Get Name ( ) As String

Return Values

String - The normal encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingInfo: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class EncodingInfo Overview


EncodingStatic

EncodingStatic

Provides static methods used to retrieve existing encodings and convert between encodings.

Remarks

This class cannot be directly instantiated. To access the methods, use the variable name directly.

 Dim en As Encoding
 Set en = Encoding.UTF8

See Also

Project VBCorLib Overview | Encoding

Public:

Properties:

Name | Description
ASCII (get) | Returns a shared ASCIIEncoding object.
BigEndianUnicode (get) | Returns a UnicodeEncoding object that encodes using BigEndian byte ordering.
Default (get) | Returns the default ANSI Encoding for the system.
Unicode (get) | Returns a UnicodeEncoding object that encodes using LittleEndian byte ordering.
UTF7 (get) | Returns a shared UTF7Encoding object.
UTF8 (get) | Returns a shared UTF8Encoding object.

Methods:

Name | Description
Convert | Converts a set of bytes from one encoding to another encoding.
GetEncoding | Returns an encoding for a specified codepage.
GetEncodings | Returns a list of minimal information about each encoding.


EncodingStatic: ASCII (get)

ASCII

Returns a shared ASCIIEncoding object.

 Public Property Get ASCII ( ) As ASCIIEncoding

Return Values

ASCIIEncoding - A single instance of an ASCIIEncoding.

Remarks

This encoding is declared as New ASCIIEncoding.

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: BigEndianUnicode (get)

BigEndianUnicode

Returns a UnicodeEncoding object that encodes using BigEndian byte ordering.

 Public Property Get BigEndianUnicode ( ) As UnicodeEncoding

Return Values

UnicodeEncoding - A single instance of UnicodeEncoding with BigEndian encoding.

Remarks

This encoding is declared as Cor.NewUnicodeEncoding(True, True).

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: Convert

Convert

Converts a set of bytes from one encoding to another encoding.

 Public Function Convert(
      ByVal srcEncoding As Encoding,
      ByVal dstEncoding As Encoding,
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

srcEncoding
[ByVal] Encoding. The encoding to be used to decode the bytes.
dstEncoding
[ByVal] Encoding. The encoding to be used to re-encode the decoded characters.
Bytes
[ByRef] Byte. The bytes to be converted from one encoding to the other.
Index
[ByRef] Optional. Variant. The starting byte to begin decoding at.
Count
[ByRef] Optional. Variant. The number of bytes to be included in the decoding process.

Return Values

Byte() - The encoded bytes.

Remarks

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: Default (get)

Default

Returns the default ANSI Encoding for the system.

 Public Property Get Default ( ) As Encoding

Return Values

Encoding - Default system encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: GetEncoding

GetEncoding

Returns an encoding for a specified codepage.

 Public Function GetEncoding(
      ByRef CodePageOrName As Variant ) As Encoding

Parameters

CodePageOrName
[ByRef] Variant. The codepage number or name to encoding with.

Return Values

Encoding - An encoding for a specific codepage or name.

Remarks

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: GetEncodings

GetEncodings

Returns a list of minimal information about each encoding.

 Public Function GetEncodings ( ) As EncodingInfo ( )

Return Values

EncodingInfo() - An array of classes containing a minimal of information.

Remarks

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: Unicode (get)

Unicode

Returns a UnicodeEncoding object that encodes using LittleEndian byte ordering.

 Public Property Get Unicode ( ) As UnicodeEncoding

Return Values

UnicodeEncoding - A single instance of UnicodeEncoding with LittleEndian encoding.

Remarks

This encoding is declared as Cor.NewUnicodeEncoding(False, True).

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: UTF7 (get)

UTF7

Returns a shared UTF7Encoding object.

 Public Property Get UTF7 ( ) As UTF7Encoding

Return Values

UTF7Encoding - A single instance of a UTF7Encoding object

Remarks

This encoding is declared as New UTF7Encoding.

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EncodingStatic: UTF8 (get)

UTF8

Returns a shared UTF8Encoding object.

 Public Property Get UTF8 ( ) As UTF8Encoding

Return Values

UTF8Encoding - A single instance of UTF8Encoding object.

Remarks

This encoding is declared as Cor.NewUTF8Encoding(True)

Read Only.

See Also

Project VBCorLib Overview | Class EncodingStatic Overview


EndOfStreamException

EndOfStreamException

An exception that is thrown when an attempt to read passed the end of a stream occurs.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
IOException
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


EndOfStreamException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview | Exception


EndOfStreamException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview | Exception


EndOfStreamException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: IOException

IOException

 Implements IOException

Return Values

IOException -

Remarks

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


EndOfStreamException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class EndOfStreamException Overview


Environment

Environment

The Environment class provides functions for retrieving information about the local machine

Remarks

This class cannot be directly instantiated. In order to access the methods, use the class name directly.

 Debug.Print Environment.MachineName
 Debug.Print Environment.UserName

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
EnvironmentVariableTarget | Used to indicate the source or destination of the environment variables when read from or written to the system.
SpecialFolder | This enum represents a list of folders accessible using GetFolderPath. These definitions are from the Microsoft Dot NET 1.1 MSDN Library.

Properties:

Name | Description
CommandLine (get) | Returns the command specified when executing the current application, including any arguments typed after the application name.
CurrentDirectory (get) | Returns the current directy of the executing application.
CurrentDirectory (let) | Sets the current directory for the executing application.
MachineName (get) | Returns the name of the local computer.
NewLine (get) | Returns string of a newline character for the local computer.
OSVersion (get) | Returns an object representing the current operating system.
ProcessorCount (get) | Returns the number of processors on the current machine.
SystemDirectory (get) | Returns the System directory for the current OS.
TickCount (get) | Returns the number of milliseconds the system has been running since it started.
UserDomainName (get) | Returns the name of the local machine within a domain
UserInteractive (get) | Determines if the current application is allowed to have user interaction.
UserName (get) | Returns the name of the currently logged in user of the local computer.
WorkingSet (get) | Returns the amount of physical memory the current application is allocated.

Methods:

Name | Description
ExpandEnvironmentVariables | Replaces environment tags within a string with the actual values.
GetCommandLineArgs | Returns an array of parsed Arguments from the command line.
GetEnvironmentVariable | Returns an environment variable value.
GetEnvironmentVariables | Returns an IDictionary object containing all environment variables as name/value pairs.
GetFolderPath | Returns the path for a specified folder type.
GetLogicalDrives | Returns the logical drives installed on the local machine.
ParseCommandLineArgs | Provides a mechanism to parse arguments from a command line string.
SetEnvironmentVariable | Sets, creates, or deletes an environment variable in the specified region.


Environment: CommandLine (get)

CommandLine

Returns the command specified when executing the current application, including any arguments typed after the application name.

 Public Property Get CommandLine ( ) As String

Return Values

String - The command line typed in at a command prompt.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: CurrentDirectory (get)

CurrentDirectory

Returns the current directy of the executing application.

 Public Property Get CurrentDirectory ( ) As String

Return Values

String - The current directory.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: CurrentDirectory (let)

CurrentDirectory

Sets the current directory for the executing application.

 Public Property Let CurrentDirectory(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new directory to change to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: EnvironmentVariableTarget

EnvironmentVariableTarget

Used to indicate the source or destination of the environment variables when read from or written to the system.

 Public Enum EnvironmentVariableTarget

Values

Machine = 0
The source of the variable is machine wide. These are variables that are defined for the system and all users.
Process = 1
The source of the variable is for the current process. This combines both machine and user level variables, giving priority to the user level variables.
User = 2
The source of the variable is of the current user.

Remarks

Machine and User are not supported on Windows 95, 98 or ME.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: ExpandEnvironmentVariables

ExpandEnvironmentVariables

Replaces environment tags within a string with the actual values.

 Public Function ExpandEnvironmentVariables(
      ByVal Name As String ) As String

Parameters

Name
[ByVal] String. A string containing environment variable tags to be replaced.

Return Values

String - A string containing actual environment variable values in place of tags.

Remarks

The environment variables are tagged using %. A string such as My OS is %OS%.' would become 'My OS is Windows_NT.' for NT machines.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: GetCommandLineArgs

GetCommandLineArgs

Returns an array of parsed Arguments from the command line.

 Public Function GetCommandLineArgs ( ) As String ( )

Return Values

String() - An array of command line Arguments, including the application name.

Remarks

The application is the first Argument in the array. Arguments are separated by spaces. If spaces are embedded in an Arguments and should not be used to separate the Arguments, then the Arguments must be surrounded in quotes.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: GetEnvironmentVariable

GetEnvironmentVariable

Returns an environment variable value.

 Public Function GetEnvironmentVariable(
      ByVal Name As String,
      Optional ByVal Target As EnvironmentVariableTarget = EnvironmentVariableTarget. Process ) As String

Parameters

Name
[ByVal] String. The name of the environment variable to return.
Target
[ByVal] Optional. EnvironmentVariableTarget. The system region to retrieve the variable from.

Default: EnvironmentVariableTarget . Process

Return Values

String - The value of the environment variable.

Remarks

If the variable does not exist, then an empty string is returned.

A Target of Process will retrieve the variable from the current process. Other targets will retrieve the variable value from the registry.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: GetEnvironmentVariables

GetEnvironmentVariables

Returns an IDictionary object containing all environment variables as name/value pairs.

 Public Function GetEnvironmentVariables(
      Optional ByVal Target As EnvironmentVariableTarget = Process ) As IDictionary

Parameters

Target
[ByVal] Optional. EnvironmentVariableTarget. The system region to retrieve the environment variable from.

Default: Process

Return Values

IDictionary - A dictionary containing the name/value pairs.

Remarks

The hidden environment variables are not included in the dictionary.

A Target of Process will retrieve the variable from the current process. Other targets will retrieve the variable value from the registry.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: GetFolderPath

GetFolderPath

Returns the path for a specified folder type.

 Public Function GetFolderPath(
      ByVal Folder As SpecialFolder ) As String

Parameters

Folder
[ByVal] SpecialFolder. The folder to return the path of.

Return Values

String - The path for the specified folder.

Remarks

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: GetLogicalDrives

GetLogicalDrives

Returns the logical drives installed on the local machine.

 Public Function GetLogicalDrives ( ) As String ( )

Return Values

String() - An array containing all of the logical drives installed.

Remarks

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: MachineName (get)

MachineName

Returns the name of the local computer.

 Public Property Get MachineName ( ) As String

Return Values

String - The name of the local computer.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: NewLine (get)

NewLine

Returns string of a newline character for the local computer.

 Public Property Get NewLine ( ) As String

Return Values

String - The newline characters.

Remarks

Being this always going to be in VB, the return is just vbCrLf.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: OSVersion (get)

OSVersion

Returns an object representing the current operating system.

 Public Property Get OSVersion ( ) As OperatingSystem

Return Values

OperatingSystem - The OperatingSystem object that represents the current OS.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: ParseCommandLineArgs

ParseCommandLineArgs

Provides a mechanism to parse arguments from a command line string.

 Public Function ParseCommandLineArgs(
      ByVal Line As String ) As String ( )

Parameters

Line
[ByVal] String. The string to parse the arguments from.

Return Values

String() - An array of arguments.

Remarks

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: ProcessorCount (get)

ProcessorCount

Returns the number of processors on the current machine.

 Public Property Get ProcessorCount ( ) As Long

Return Values

Long - The processor count.

Remarks

This method counts the number of process subkey entries located in the Hardware\Description\System\CentralProcessor' region of the HKEY_LOCAL_MACHINE registry key.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: SetEnvironmentVariable

SetEnvironmentVariable

Sets, creates, or deletes an environment variable in the specified region.

 Public Sub SetEnvironmentVariable(
      ByVal Variable As String,
      ByVal Value As String,
      Optional ByVal Target As EnvironmentVariableTarget = Process )

Parameters

Variable
[ByVal] String. The name of the variable to set the value for.
Value
[ByVal] String. The value of the variable.
Target
[ByVal] Optional. EnvironmentVariableTarget. The region the variable is located in the system.

Default: Process

Remarks

Setting the variable in the Process region only affects the current process that is setting the variable. Setting a variable in a User or Machine region will set the values in the registry.

by setting the value to an empty string, the variable will be deleted.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: SpecialFolder

SpecialFolder

This enum represents a list of folders accessible using GetFolderPath. These definitions are from the Microsoft Dot NET 1.1 MSDN Library.

 Public Enum SpecialFolder

Values

ApplicationData = &H1A
The directory that serves as a common repository for application-specific data for the current roaming user. A roaming user works on more than one computer on a network. A roaming users profile is kept on a server on the network and is loaded onto a system when the user logs on.
CommonApplicationData = &H23
The directory that serves as a common repository for application-specific data that is used by all users.
CommonProgramFiles = &H2B
The directory for components that are shared across applications.
Cookies = &H21
The directory that serves as a common repository for Internet cookies.
Desktop = &H0
The logical Desktop rather than the physical file system location.
DesktopDirectory = &H10
The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder.
Favorites = &H6
The directory that serves as a common repository for the users favorite items.
History = &H22
The directory that serves as a common repository for Internet history items.
InternetCache = &H20
The directory that serves as a common repository for temporary Internet files.
LocalApplicationData = &H1C
The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user.
MyComputer = &H11
The "My Computer" folder.
MyMusic = &HD
The "My Music" folder.
MyPictures = &H27
The "My Pictures" folder.
Personal = &H5
The directory that serves as a common repository for documents (My Documents).
ProgramFiles = &H26
The program files folder.
Programs = &H2
The directory that contains the users program groups.
Recent = &H8
The directory that contains the users most recently used documents.
SendTo = &H9
The directory that contains the Send To menu items.
StartMenu = &HB
The directory that contains the Start menu items.
Startup = &H7
The directory that corresponds to the users Startup program group. The system starts these programs whenever a user logs on or starts Windows NT or later, or starts Windows 98.
SystemDir = &H25
The system directory.
Templates = &H15
The directory that serves as a common repository for document templates.
Windows = &H24
The windows directory.

Remarks

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: SystemDirectory (get)

SystemDirectory

Returns the System directory for the current OS.

 Public Property Get SystemDirectory ( ) As String

Return Values

String - The system directory.

Remarks

Generally this will be C:\Windows\System32 or C:\Winnt\System32 for NT4 system.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: TickCount (get)

TickCount

Returns the number of milliseconds the system has been running since it started.

 Public Property Get TickCount ( ) As Long

Return Values

Long - Number of milliseconds since the system booted up.

Remarks

Once the maximum value is reached, it will wrap around to be negative, at which point negative values will be returned until 0 is reached. Wrapping to negative will take place in approximatively 24.85 days.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: UserDomainName (get)

UserDomainName

Returns the name of the local machine within a domain

 Public Property Get UserDomainName ( ) As String

Return Values

String - The computer name within a domain.

Remarks

Typically the domain name is the name of the machine, but can change depending on the application being deployed.

UserDomainName is not supported on Windows 95, 98, ME platforms and will throw a PlatformNotSupportedException exception.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: UserInteractive (get)

UserInteractive

Determines if the current application is allowed to have user interaction.

 Public Property Get UserInteractive ( ) As Boolean

Return Values

Boolean - Indication if user interaction is allowed.

Remarks

This is used primarily for when the application is a service. It can be used to supress message dialogs and user entry when not allowed.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: UserName (get)

UserName

Returns the name of the currently logged in user of the local computer.

 Public Property Get UserName ( ) As String

Return Values

String - The currently logged in users name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


Environment: WorkingSet (get)

WorkingSet

Returns the amount of physical memory the current application is allocated.

 Public Property Get WorkingSet ( ) As Long

Return Values

Long - The amount of memory allocated to the application.

Remarks

This method only works for NT installations. 95, 98, and ME will receive a 0 when this method is called.

Read Only.

See Also

Project VBCorLib Overview | Class Environment Overview


EventArgs

EventArgs

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

This should be overriden for different forms of equality. An example would be if this class contained a Name property and equality is determined by the names.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Methods:

Name | Description
Equals |
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


EventArgs: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class EventArgs Overview


EventArgs: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class EventArgs Overview


EventArgs: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class EventArgs Overview


EventArgsStatic

EventArgsStatic

Represents an event with no data.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
EmptyArgs (get) |


Exception

Exception

This is the base class from which all exception derive their interface.

Remarks

This class is the base class for all exceptions. When an error occurs, either the system or the currently executing application reports it by throwing an exception containing information about the error. Once thrown, an exception is handled by the application or by the default exception handler. There are two methods of raising an error: Using the classical VB approach Err.Raise. This method does not place an exception object in holding to be caught. In order to catch the error using the Catch method, call Catch passing in an exception variable and also the Err object. This will create an Exception object with the Err information. Use this method if an error might be raised by code that does not use the Throw method. Using the VBCorLib approach of Throw {exception object}. This method does place the exception in holding to be caught. It then raises an error using the standard Err.Raise method giving the information within the exception object. This allows for the error to be caught by error traps not utilzing the Throw/Catch style. To catch the exception using Catch, an error trap is still required. Once in the trap call Catch passing in an exception variable that is set to the held exception object. Catch will return True if an exception was caught, False otherwise.

Example:

This example demonstrates catching an exception and determining the type of exception caught. The FileNotFoundException type is tested for to show how exception types can be determined.
 Private Sub Form_Load()
     Dim fs As FileStream

     On Error GoTo CatchIt
     Set fs = NewFileStream("missing.txt", OpenExisting)

 CatchIt:
     Dim ex As Exception
     If Catch(ex) Then
         If TypeOf ex Is FileNotFoundException Then
             Call Console.WriteLine("FileNotFoundException Handler: {0}", ex.ToString)
         Else
             Call Console.WriteLine("Generic Exception Handler: {0}", ex.ToString)
         End If
     End If
 End Sub

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


Exception: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview | Exception


Exception: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview | Exception


Exception: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewException.

Read Only.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class Exception Overview


Exception: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class Exception Overview


ExceptionBase

ExceptionBase

This is a helper class to easily manage an exception type class.

Remarks

This class should be used as a contained object that functions can be delegated to and performed with. This class contains the primary functions and properties common to all exceptions.

If the user-derived exception class needs to handle more information than this base class manages, then the developer needs to implement those additional features directly into the derived class.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
Data (get) | Returns a key/value set of data that is associated to the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HResult the current exception represents.
HResult (let) | Sets the HResult the current exception represents.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
InnerException (set) | Sets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Message (let) | Sets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
GetValue | Returns a value being maintained in the exception base class.
SetValue | Sets a value that can be associated with the exception without needing to maintain the value in the Subclass exception class.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ExceptionBase: Data (get)

Data

Returns a key/value set of data that is associated to the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - a key/value set of data that is associated to the exception.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the Subclass exception.

Return Values

Boolean - Returns True if Value IS Subclass, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then the Subclass is returned as the base exception because it did not have an inner exception, so it is assumed that the Subclass exception is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the Subclass object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the Subclass object.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: GetValue

GetValue

Returns a value being maintained in the exception base class.

 Public Function GetValue(
      ByVal Name As String,
      Optional ByRef Default As Variant ) As Variant

Parameters

Name
[ByVal] String. The name of the value to retrieve.
Default
[ByRef] Optional. Variant. The value to be returned if the value doesnt exist.

Return Values

Variant -

Remarks

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: HResult (get)

HResult

Gets the HResult the current exception represents.

 Public Property Get HResult ( ) As Long

Return Values

Long - The HResult.

Remarks

This is the same as Err.Number in most cases. Since this is a helper base class, it can hold any custom value needed for use by the Subclass.

This property can be set in the constructor NewExceptionBase.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: HResult (let)

HResult

Sets the HResult the current exception represents.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new HResult value.

Remarks

This is the same as Err.Number in most cases. Since this is a helper base class, it can hold any custom value needed for use by the Subclass.

This property can be set in the constructor NewExceptionBase.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: InnerException (set)

InnerException

Sets the exception that caused the Subclassed exception to be thrown.

 Public Property Set InnerException(
      ByVal RHS As Exception )

Parameters

RHS
[ByVal] Exception. The exception that caused this Subclass exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

The Subclass exception should not allow the InnerException to be changed.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewExceptionBase.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: Message (let)

Message

Sets the error message associated with the Subclass exception.

 Public Property Let Message(
      ByVal NewMessage As String )

Parameters

NewMessage
[ByVal] String. The message to set the base to. Setting this to vbNullString will cause GetMessage to return the default message.

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewExceptionBase.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: SetValue

SetValue

Sets a value that can be associated with the exception without needing to maintain the value in the Subclass exception class.

 Public Sub SetValue(
      ByVal Name As String,
      ByRef Value As Variant )

Parameters

Name
[ByVal] String. The name of the value to set.
Value
[ByRef] Variant. The value to set.

Remarks

If the value already exists, it will be replaced.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionBase: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString(
      Optional ByVal FormattedMessage As String )

Parameters

FormattedMessage
[ByVal] Optional. String. This allows the Subclass to pass in a formatted version of the original message to be used in creating the resulting string. If the message is not passed in, then the internal GetMessage method will be used.

Return Values

Variant - A formatted message containing both the name of the parent subclass and the message itself.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ExceptionBase Overview


ExceptionMethods

ExceptionMethods

Defines public exception management functions Throw and Catch.

Remarks

Error processing can be a fundamental process in creating robust applications in Visual Basic. VBCorLib provides a wide range of exception classes that can be used to capture details for an error that may occur.

By using Throw and Catch to handle exception objects, a robust error handling mechanism can be created.

See Also

Project VBCorLib Overview | Exception

Public:

Methods:

Name | Description
Catch | Catch provides a mechanism for retrieving an exception object that was set using the Throw function.
ClearException | Clears any exception that may not have been caught yet.
Throw | Raises an error using the supplied exception object. The exception is then set and ready to be caught using Catch.


ExceptionMethods: Catch

Catch

Catch provides a mechanism for retrieving an exception object that was set using the Throw function.

 Public Function Catch(
      ByRef Ex As Exception,
      Optional ByVal Err As ErrObject ) As Boolean

Parameters

Ex
[ByRef] Exception. ex is set to the exception object that is caught.
Err
[ByVal] Optional. ErrObject. Used when the exception was not thrown by VBCorLib directly.

Return Values

Boolean - Indicates if an exception was actually caught.

Remarks

Returns True if an exception has been caught, setting the ex parameter to the exception object. By retrieving an exception object, the error that occurred can be determined along with any specific details included. In order to catch an exception, error trapping must be used as normal. During error trapping procedures, a call to Catch will attempt to retrieve an exception, returning an indication on whether an exception was caught.

If Throw was not used to raise an error, then the ErrObject must be passed into the function to retrieve the error information. This is because each loaded module (dll, exe, ...) will have its own ErrObject, so VBCorLib has no way of retrieving the error information for modules other than itself. If errors outside of VBCorLib are created using Throw, then the ErrObject does not need to be passed into the Catch function.

If the source of the error will always be from VBCorLib then the ErrObject does not need to be supplied. If the source is not VBCorLib or is unknown, then pass in the ErrObject. Passing in the ErrObject will not affect catching exceptions thrown by VBCorLib.

To clear an existing exception, call Catch and pass in Nothing as the exception variable.

Example

This shows how to catch an exception thrown within the same function.
     On Error Goto errTrap
     Throw NewFileNotFoundException("Could not find your file.")

    '... code

 errTrap:
     Dim ex As Exception

     If Catch(ex) Then
         If TypeOf ex Is FileNotFoundException Then
             MsgBox "You will need to enter another filename."
         Else
             MsgBox "Error: " & ex.Message
         End If
     End If
Once an exception has been caught, it can be inspected to determine the appropriate course of action.

The error trap section is a typical implementation of catching a VBCorLib exception.

If an error is raised using the Throw function, then the exception object will remain ready to be caught until Catch is called. This is similar to using On Error Resume Next and not clearing any errors that may occur. The ErrObject will contain any error information until some event clears it. This can lead to problems later on in the code when an exception is checked using Catch, and an older exception is still set. The exception may need to be cleared to prevent unwanted exceptions from being caught.

See Also

Project VBCorLib Overview | Class ExceptionMethods Overview | Constructors | Exception


ExceptionMethods: ClearException

ClearException

Clears any exception that may not have been caught yet.

 Public Sub ClearException ( )

Remarks

Sometimes an exception can be thrown, but ignored and not caught. This could cause problems later in code if the Catch method is called and an exception has not been thrown. The previous exception may still remain ready to be caught even though the error trapping has passed for that previous exception.

See Also

Project VBCorLib Overview | Class ExceptionMethods Overview | Exception


ExceptionMethods: Throw

Throw

Raises an error using the supplied exception object. The exception is then set and ready to be caught using Catch.

 Public Sub Throw(
      Optional ByVal Ex As Object )

Parameters

Ex
[ByVal] Optional. Object. The exception object used to raise an error. This will accept any object that implements the Exception interface or an ErrObject. All exception classes in VBCorLib implement Exception.

Remarks

VBCorLib provides a wide range of exception objects that can be used to define specific errors that occur during the execution of an application. In order to use the exception objects through VBCorLib, they must first be Thrown. Throwing an exception object is similar to raising an error using Visual Basics standard method of Err.Raise.

To throw an exception, it must be passed into the Throw function. This will store the exception object so it can be retrieved (Caught) during error trapping.

 ' Throwing an exception directly is the simplest method.
 Throw New Exception
This creates a new Exception object and passes it directly into the Throw function. The function then sets the object to be caught and raises an error using the HResult, Source, and Message properties. These properties corrispond to the Err.Number, Err.Source, and Err.Description parameters used when raising an error.

Exceptions that are to be thrown should be constructed with meaningful information before being passed into the Throw function.

An Exception that occurs but is not caught using Catch can be rethrown by calling Throw without any parameters. This causes the Throw function to check if a pending Exception already exists, and if so, rethrow it. This does not clear an exception.

See Also

Project VBCorLib Overview | Class ExceptionMethods Overview | Constructors | Exception


ExternalException

ExternalException

Returns a key/value collection used to contain user-defined specific information about the exception.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

See Also

Project VBCorLib Overview

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) |
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ExternalException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview | Exception


ExternalException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview | Exception


ExternalException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewException.

Read Only.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ExternalException Overview


ExternalException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ExternalException Overview


File

File

Provides methods for manipulating and retrieving file information.

Remarks

This class cannot be directly created. To access the methods use the variable name directly.

 Debug.Print File.Exists("MyFile.txt")

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
AppendAllText | Append a text string to the end of a specified file using the supplied encoding.
AppendText | Opens a file to be written to starting at the end of the file.
Copy | Copies a file.
Create | Creates a file. If the file already exists, it is overwritten.
CreateText | Creates a file using a UTF8Encoding. If the file already exists, then it is overwritten.
Delete | Deletes a file.
Exists | Determines if a file exists.
GetAttributes | Returns the file attributes (ReadOnly, Hidden, ...)
GetCreationTime | Returns the time the file was created in local time.
GetCreationTimeUtc | Returns the time the file was created in UTC time.
GetLastAccessTime | Returns the time the file was accessed in local time.
GetLastAccessTimeUtc | Returns The last time a file was accessed in UTC time.
GetLastWriteTime | Returns the last time the file was written to in local time.
GetLastWriteTimeUtc | Returns the last time the file was written to in UTC time.
Move | Moves a file from one location to another.
OpenFile | Opens a file with a FileStream
OpenRead | Opens a file for reading as a FileStream.
OpenText | Opens a file for reading through a StreamReader.
OpenWrite | Opens a file for writing as a FileStream.
ReadAllBytes | Reads an entire file into a byte array.
ReadAllLines | Opens a file, reads all lines in a file into an array and closes the files.
ReadAllText | Reads the entire contents of a file and returns it as a String.
SetAttributes | Sets the file attributes (ReadOnly, Hidden, ...)
SetCreationTime | Sets the time of creation for a file in local time.
SetCreationTimeUtc | Sets the time of creation for a file in UTC time.
SetLastAccessTime | Sets the last time the file was accessed in local time.
SetLastAccessTimeUtc | Sets the last time the file was accessed in UTC time.
SetLastWriteTime | Sets the last time the file was written to in local time.
SetLastWriteTimeUtc | Sets the last time the file was written to in UTC time.
WriteAllbytes | Opens a file, writes all bytes to the file, then closes the file.
WriteAllLines | Opens a file, writes all strings to the file with appended new line values, then closes the file.
WriteAllText | Opens a files, writes out all contents to the file, then closes the file.


File: AppendAllText

AppendAllText

Append a text string to the end of a specified file using the supplied encoding.

 Public Sub AppendAllText(
      ByVal Path As String,
      ByVal Contents As String,
      Optional ByVal Encoding As Encoding )

Parameters

Path
[ByVal] String. The file to append the text to.
Contents
[ByVal] String. The string to append to the file.
Encoding
[ByVal] Optional. Encoding. The encoding used to encode the contents (Default UTF8).

Remarks

This method opens a file, appends the contents then closes the file in the call. If multiple lines need to be appended, then using this method may have performance problems.

If the file doesnt exist it will be created. If the file already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class File Overview


File: AppendText

AppendText

Opens a file to be written to starting at the end of the file.

 Public Function AppendText(
      ByVal Path As String ) As StreamWriter

Parameters

Path
[ByVal] String. The name of the file to be appended to.

Return Values

StreamWriter - A StreamWriter object used to write to the file.

Remarks

The StreamWriter uses a UTF8Encoding declared as Cor.NewUTF8Encoding(False, True).

See Also

Project VBCorLib Overview | Class File Overview | StreamWriter


File: Copy

Copy

Copies a file.

 Public Sub Copy(
      ByVal SourceFileName As String,
      ByVal DestinationFileName As String,
      Optional ByVal OverWrite As Boolean = False )

Parameters

SourceFileName
[ByVal] String. The file to be copied.
DestinationFileName
[ByVal] String. The location and name of the copied file.
OverWrite
[ByVal] Optional. Boolean. Indicates if the file already exists it should be overwritten.

Default: False

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: Create

Create

Creates a file. If the file already exists, it is overwritten.

 Public Function Create(
      ByVal Path As String,
      Optional ByVal BufferSize As Long = 4096 ) As FileStream

Parameters

Path
[ByVal] String. The new file to be created.
BufferSize
[ByVal] Optional. Long. The size of the internal buffer used byte the FileStream object.

Default: 4096

Return Values

FileStream - A FileStream object to be used for reading and writing to the file.

Remarks

The FileStream is declared as Cor.NewFileStream(Path, FileMode.Create, FileAccess.ReadWriteAccess, FileShare.None, BufferSize).

See Also

Project VBCorLib Overview | Class File Overview | FileStream


File: CreateText

CreateText

Creates a file using a UTF8Encoding. If the file already exists, then it is overwritten.

 Public Function CreateText(
      ByVal Path As String ) As StreamWriter

Parameters

Path
[ByVal] String. The new file to be created.

Return Values

StreamWriter - A StreamWriter to be used to write to the new file.

Remarks

The StreamWriter is declared as Cor.NewStreamWriter(Path).

See Also

Project VBCorLib Overview | Class File Overview | StreamWriter


File: Delete

Delete

Deletes a file.

 Public Sub Delete(
      ByVal Path As String )

Parameters

Path
[ByVal] String. The file to be deleted.

Remarks

If the file did not exist, nothing happens.

See Also

Project VBCorLib Overview | Class File Overview


File: Exists

Exists

Determines if a file exists.

 Public Function Exists(
      ByVal Path As String ) As Boolean

Parameters

Path
[ByVal] String. The file to check for existence.

Return Values

Boolean - Whether the file exists or not.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetAttributes

GetAttributes

Returns the file attributes (ReadOnly, Hidden, ...)

 Public Function GetAttributes(
      ByVal Path As String ) As FileAttributes

Parameters

Path
[ByVal] String. The file to retrieve the attributes for.

Return Values

FileAttributes - A value with individual bits representing if an attribute is applied to the file.

Remarks

To determine if a specific attribute is being used, the return value will need to be ANDed with the specific FileAttributes flag.

 If Attr And FileAttributes.ReadOnly Then
     '... file is readonly
 End If

See Also

Project VBCorLib Overview | Class File Overview


File: GetCreationTime

GetCreationTime

Returns the time the file was created in local time.

 Public Function GetCreationTime(
      ByVal Path As String ) As cDateTime

Parameters

Path
[ByVal] String. The file to retrieve the creation time of.

Return Values

cDateTime - A cDateTime object representing the creation time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetCreationTimeUtc

GetCreationTimeUtc

Returns the time the file was created in UTC time.

 Public Function GetCreationTimeUtc(
      ByVal sPath As String ) As cDateTime

Parameters

sPath
[ByVal] String. The file to retrieve the creation time of.

Return Values

cDateTime - A cDateTime object representing the creation time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetLastAccessTime

GetLastAccessTime

Returns the time the file was accessed in local time.

 Public Function GetLastAccessTime(
      ByVal sPath As String ) As cDateTime

Parameters

sPath
[ByVal] String. The file to retrieve the last access time for.

Return Values

cDateTime - A cDateTime object that represents the last time the file was accessed.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetLastAccessTimeUtc

GetLastAccessTimeUtc

Returns The last time a file was accessed in UTC time.

 Public Function GetLastAccessTimeUtc(
      ByVal sPath As String ) As cDateTime

Parameters

sPath
[ByVal] String. The file to get the last accessed time for.

Return Values

cDateTime - A cDateTime object representing the last time the file was accessed.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetLastWriteTime

GetLastWriteTime

Returns the last time the file was written to in local time.

 Public Function GetLastWriteTime(
      ByVal sPath As String ) As cDateTime

Parameters

sPath
[ByVal] String. The file to retrieve the last written time for.

Return Values

cDateTime - A cDateTime object representing the last time the file was written to.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: GetLastWriteTimeUtc

GetLastWriteTimeUtc

Returns the last time the file was written to in UTC time.

 Public Function GetLastWriteTimeUtc(
      ByVal sPath As String ) As cDateTime

Parameters

sPath
[ByVal] String. The file to retrieve the last written time for.

Return Values

cDateTime - A cDateTime object representing the last time a file was written to.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: Move

Move

Moves a file from one location to another.

 Public Sub Move(
      ByVal SourceFileName As String,
      ByVal DestinationFileName As String )

Parameters

SourceFileName
[ByVal] String. The file to be moved.
DestinationFileName
[ByVal] String. The location and filename the file is to be moved to.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: OpenFile

OpenFile

Opens a file with a FileStream

 Public Function OpenFile(
      ByVal Path As String,
      ByVal Mode As FileMode,
      Optional ByVal Access As FileAccess = - 1,
      Optional ByVal Share As FileShare = FileShare. None ) As FileStream

Parameters

Path
[ByVal] String. The file to be opened.
Mode
[ByVal] FileMode. The mode in which to open the file.
Access
[ByVal] Optional. FileAccess. The type of access allowed by the FileStream.

Default: - 1

Share
[ByVal] Optional. FileShare. The access allowed for other processes.

Default: FileShare . None

Return Values

FileStream - A FileStream object of the specified file.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: OpenRead

OpenRead

Opens a file for reading as a FileStream.

 Public Function OpenRead(
      ByVal Path As String ) As FileStream

Parameters

Path
[ByVal] String. The file to be opened in read mode.

Return Values

FileStream - A FileStream used to read from the file.

Remarks

The FileStream object is declared as Cor.NewFileStream(Path, FileMode.OpenExisting, FileAccess.ReadAccess, FileShare.ReadShare).

See Also

Project VBCorLib Overview | Class File Overview


File: OpenText

OpenText

Opens a file for reading through a StreamReader.

 Public Function OpenText(
      ByVal Path As String ) As StreamReader

Parameters

Path
[ByVal] String. The file to be opened for reading.

Return Values

StreamReader - A StreamReader used to read from the file with the default encoding (UTF8Encoding).

Remarks

The StreamReader is declared as Cor.NewStreamReader(Path).

See Also

Project VBCorLib Overview | Class File Overview


File: OpenWrite

OpenWrite

Opens a file for writing as a FileStream.

 Public Function OpenWrite(
      ByVal Path As String ) As FileStream

Parameters

Path
[ByVal] String. The file to be opend for writing to.

Return Values

FileStream - A FileStream object used to write to the specified file.

Remarks

The FileStream object is declared as Cor.NewFileStream(Path, FileMode.OpenOrCreate, FileAccess.WriteAccess, FileShare.None).

See Also

Project VBCorLib Overview | Class File Overview


File: ReadAllBytes

ReadAllBytes

Reads an entire file into a byte array.

 Public Function ReadAllBytes(
      ByVal Path As String ) As Byte ( )

Parameters

Path
[ByVal] String. The path and filename to read into the byte array.

Return Values

Byte() - A byte array containing the contents of the file.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: ReadAllLines

ReadAllLines

Opens a file, reads all lines in a file into an array and closes the files.

 Public Function ReadAllLines(
      ByVal Path As String,
      Optional ByVal Encoding As Encoding ) As String ( )

Parameters

Path
[ByVal] String. The path and filename of the file to read in.
Encoding
[ByVal] Optional. Encoding. The encoding to use to decode the file into text characters.

Return Values

String() - A String array containing all of the lines in the file.

Remarks

The end of a line is indicated when either a Return (13), LineFeed (10), or a Return-LineFeed combination have been encountered.

See Also

Project VBCorLib Overview | Class File Overview


File: ReadAllText

ReadAllText

Reads the entire contents of a file and returns it as a String.

 Public Function ReadAllText(
      ByVal Path As String,
      Optional ByVal Encoding As Encoding ) As String

Parameters

Path
[ByVal] String. The path and filename to read in.
Encoding
[ByVal] Optional. Encoding. The encoding to be used in reading the file.

Return Values

String - A string containing the contents of the file.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetAttributes

SetAttributes

Sets the file attributes (ReadOnly, Hidden, ...)

 Public Sub SetAttributes(
      ByVal sPath As String,
      ByVal Attributes As FileAttributes )

Parameters

sPath
[ByVal] String. The file to set the attributes of.
Attributes
[ByVal] FileAttributes. The new attributes to set the file to.

Remarks

In order to set a single attribute without unsetting an existing attributes, they will first need to be read from the file (GetAttributes), then bit manipulated to create the resulting set of desired attributes before setting.

See Also

Project VBCorLib Overview | Class File Overview


File: SetCreationTime

SetCreationTime

Sets the time of creation for a file in local time.

 Public Sub SetCreationTime(
      ByVal Path As String,
      ByVal CreationTime As Variant )

Parameters

Path
[ByVal] String. The file to set the time of creation for.
CreationTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetCreationTimeUtc

SetCreationTimeUtc

Sets the time of creation for a file in UTC time.

 Public Sub SetCreationTimeUtc(
      ByVal Path As String,
      ByVal CreationTime As Variant )

Parameters

Path
[ByVal] String. The file to set the time of creation for.
CreationTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetLastAccessTime

SetLastAccessTime

Sets the last time the file was accessed in local time.

 Public Sub SetLastAccessTime(
      ByVal Path As String,
      ByVal LastAccessTime As Variant )

Parameters

Path
[ByVal] String. The file to set the last access time for.
LastAccessTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetLastAccessTimeUtc

SetLastAccessTimeUtc

Sets the last time the file was accessed in UTC time.

 Public Sub SetLastAccessTimeUtc(
      ByVal Path As String,
      ByVal LastAccessTime As Variant )

Parameters

Path
[ByVal] String. The file to set the last access time for.
LastAccessTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetLastWriteTime

SetLastWriteTime

Sets the last time the file was written to in local time.

 Public Sub SetLastWriteTime(
      ByVal sPath As String,
      ByVal LastWriteTime As Variant )

Parameters

sPath
[ByVal] String. The file to set the last written time for.
LastWriteTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: SetLastWriteTimeUtc

SetLastWriteTimeUtc

Sets the last time the file was written to in UTC time.

 Public Sub SetLastWriteTimeUtc(
      ByVal sPath As String,
      ByVal LastWriteTime As Variant )

Parameters

sPath
[ByVal] String. The file to set the last written time for.
LastWriteTime
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

See Also

Project VBCorLib Overview | Class File Overview


File: WriteAllbytes

WriteAllbytes

Opens a file, writes all bytes to the file, then closes the file.

 Public Sub WriteAllbytes(
      ByVal Path As String,
      ByRef Bytes ( ) As Byte )

Parameters

Path
[ByVal] String. The path and filename of the file to write to.
Bytes
[ByRef] Byte. The bytes to be written to the file.

Remarks

If the file doesnt exist it will be created. If the file already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class File Overview


File: WriteAllLines

WriteAllLines

Opens a file, writes all strings to the file with appended new line values, then closes the file.

 Public Sub WriteAllLines(
      ByVal Path As String,
      ByRef Contents ( ) As String,
      Optional ByVal Encoding As Encoding )

Parameters

Path
[ByVal] String. The path and filename of the file to write to.
Contents
[ByRef] String. The strings to be written to the file.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when writing to the file.

Remarks

If the file doesnt exist it will be created. If the file already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class File Overview


File: WriteAllText

WriteAllText

Opens a files, writes out all contents to the file, then closes the file.

 Public Sub WriteAllText(
      ByVal Path As String,
      ByVal Contents As String,
      Optional ByVal Encoding As Encoding )

Parameters

Path
[ByVal] String. The path and filename of the file to write to.
Contents
[ByVal] String. The contents to write to the file.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when writing to the file.

Remarks

If the file does not exist, it will be created. If the file already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class File Overview


FileInfo

FileInfo

Provides methods for manipulating, setting and retrieving information for the specified file.

Remarks

The existence of the file is not verified until an action that requires accessing the file.

 Dim info As FileInfo
 Set info = NewFileInfo("c:\myfile.txt")
 Debug.Print info.Length

See Also

Project VBCorLib Overview | Constructors

Implements:

FileSystemInfo
IObject

Public:

Properties:

Name | Description
Attributes (get) | Returns the attributes for the file (ReadOnly, Hidden, ...)
Attributes (let) | Sets the attributes for the file (ReadOnly, Hiddin, ...)
CreationTime (get) | Returns the creation time as a cDateTime object.
CreationTime (let) | Sets the creation time of the file.
CreationTime (set) | Sets the creation time of the file.
CreationTimeUtc (get) | Returns the creation time as a UTC time.
CreationTimeUtc (let) | Sets the creation time of the file in UTC time.
CreationTimeUtc (set) | Sets the creation time of the file in UTC time.
Directory (get) | Returns a DirectoryInfo object of the directory portion of the file.
DirectoryName (get) | Returns the directory portion of the filename.
Exists (get) | Indicates if the file exists on disk.
Extension (get) | Returns the extension portion of the filename.
FullName (get) | Returns a full path to the file, including the filename.
LastAccessTime (get) | Returns the last time the file was accessed.
LastAccessTime (let) | Sets the time the file was last accessed.
LastAccessTime (set) | Sets the time the file was last accessed.
LastAccessTimeUtc (get) | Returns the time the file was last accessed in UTC time.
LastAccessTimeUtc (let) | Sets the time the file was last accessed in UTC time.
LastAccessTimeUtc (set) | Sets the time the file was last accessed in UTC time.
LastWriteTime (get) | Returns the last time the file was written to.
LastWriteTime (let) | Sets the last time the file was written to.
LastWriteTime (set) | Sets the last time the file was written to.
LastWriteTimeUtc (get) | Returns the last time the file was accessed in UTC time.
LastWriteTimeUtc (let) | Sets the last the time file was written to in UTC time.
LastWriteTimeUtc (set) | Sets the last time the file was written to in UTC time.
Length (get) | Returns the size of the file in bytes.
Name (get) | Returns the filename portion of the path.

Methods:

Name | Description
AppendText | Opens a StreamWriter for the file.
CopyTo | Copies this file to a new location, with optional overwrite.
Create | Creates this file and returns a FileStream object to access it.
CreateText | Returns a StreamWriter to write to this file.
Delete | Deletes this file.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
MoveTo | Moves this file to a new location.
OpenFile | Opens the file as a FileStream.
OpenRead | Returns a FileStream in ReadOnly mode.
OpenText | Returns a StreamReader to this file.
OpenWrite | Returns a FileStream with write access to the file.
Refresh | Reloads the file attributes and times.
ToString | Returns a string representation of this object instance.


FileInfo: AppendText

AppendText

Opens a StreamWriter for the file.

 Public Function AppendText ( ) As StreamWriter

Return Values

StreamWriter - A Stream writer to the file.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Attributes (get)

Attributes

Returns the attributes for the file (ReadOnly, Hidden, ...)

 Public Property Get Attributes ( ) As FileAttributes

Return Values

FileAttributes - The attributes of the file.

Remarks

The attributes are represented as bits. Each attributes has a specific bit. To test if a specific attribute exists, the attributes need to be ANDed with the individual attribute bits.

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Attributes (let)

Attributes

Sets the attributes for the file (ReadOnly, Hiddin, ...)

 Public Property Let Attributes(
      ByVal RHS As FileAttributes )

Parameters

RHS
[ByVal] FileAttributes. The attributes to set the file to.

Remarks

All attributes are set at once. In order to modify a single attribute, the remaining attribute settings need to be included with the modified attribute.

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CopyTo

CopyTo

Copies this file to a new location, with optional overwrite.

 Public Sub CopyTo(
      ByVal DestFileName As String,
      Optional ByVal OverWrite As Boolean )

Parameters

DestFileName
[ByVal] String. The new filename this file will be copied as.
OverWrite
[ByVal] Optional. Boolean. Permission to overwrite an existing file.

Remarks

The destination must be on the same volume as this file.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Create

Create

Creates this file and returns a FileStream object to access it.

 Public Function Create ( ) As FileStream

Return Values

FileStream - A FileStream object used to access the created file.

Remarks

If the file does not exist it will be created. If it already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreateText

CreateText

Returns a StreamWriter to write to this file.

 Public Function CreateText ( ) As StreamWriter

Return Values

StreamWriter - The StreamWriter for writing to this file.

Remarks

If the file does not exist it will be created. If it already exists, it will be overwritten.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTime (get)

CreationTime

Returns the creation time as a cDateTime object.

 Public Property Get CreationTime ( ) As Variant

Return Values

Variant - The creation time of the file.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTime (let)

CreationTime

Sets the creation time of the file.

 Public Property Let CreationTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTime (set)

CreationTime

Sets the creation time of the file.

 Public Property Set CreationTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTimeUtc (get)

CreationTimeUtc

Returns the creation time as a UTC time.

 Public Property Get CreationTimeUtc ( ) As Variant

Return Values

Variant - The creation time of the file in UTC time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTimeUtc (let)

CreationTimeUtc

Sets the creation time of the file in UTC time.

 Public Property Let CreationTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: CreationTimeUtc (set)

CreationTimeUtc

Sets the creation time of the file in UTC time.

 Public Property Set CreationTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Delete

Delete

Deletes this file.

 Public Sub Delete ( )

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Directory (get)

Directory

Returns a DirectoryInfo object of the directory portion of the file.

 Public Property Get Directory ( ) As DirectoryInfo

Return Values

DirectoryInfo - A DirectoryInfo object of the directory.

Remarks

This does not verify the file exists, or the directory.

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: DirectoryName (get)

DirectoryName

Returns the directory portion of the filename.

 Public Property Get DirectoryName ( ) As String

Return Values

String - The directory portion of the filename.

Remarks

This does not very the existence of the file.

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Exists (get)

Exists

Indicates if the file exists on disk.

 Public Property Get Exists ( ) As Boolean

Return Values

Boolean - An indication of the existence of the file.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Extension (get)

Extension

Returns the extension portion of the filename.

 Public Property Get Extension ( ) As String

Return Values

String - The extension portion of the filename.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: FileSystemInfo

FileSystemInfo

 Implements FileSystemInfo

Return Values

FileSystemInfo -

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: FullName (get)

FullName

Returns a full path to the file, including the filename.

 Public Property Get FullName ( ) As String

Return Values

String - A full path to the file.

Remarks

If not root directory portion is found in the filename, then the currenct directory is used.

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTime (get)

LastAccessTime

Returns the last time the file was accessed.

 Public Property Get LastAccessTime ( ) As Variant

Return Values

Variant - A cDateTime object of the last access time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTime (let)

LastAccessTime

Sets the time the file was last accessed.

 Public Property Let LastAccessTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTime (set)

LastAccessTime

Sets the time the file was last accessed.

 Public Property Set LastAccessTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTimeUtc (get)

LastAccessTimeUtc

Returns the time the file was last accessed in UTC time.

 Public Property Get LastAccessTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the last accessed UTC time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTimeUtc (let)

LastAccessTimeUtc

Sets the time the file was last accessed in UTC time.

 Public Property Let LastAccessTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new UTC time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastAccessTimeUtc (set)

LastAccessTimeUtc

Sets the time the file was last accessed in UTC time.

 Public Property Set LastAccessTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new UTC time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTime (get)

LastWriteTime

Returns the last time the file was written to.

 Public Property Get LastWriteTime ( ) As Variant

Return Values

Variant - A cDateTime object of the last time the file was written to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTime (let)

LastWriteTime

Sets the last time the file was written to.

 Public Property Let LastWriteTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTime (set)

LastWriteTime

Sets the last time the file was written to.

 Public Property Set LastWriteTime(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTimeUtc (get)

LastWriteTimeUtc

Returns the last time the file was accessed in UTC time.

 Public Property Get LastWriteTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the last time the file was written to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTimeUtc (let)

LastWriteTimeUtc

Sets the last the time file was written to in UTC time.

 Public Property Let LastWriteTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: LastWriteTimeUtc (set)

LastWriteTimeUtc

Sets the last time the file was written to in UTC time.

 Public Property Set LastWriteTimeUtc(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Length (get)

Length

Returns the size of the file in bytes.

 Public Property Get Length ( ) As Currency

Return Values

Currency - The size of the file.

Remarks

A Currency datatype is used to allow file sizes greater than 2gig.

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: MoveTo

MoveTo

Moves this file to a new location.

 Public Sub MoveTo(
      ByVal DestFileName As String )

Parameters

DestFileName
[ByVal] String. The new location and name of the file.

Remarks

The new location must be on the same volume as the source filename.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Name (get)

Name

Returns the filename portion of the path.

 Public Property Get Name ( ) As String

Return Values

String - The filename and extension.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: OpenFile

OpenFile

Opens the file as a FileStream.

 Public Function OpenFile(
      ByVal Mode As FileMode,
      Optional ByVal Access As FileAccess = ReadWriteAccess,
      Optional ByVal Share As FileShare = FileShare. None ) As FileStream

Parameters

Mode
[ByVal] FileMode. The method of opening the file.
Access
[ByVal] Optional. FileAccess. The read/write operations allowed by this FileStream.

Default: ReadWriteAccess

Share
[ByVal] Optional. FileShare. The read/write operations allows by other processes.

Default: FileShare . None

Return Values

FileStream - A FileStream object to this file.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: OpenRead

OpenRead

Returns a FileStream in ReadOnly mode.

 Public Function OpenRead ( ) As FileStream

Return Values

FileStream - A FileStream that has ReadOnly access to the file.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: OpenText

OpenText

Returns a StreamReader to this file.

 Public Function OpenText ( ) As StreamReader

Return Values

StreamReader - A StreamReader for reading the file.

Remarks

The StreamReaders default encoding is used.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: OpenWrite

OpenWrite

Returns a FileStream with write access to the file.

 Public Function OpenWrite ( ) As FileStream

Return Values

FileStream - A FileStream used to write to the file.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: Refresh

Refresh

Reloads the file attributes and times.

 Public Sub Refresh ( )

Remarks

This will verify that the file exists.

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileInfo Overview


FileNotFoundException

FileNotFoundException

An exception thrown when a specified file was not found.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
IOException
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
FileName (get) | Gets the name of the file that could not be found.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


FileNotFoundException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: FileName (get)

FileName

Gets the name of the file that could not be found.

 Public Property Get FileName ( ) As String

Return Values

String - The name of the file that could not be found, or an empty string if not filename was supplied.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview | Exception


FileNotFoundException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview | Exception


FileNotFoundException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: IOException

IOException

 Implements IOException

Return Values

IOException -

Remarks

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileNotFoundException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class FileNotFoundException Overview


FileStream

FileStream

Represents a file as a Stream.

Remarks

A FileStream object cannot be created directly. In order to create a new FileStream object, use the Cor.NewFileStream method.

The FileStream can be used to create and modify files saved to disk. Through the stream the file can be navigated to specified byte positions within the file and the data can be read or written. Writing data will overwrite the data currently in the file at that location. As data is read or written, the file pointer is advanced the number of bytes read or written.

Additionally, and existing handle to a file, pipe, or mailslot can have a stream created around it. These streams are not seekable, meaning the position within the stream cannot be set manually. Reading and writing to these streams still cause the pointer to advance the appropriate number of bytes.

The FileStream object buffers reads and writes to the underlying stream for improved performance. It is assumed that several reads or several writes will occur repeatedly. This allows a single buffer to be used between reading and writing. If reading begins and there is data written, the data is flushed out to the stream to ensure the stream remains in sync. The buffer is then filled with BufferSize bytes for a quicker read.

Example

' This example creates a new file and writes an array
' of bytes containing the encoded string data. Once
' the file is written to, it is re-opened and read from
' recreating the original string for display.
Private Sub Main()
    Dim fs As FileStream
    Dim b() As Byte

    ' Encode a string using the default encoding scheme.
    b = Encoding.Default.GetBytes("Hello")

    ' Open a text file. If the file already exits, it
    ' will be overwritten.
    Set fs = NewFileStream("data.txt", FileMode.Create)

    ' Write the encoded bytes to the file stream
    fs.WriteBlock b, 0, cArray.GetLength(b)
    fs.CloseStream

    ' Re-open the the file using a new FileStream object.
    Set fs = NewFileStream("data.txt", FileMode.OpenExisting)

    ' Resize the byte array to hold all the bytes in the file.
    ReDim b(0 To fs.Length - 1)

    ' Read in all bytes in the file.
    fs.ReadBlock b, 0, fs.Length
    fs.CloseStream

    ' Decode the byte array back into a string
    ' and display the string.
    Console.WriteLine Encoding.Default.GetString(b)
    Console.ReadLine

End Sub

See Also

Project VBCorLib Overview | Constructors | Stream

Implements:

IObject
Stream

Public:

Types:

Name | Description
FileAccess | The accesses allowed to the FileStream.
FileMode | The modes in which to open a FileStream
FileShare | How the underlying stream can be shared with other processes.

Properties:

Name | Description
CanRead (get) | Returns an indication for the ability to read from the file stream.
CanSeek (get) | Returns an indication for the ability to seek within the file stream.
CanTimeout (get) | Returns if this object can timeout.
CanWrite (get) | Returns an indication for the ability to write to the file stream.
Handle (get) | Returns the handle to the underlying stream.
IsAsync (get) | Returns whether or not the FileStream was opened up in asynchronous mode.
Length (get) | The length of the current stream in bytes.
Name (get) | Returns the name of the underlying stream.
Position (get) | Returns the current position within the stream.
Position (let) | Sets the current position within the stream to be read from or written to.
ReadTimeout (get) | Returns the read timeout duration.
ReadTimeout (let) | Sets the read timeout duration.
WriteTimeout (get) | Returns the write timeout duration.
WriteTimeout (let) | Sets the write timeout duration.

Methods:

Name | Description
BeginRead | Begins an Asynchronous read operation (currently is only synchronous)
BeginWrite | Begins an asynchronous buffer write. Currently the FileStream class does not support asynchronous buffer writing.
CloseStream | Closes the current stream, flushing any data that may need to be written to the stream.
EndRead | Signifies the end of an asynchronous read from the stream.
EndWrite | Signifies the end of an asynchronous write to the stream.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Writes any data that may be in the write buffer to the underlying stream.
GetHashCode | Returns a pseudo-unique number identifying this instance.
LockStream | Locks a portion of a file to prevent write access for other processes.
ReadBlock | Reads a specified number of bytes into the given array.
ReadByte | Returns the next byte in the file stream starting at the current file position.
SeekPosition | Moves the file pointer to a new position relative to a specified reference.
SetLength | Sets the length of the stream to the specified length.
ToString | Returns a string representation of this object instance.
UnlockStream | Unlocks a portion of the file to allow write access to the stream for other processes.
WriteBlock | Writes an array of bytes to the stream.
WriteByte | Writes a single byte to the stream.


FileStream: BeginRead

BeginRead

Begins an Asynchronous read operation (currently is only synchronous)

 Public Function BeginRead(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The array to store the bytes that are read from the stream.
Offset
[ByVal] Long. The index in Buffer to begin storing bytes.
Count
[ByVal] Long. The number of bytes to be read from the stream.
Callback
[ByVal] Optional. AsyncCallback. An object that is called when the read operation is complete.
State
[ByVal] Optional. Variant. user-defined data to be kept with the Callback object for later retrieval.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding Endread and report information about the buffer read.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: BeginWrite

BeginWrite

Begins an asynchronous buffer write. Currently the FileStream class does not support asynchronous buffer writing.

 Public Function BeginWrite(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The source array to copy the bytes from into the stream.
Offset
[ByVal] Long. The starting index in the source Buffer to begin copying from.
Count
[ByVal] Long. The maximum number of bytes to be copied into the stream.
Callback
[ByVal] Optional. AsyncCallback. A user supplied object to be notified of the finish of the writing.
State
[ByVal] Optional. Variant. User data that can be carried within the IAsyncResult object return.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding EndBread and report information about the buffer read.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: CanRead (get)

CanRead

Returns an indication for the ability to read from the file stream.

 Public Property Get CanRead ( ) As Boolean

Return Values

Boolean - An indication for being able to read from the file stream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: CanSeek (get)

CanSeek

Returns an indication for the ability to seek within the file stream.

 Public Property Get CanSeek ( ) As Boolean

Return Values

Boolean - An indication for being able to seek within the file stream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: CanTimeout (get)

CanTimeout

Returns if this object can timeout.

 Public Property Get CanTimeout ( ) As Boolean

Return Values

Boolean - Always returns False for a FileStream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: CanWrite (get)

CanWrite

Returns an indication for the ability to write to the file stream.

 Public Property Get CanWrite ( ) As Boolean

Return Values

Boolean - An indication for being able to write to the file stream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: CloseStream

CloseStream

Closes the current stream, flushing any data that may need to be written to the stream.

 Public Sub CloseStream ( )

Remarks

If the stream was created around a handle and the stream was given ownership of the handle, then the handle will also be closed with the stream. Otherwise, only the stream will be closed, leaving the handle in its original state.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: EndRead

EndRead

Signifies the end of an asynchronous read from the stream.

 Public Function EndRead(
      ByVal AsyncResult As IAsyncResult ) As Long

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult object returned from the BeginRead function.

Return Values

Long - The number of bytes read from the stream in to Buffer in the BeginRead method.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: EndWrite

EndWrite

Signifies the end of an asynchronous write to the stream.

 Public Sub EndWrite(
      ByVal AsyncResult As IAsyncResult )

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult returned from the BeginWrite function.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: FileAccess

FileAccess

The accesses allowed to the FileStream.

 Public Enum FileAccess

Values

ReadAccess = &H80000000
Grants read permission to the FileStream.
WriteAccess = &H40000000
Grants write permission to the FileStream.
ReadWriteAccess = &HC0000000
Grants both read and write permissions to the FileStream.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: FileMode

FileMode

The modes in which to open a FileStream

 Public Enum FileMode

Values

Append = &H80
Opens an existing or creates a new file, then moves to the end for writing to begin at. Reading of the stream is not supported.
Create = 2
Creates a new file. If the file already exists, it is overwritten.
CreateNew = 1
Creates a new file. If the file already exists, then an IOException is thrown.
OpenExisting = 3
Opens an existing file. If the file does not exist, then a FileNotFoundException is thrown.
OpenOrCreate = 4
Opens an existing file. If the file does not exist, it will be created.
Truncate = 5
Opens an existing file and sets the file length to 0. If an attempt to read is made, then an exception will be thrown.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: FileShare

FileShare

How the underlying stream can be shared with other processes.

 Public Enum FileShare

Values

None = 0
The stream is not shared with other processes.
ReadShare = 1
Other processes can access the file with read access only.
WriteShare = 2
Other processes can access the file with write access only.
ReadWriteShare = 3
Other processes can access the file with read and write access.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Flush

Flush

Writes any data that may be in the write buffer to the underlying stream.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Handle (get)

Handle

Returns the handle to the underlying stream.

 Public Property Get Handle ( ) As Long

Return Values

Long - The handle for the underlying stream.

Remarks

If there is any information in the buffers, they are flushed back to the underlying stream before the handle is returned.

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: IsAsync (get)

IsAsync

Returns whether or not the FileStream was opened up in asynchronous mode.

 Public Property Get IsAsync ( ) As Boolean

Return Values

Boolean - Boolean indicating if the FileStream is in asynchronous mode or not.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Length (get)

Length

The length of the current stream in bytes.

 Public Property Get Length ( ) As Currency

Return Values

Currency - The number of bytes the current file is.

Remarks

If there is write data in the buffer, it will be flushed out to the file to allow for an accurate reading.

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: LockStream

LockStream

Locks a portion of a file to prevent write access for other processes.

 Public Sub LockStream(
      ByVal Position As Currency,
      ByVal Length As Currency )

Parameters

Position
[ByVal] Currency. The starting position in the file to begin locking.
Length
[ByVal] Currency. The number of bytes to be locked.

Remarks

Onces a section of the file is locked, read access is still allowed to other processes.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Name (get)

Name

Returns the name of the underlying stream.

 Public Property Get Name ( ) As String

Return Values

String - If the stream is a file, then the file name is returned, otherwise the name is unknown.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Position (get)

Position

Returns the current position within the stream.

 Public Property Get Position ( ) As Currency

Return Values

Currency - The current position within the stream.

Remarks

The current position is where the next byte is read from or written to. Once a byte has been read or written, the position is advanced byte 1 byte.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Position (let)

Position

Sets the current position within the stream to be read from or written to.

 Public Property Let Position(
      ByVal RHS As Currency )

Parameters

RHS
[ByVal] Currency. The new position in the stream.

Remarks

The position is an absolute byte position from the beginning of the file. If the new position is negative an exception is thrown. If the FileStream is opened in Append mode, then the position cannot be set to data within the original file.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: ReadBlock

ReadBlock

Reads a specified number of bytes into the given array.

 Public Function ReadBlock(
      ByRef Bytes ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The array to store the bytes that are read from the stream.
Offset
[ByVal] Long. The index in Buffer to begin storing bytes.
Count
[ByVal] Long. The number of bytes to be read from the stream.

Return Values

Long - The number of byte actually read from the stream.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: ReadByte

ReadByte

Returns the next byte in the file stream starting at the current file position.

 Public Function ReadByte ( ) As Long

Return Values

Long - The byte value at the current file position.

Remarks

If the file position is passed the end of the stream, then -1 is returned.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: ReadTimeout (get)

ReadTimeout

Returns the read timeout duration.

 Public Property Get ReadTimeout ( ) As Long

Return Values

Long - The timeout duration.

Remarks

This is not supported in FileStream. An exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: ReadTimeout (let)

ReadTimeout

Sets the read timeout duration.

 Public Property Let ReadTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The timeout duration in milliseconds.

Remarks

This is not supported in FileStream. An exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: SeekPosition

SeekPosition

Moves the file pointer to a new position relative to a specified reference.

 Public Function SeekPosition(
      ByVal Offset As Currency,
      ByVal Origin As SeekOrigin ) As Currency

Parameters

Offset
[ByVal] Currency. The number of bytes to move from the reference point. The value can be negative to move backwards.
Origin
[ByVal] SeekOrigin. The reference point to begin moving the file pointer from.

Return Values

Currency - The new position in the file stream.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: SetLength

SetLength

Sets the length of the stream to the specified length.

 Public Sub SetLength(
      ByVal Value As Currency )

Parameters

Value
[ByVal] Currency. The length of the new file in bytes.

Remarks

If the new value is less than the origin file, then the file will be truncated. If the new value is larger than the original, then the newly exposed bytes are of undefined value.

The stream must have Seek and Write support

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: Stream

Stream

 Implements Stream

Return Values

Stream -

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: UnlockStream

UnlockStream

Unlocks a portion of the file to allow write access to the stream for other processes.

 Public Sub UnlockStream(
      ByVal Position As Currency,
      ByVal Length As Currency )

Parameters

Position
[ByVal] Currency. The starting position in the file to begin unlocking.
Length
[ByVal] Currency. The number of bytes to be unlocked.

Remarks

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: WriteBlock

WriteBlock

Writes an array of bytes to the stream.

 Public Sub WriteBlock(
      ByRef Bytes ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long )

Parameters

Bytes
[ByRef] Byte. The source array to write to the stream.
Offset
[ByVal] Long. The index of the first byte in Buffer to be written to the stream.
Count
[ByVal] Long. The number of bytes to write from the array.

Remarks

The data to be written is buffered if there is enough room, otherwise, any data in the buffer is written to the stream, followed by the data in Buffer.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: WriteByte

WriteByte

Writes a single byte to the stream.

 Public Sub WriteByte(
      ByVal Value As Byte )

Parameters

Value
[ByVal] Byte. The value to be written to the stream.

Remarks

The value is written to the underlying buffer. Once the buffer is full, it is then flushed to the underlying stream and emptied to be reused.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: WriteTimeout (get)

WriteTimeout

Returns the write timeout duration.

 Public Property Get WriteTimeout ( ) As Long

Return Values

Long - The write timeout duration.

Remarks

This is not supported in FileStream. An exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileStream: WriteTimeout (let)

WriteTimeout

Sets the write timeout duration.

 Public Property Let WriteTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The timeout duration in milliseconds.

Remarks

This is not supported in FileStream. An exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class FileStream Overview


FileSystemInfo

FileSystemInfo

The FileSystemInfo interface is used to access both FileInfo and DirectoryInfo objects using the same code. This allows for similar properties and methods to be used on both files and directories with a single routine.

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
FileAttributes | Flags used to indicate properties of a file or directory.

Properties:

Name | Description
Attributes (get) | Returns the attributes for the FileSystemInfo entry.
Attributes (let) | Sets the attributes for the FileSystemInfo entry.
CreationTime (get) | Returns the time the FileSystemInfo entry was created in local time.
CreationTime (let) | Sets the time the FileSystemInfo entry was created in local time.
CreationTime (set) | Sets the time the FileSystemInfo entry was created in local time.
CreationTimeUtc (get) | Returns the time the FileSystemInfo entry was created in UTC time.
CreationTimeUtc (let) | Sets the time the FileSystemInfo entry was created in UTC time.
CreationTimeUtc (set) | Sets the time the FileSystemInfo entry was created in UTC time.
Exists (get) | Returns if the FileSystemInfo entry exists.
Extension (get) | Returns the extension portion of the name.
FullName (get) | Returns the full name of the entry.
LastAccessTime (get) | Returns the time the FileSystemInfo entry was last accessed in local time.
LastAccessTime (let) | Sets the time the FileSystemInfo entry was last accessed in local time.
LastAccessTime (set) | Sets the time the FileSystemInfo entry was last accessed in local time.
LastAccessTimeUtc (get) | Returns the time the FileSystemInfo entry was last accessed in UTC time.
LastAccessTimeUtc (let) | Sets the time the FileSystemInfo entry was last accessed in UTC time.
LastAccessTimeUtc (set) | Sets the time the FileSystemInfo entry was last accessed in UTC time.
LastWriteTime (get) | Returns the time the FileSystemInfo entry was last written to in local time.
LastWriteTime (let) | Sets the time the FileSystemInfo entry was last written to in local time.
LastWriteTime (set) | Sets the time the FileSystemInfo entry was last written to in local time.
LastWriteTimeUtc (get) | Returns the time the FileSystemInfo entry was last written to in UTC time.
LastWriteTimeUtc (let) | Sets the time the FileSystemInfo entry was last written to in UTC time.
LastWriteTimeUtc (set) | Sets the time the FileSystemInfo entry was last written to in UTC time.
Name (get) | Returns the name of the entry.

Methods:

Name | Description
Delete | Deletes the entry from disk.
Equals | Tests for equality with the passed in value.
GetHashCode | Returns a pseudo-unique number used to represent this instance.
Refresh | Reloads the entry with the most current information.
ToString | Returns a string representation of this instance.


FileSystemInfo: Attributes (get)

Attributes

Returns the attributes for the FileSystemInfo entry.

 Public Property Get Attributes ( ) As FileAttributes

Return Values

FileAttributes - The attributes for the FileSystemInfo entry.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Attributes (let)

Attributes

Sets the attributes for the FileSystemInfo entry.

 Public Property Let Attributes(
      ByVal RHS As FileAttributes ) :

Parameters

RHS
[ByVal] FileAttributes. The attributes the entry is set to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTime (get)

CreationTime

Returns the time the FileSystemInfo entry was created in local time.

 Public Property Get CreationTime ( ) As Variant

Return Values

Variant - A cDateTime object of the creation time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTime (let)

CreationTime

Sets the time the FileSystemInfo entry was created in local time.

 Public Property Let CreationTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTime (set)

CreationTime

Sets the time the FileSystemInfo entry was created in local time.

 Public Property Set CreationTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTimeUtc (get)

CreationTimeUtc

Returns the time the FileSystemInfo entry was created in UTC time.

 Public Property Get CreationTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the creation time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTimeUtc (let)

CreationTimeUtc

Sets the time the FileSystemInfo entry was created in UTC time.

 Public Property Let CreationTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: CreationTimeUtc (set)

CreationTimeUtc

Sets the time the FileSystemInfo entry was created in UTC time.

 Public Property Set CreationTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Delete

Delete

Deletes the entry from disk.

 Public Sub Delete ( )

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Equals

Equals

Tests for equality with the passed in value.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality against.

Return Values

Boolean - An indication of the equality.

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Exists (get)

Exists

Returns if the FileSystemInfo entry exists.

 Public Property Get Exists ( ) As Boolean

Return Values

Boolean - An indication of the entry existing.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Extension (get)

Extension

Returns the extension portion of the name.

 Public Property Get Extension ( ) As String

Return Values

String - The extension portion of the name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: FileAttributes

FileAttributes

Flags used to indicate properties of a file or directory.

 Public Enum FileAttributes

Values

ReadOnly = 1
The file or directory can only be read from.
Hidden = 2
The file or directory is to be hidden in normal file listings.
System = 4
The file or directory is system object and caution should be used.
DirectoryAttr = 16
The object is a directory.
Archive = 32
The file or directory is marked for backup.
Device = 64
Reserved for future use.
Normal = 128
The file is normal and has no other attributes set. This attribute is valid only if used alone.
Temporary = 256
The file is temporary. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
SparseFile = 512
The file is a sparse file. Sparse files are typically large files whose data are mostly zeros.
ReparsePoint = 1024
The file contains a reparse point, which is a block of user-defined data associated with a file or a directory.
Compressed = 2048
The file is compressed.
Offline = 4096
The file is offline. The data of the file is not immediately available.
NotContentIndexed = 8192
The file will not be indexed by the operating systems content indexing service.
Encrypted = 16384
The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and directories.

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: FullName (get)

FullName

Returns the full name of the entry.

 Public Property Get FullName ( ) As String

Return Values

String - The full name of the entry.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number used to represent this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - a pseudo-unique number used to represent this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTime (get)

LastAccessTime

Returns the time the FileSystemInfo entry was last accessed in local time.

 Public Property Get LastAccessTime ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTime (let)

LastAccessTime

Sets the time the FileSystemInfo entry was last accessed in local time.

 Public Property Let LastAccessTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTime (set)

LastAccessTime

Sets the time the FileSystemInfo entry was last accessed in local time.

 Public Property Set LastAccessTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTimeUtc (get)

LastAccessTimeUtc

Returns the time the FileSystemInfo entry was last accessed in UTC time.

 Public Property Get LastAccessTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTimeUtc (let)

LastAccessTimeUtc

Sets the time the FileSystemInfo entry was last accessed in UTC time.

 Public Property Let LastAccessTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastAccessTimeUtc (set)

LastAccessTimeUtc

Sets the time the FileSystemInfo entry was last accessed in UTC time.

 Public Property Set LastAccessTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTime (get)

LastWriteTime

Returns the time the FileSystemInfo entry was last written to in local time.

 Public Property Get LastWriteTime ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTime (let)

LastWriteTime

Sets the time the FileSystemInfo entry was last written to in local time.

 Public Property Let LastWriteTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTime (set)

LastWriteTime

Sets the time the FileSystemInfo entry was last written to in local time.

 Public Property Set LastWriteTime(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTimeUtc (get)

LastWriteTimeUtc

Returns the time the FileSystemInfo entry was last written to in UTC time.

 Public Property Get LastWriteTimeUtc ( ) As Variant

Return Values

Variant - A cDateTime object of the time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTimeUtc (let)

LastWriteTimeUtc

Sets the time the FileSystemInfo entry was last written to in UTC time.

 Public Property Let LastWriteTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: LastWriteTimeUtc (set)

LastWriteTimeUtc

Sets the time the FileSystemInfo entry was last written to in UTC time.

 Public Property Set LastWriteTimeUtc(
      ByVal RHS As Variant ) :

Parameters

RHS
[ByVal] Variant. A Date or cDateTime object of the new time.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Name (get)

Name

Returns the name of the entry.

 Public Property Get Name ( ) As String

Return Values

String - The name of the entry.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: Refresh

Refresh

Reloads the entry with the most current information.

 Public Sub Refresh ( )

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FileSystemInfo: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class FileSystemInfo Overview


FormatException

FormatException

The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method.

Remarks

FormatException is thrown when the format of an argument in a method invocation does not match the format of the corresponding formal parameter type. For example, if a method specifies a String parameter consisting of two digits with an embedded period, passing a corresponding string argument containing only two digits to that method would cause FormatException to be thrown.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


FormatException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview | Exception


FormatException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview | Exception


FormatException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewArgumentException.

Read Only.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class FormatException Overview


FormatException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class FormatException Overview


FromBase64Transform

FromBase64Transform

Transforms data from base-64 to plain text.

Remarks

This class is used primarily in conjunction with the CryptoStream class and shouldnt be used to process large amounts of data manually. For that use the Convert.FromBase64String method.

See Also

Project VBCorLib Overview

Implements:

ICryptoTransform
IObject

Public:

Types:

Name | Description
FromBase64TransformMode | Represents choices to ignore white spaces when tranforming blocks of text.

Properties:

Name | Description
CanReuseTransform (get) | Returns if the transform instance can be reused after transforming the final data.
CanTransformMultipleBlocks (get) | Returns if TransformBlock can transform multiple blocks can be transformed in a single call.
InputBlockSize (get) | Returns then block size the input data must be, or be a multiple of.
OutputBlockSize (get) | Returns the block size of the output data.

Methods:

Name | Description
Clear | Releases any resources held in the transform.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.
TransformBlock | Transforms a block of data from a base-64 encoding to plain text.
TransformFinalBlock | Transforms a block of data and any data that has been buffered from previous TransformBlock calls.


FromBase64Transform: CanReuseTransform (get)

CanReuseTransform

Returns if the transform instance can be reused after transforming the final data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if TransformBlock can transform multiple blocks can be transformed in a single call.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns False.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: Clear

Clear

Releases any resources held in the transform.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: FromBase64TransformMode

FromBase64TransformMode

Represents choices to ignore white spaces when tranforming blocks of text.

 Public Enum FromBase64TransformMode

Values

IgnoreWhiteSpaces = 0
Any whitespace is skipped and the processing begins with the next non-whitespace character.
DoNotIgnoreWhiteSpaces = 1
If whitespace is encountered during processing, then an exception will be thrown.

Remarks

Whitespaces are defined as characters with the ascii value of 32, 9, 10, 11, 12, 13, 133, 160.

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: InputBlockSize (get)

InputBlockSize

Returns then block size the input data must be, or be a multiple of.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The input block size.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: OutputBlockSize (get)

OutputBlockSize

Returns the block size of the output data.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The output block size.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: TransformBlock

TransformBlock

Transforms a block of data from a base-64 encoding to plain text.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to be transformed.
InputOffset
[ByVal] Long. The starting position in the array to begin transforming.
InputCount
[ByVal] Long. The number of bytes to be transformed.
OutputBuffer
[ByRef] Byte. The array to place the transformed data in.
OutputOffset
[ByVal] Long. The starting position to begin placing the output data.

Return Values

Long - The number of bytes transformed.

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


FromBase64Transform: TransformFinalBlock

TransformFinalBlock

Transforms a block of data and any data that has been buffered from previous TransformBlock calls.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The remaining data to be transformed.
InputOffset
[ByVal] Long. The starting index to being transforming from.
InputCount
[ByVal] Long. The number of bytes to transform.

Return Values

Byte() - The final transformed data.

Remarks

See Also

Project VBCorLib Overview | Class FromBase64Transform Overview


GregorianCalendar

GregorianCalendar

Provides methods for manipulating dates using the Gregorian calendar mathematics.

Remarks

The Gregorian calendar recognizes an era of BC (Before Christ) and AD (Anno Domino). The GregorianCalendar class only support the AD era (1).

The calendar supports the time from 01/01/0001 12:00:00AM to 12/31/9999 11:59:59PM.

Only leap year is recognized and occurs every 4 years, except a year that is evenly divisible by 100. However, if it is divisible by 400 then it is a leap year.

There are 12 months in the Gregorian calendar. The number of days range from 28 to 31, except on leap year when the shortest month is 29 days.

See Also

Project VBCorLib Overview | Calendar | GregorianCalendarStatic

Implements:

Calendar
IObject

Public:

Types:

Name | Description
GregorianCalendarTypes |

Properties:

Name | Description
CalendarType (get) | Returns the calendar type that represents the language version.
CalendarType (let) | Sets the calendar type that represents the language version.
Eras (get) | Returns an array of eras this calendar represents.
TwoDigitYearMax (get) | Returns the maximum year to be created from a 2-digit year.
TwoDigitYearMax (let) | Sets the maximum year to be created from a 2-digit year.

Methods:

Name | Description
AddDays | Adds a number of days to the date provided using Gregorian math.
AddHours | Adds a number of hours to the date provided.
AddMilliseconds | Returns a cDateTime this is the specified number of Milliseconds from the original Time.
AddMinutes | Returns a cDateTime this is the specified number of Minutes from the original Time.
AddMonths | Returns a cDateTime this is the specified number of Months from the original Time.
AddSeconds | Returns a cDateTime this is the specified number of Seconds from the original Time.
AddWeeks | Returns a cDateTime this is the specified number of Weeks from the original Time.
AddYears | Returns a cDateTime this is the specified number of Years from the original Time.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth | Returns the day of the months for the specified date.
GetDayOfWeek | Returns the DayOfWeek enum of the specified date.
GetDayOfYear | Returns the day of the year for the specified date.
GetDaysInMonth | Returns the number of days in the specified month.
GetDaysInYear | Returns the number of days in the specified year.
GetEra | Returns the era that the specified time exists in.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour | Returns the hour of the specified time.
GetMilliseconds | Returns the milliseconds of the specified time.
GetMinute | Returns the minute of the specified time.
GetMonth | Returns the month of the specified time.
GetMonthsInYear | Returns the number of months in the specified year.
GetSecond | Returns the second of the specified time.
GetWeekOfYear | Returns the week of the year that the specified date belongs to.
GetYear | Returns the year of the specified time.
IsLeapDay | Returns a boolean indicating if the specific day is a leap day.
IsLeapMonth | Returns a boolean indicating if the specific month is a leap month.
IsLeapYear | Returns a boolean indicating if the specific year is a leap year.
ToDateTime | Returns a Gregorian cDateTime computed using the specific calendar rules.
ToFourDigitYear | Returns a 4-digit year from a 2-digit number.
ToString | Returns a string representation of this object instance.


GregorianCalendar: AddDays

AddDays

Adds a number of days to the date provided using Gregorian math.

 Public Function AddDays(
      ByRef Time As Variant,
      ByVal Days As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. This is a Date or cDateTime object to add a number of days to.
Days
[ByVal] Long. The number of days to be added to Time.

Return Values

cDateTime - A cDateTime object with the new date.

Remarks

Using this method works exactly like using the AddDays method on the cDateTime objects.

A new cDateTime object is returned with the days added to the original Time. If a Date is passed in, a cDateTime object is still returned.

A negative value can be supplied for Days.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddHours

AddHours

Adds a number of hours to the date provided.

 Public Function AddHours(
      ByRef Time As Variant,
      ByVal Hours As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. A Date or cDateTime object to add a number of hours to.
Hours
[ByVal] Long. The number of hours to be added to the time portion of a date.

Return Values

cDateTime - Returns a cDateTime with the specified number of hours added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddMilliseconds

AddMilliseconds

Returns a cDateTime this is the specified number of Milliseconds from the original Time.

 Public Function AddMilliseconds(
      ByRef Time As Variant,
      ByVal Milliseconds As Double ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Milliseconds to.
Milliseconds
[ByVal] Double. The number of Milliseconds to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Milliseconds added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddMinutes

AddMinutes

Returns a cDateTime this is the specified number of Minutes from the original Time.

 Public Function AddMinutes(
      ByRef Time As Variant,
      ByVal Minutes As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Minutes to.
Minutes
[ByVal] Long. The number of Minutes to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Minutes added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddMonths

AddMonths

Returns a cDateTime this is the specified number of Months from the original Time.

 Public Function AddMonths(
      ByRef Time As Variant,
      ByVal Months As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Months to.
Months
[ByVal] Long. The number of Months to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Months added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddSeconds

AddSeconds

Returns a cDateTime this is the specified number of Seconds from the original Time.

 Public Function AddSeconds(
      ByRef Time As Variant,
      ByVal Seconds As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Seconds to.
Seconds
[ByVal] Long. The number of Seconds to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Seconds added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddWeeks

AddWeeks

Returns a cDateTime this is the specified number of Weeks from the original Time.

 Public Function AddWeeks(
      ByRef Time As Variant,
      ByVal Weeks As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Weeks to.
Weeks
[ByVal] Long. The number of Weeks to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Weeks added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: AddYears

AddYears

Returns a cDateTime this is the specified number of Years from the original Time.

 Public Function AddYears(
      ByRef Time As Variant,
      ByVal Years As Long ) As cDateTime

Parameters

Time
[ByRef] Variant. The time to add the specified number of Years to.
Years
[ByVal] Long. The number of Years to be added to Time. This can be negative.

Return Values

cDateTime - Returns a cDateTime with the specified number of Years added.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: CalendarType (get)

CalendarType

Returns the calendar type that represents the language version.

 Public Property Get CalendarType ( ) As GregorianCalendarTypes

Return Values

GregorianCalendarTypes - The calendar type that represents the language version.

Remarks

This value is only tracked with the calendar object. It does not apply languages to text values.

Read/Write.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: CalendarType (let)

CalendarType

Sets the calendar type that represents the language version.

 Public Property Let CalendarType(
      ByVal RHS As GregorianCalendarTypes )

Parameters

RHS
[ByVal] GregorianCalendarTypes. The calendar type to set this instance to.

Remarks

This value is only tracked with the calendar object. It does not apply languages to text values.

Read/Write.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: Eras (get)

Eras

Returns an array of eras this calendar represents.

 Public Property Get Eras ( ) As Long ( )

Return Values

Long() - An array containing the eras represented by this calendar.

Remarks

The Gregorian calendar recognizes only one era. The returned array will have one element containing the value 1.

Read Only.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetDayOfMonth

GetDayOfMonth

Returns the day of the months for the specified date.

 Public Function GetDayOfMonth(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The date inwhich to retrieve the day of the month.

Return Values

Long - The day of the month for the specified date.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetDayOfWeek

GetDayOfWeek

Returns the DayOfWeek enum of the specified date.

 Public Function GetDayOfWeek(
      ByRef Time As Variant ) As DayOfWeek

Parameters

Time
[ByRef] Variant. The date to retrieve the day of the week for.

Return Values

DayOfWeek - A DayOfWeek enum representing the day of the week.

Remarks

The DayOfWeek is Sunday and is 0-based. The Visual Basic enum vbDayOfWeek is 1-based.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetDayOfYear

GetDayOfYear

Returns the day of the year for the specified date.

 Public Function GetDayOfYear(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The date to retrieve the day of the year from.

Return Values

Long - The day of the year.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetDaysInMonth

GetDaysInMonth

Returns the number of days in the specified month.

 Public Function GetDaysInMonth(
      ByVal Year As Long,
      ByVal Month As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year inwhich the month exists. This is used by calendars that have months that change based on the year, such as leap years.
Month
[ByVal] Long. The month to retrieve the number of days of.
Era
[ByRef] Optional. Variant. The time period inwhich the year exists.

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetDaysInYear

GetDaysInYear

Returns the number of days in the specified year.

 Public Function GetDaysInYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year to retrieve the number of days of.
Era
[ByRef] Optional. Variant. The era the year exists in.

Return Values

Long - The number of days in the year.

Remarks

The gregorian calendar has 365 days in a normal year and 366 days in a leap year.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetEra

GetEra

Returns the era that the specified time exists in.

 Public Function GetEra(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to find the containing era of.

Return Values

Long - The era for the time.

Remarks

The GregorianCalendar class only supports the current era of AD. This returns a constant of 1.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetHour

GetHour

Returns the hour of the specified time.

 Public Function GetHour(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the hour from.

Return Values

Long - The hour portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetMilliseconds

GetMilliseconds

Returns the milliseconds of the specified time.

 Public Function GetMilliseconds(
      ByRef Time As Variant ) As Double

Parameters

Time
[ByRef] Variant. The time to retrieve the milliseconds from.

Return Values

Double - The millisecond portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetMinute

GetMinute

Returns the minute of the specified time.

 Public Function GetMinute(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the minute from.

Return Values

Long - The minute portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetMonth

GetMonth

Returns the month of the specified time.

 Public Function GetMonth(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the month from.

Return Values

Long - The month portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetMonthsInYear

GetMonthsInYear

Returns the number of months in the specified year.

 Public Function GetMonthsInYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Long

Parameters

Year
[ByVal] Long. The year to get the number of months of.
Era
[ByRef] Optional. Variant. The era the year exists in.

Return Values

Long - The number of months in the year.

Remarks

The Gregorian calendar has 12 months in a year.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetSecond

GetSecond

Returns the second of the specified time.

 Public Function GetSecond(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the second from.

Return Values

Long - The second portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetWeekOfYear

GetWeekOfYear

Returns the week of the year that the specified date belongs to.

 Public Function GetWeekOfYear(
      ByRef Time As Variant,
      ByVal Rule As CalendarWeekRule,
      ByVal FirstDayOfWeek As DayOfWeek ) As Long

Parameters

Time
[ByRef] Variant. The date to find the week it belongs.
Rule
[ByVal] CalendarWeekRule. Rule to decide what constitutes the first week of the year.
FirstDayOfWeek
[ByVal] DayOfWeek. Defines which week day is the start of a new week.

Return Values

Long - The week that the date belongs to.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: GetYear

GetYear

Returns the year of the specified time.

 Public Function GetYear(
      ByRef Time As Variant ) As Long

Parameters

Time
[ByRef] Variant. The time to retrieve the year from.

Return Values

Long - The year portion of the time.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: IsLeapDay

IsLeapDay

Returns a boolean indicating if the specific day is a leap day.

 Public Function IsLeapDay(
      ByVal Year As Long,
      ByVal Month As Long,
      ByVal Day As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year the day is in.
Month
[ByVal] Long. The month the day is in.
Day
[ByVal] Long. The day to check if is a leap day.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the day is a leap day.

Remarks

A leap day only exists in a leap year, such as Febuary 29th in the Gregorian calendar.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: IsLeapMonth

IsLeapMonth

Returns a boolean indicating if the specific month is a leap month.

 Public Function IsLeapMonth(
      ByVal Year As Long,
      ByVal Month As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year the month is in.
Month
[ByVal] Long. The month to check if it is a leap month.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the month is a leap month.

Remarks

A leap month only exists in a leap year, such as Adar II in the Hebrew calendar. This always returns False.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: IsLeapYear

IsLeapYear

Returns a boolean indicating if the specific year is a leap year.

 Public Function IsLeapYear(
      ByVal Year As Long,
      Optional ByRef Era As Variant ) As Boolean

Parameters

Year
[ByVal] Long. The year to check if is a leap year.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

Boolean - Boolean indication if the year is a leap year.

Remarks

A leap year in the Gregorian calendar occurs when the year is evenly divisible by 4, but not by 100, unless it is divisible by 400.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: ToDateTime

ToDateTime

Returns a Gregorian cDateTime computed using the specific calendar rules.

 Public Function ToDateTime(
      ByVal Year As Long,
      ByVal Month As Long,
      ByVal Day As Long,
      ByVal Hour As Long,
      ByVal Minute As Long,
      ByVal Second As Long,
      ByVal Millisecond As Long,
      Optional ByRef Era As Variant ) As cDateTime

Parameters

Year
[ByVal] Long. The Year in the specific calendar type.
Month
[ByVal] Long. The Month in the specific calendar type.
Day
[ByVal] Long. The Day in the specific calendar type.
Hour
[ByVal] Long. The hour for the new time.
Minute
[ByVal] Long. The minute for the new time.
Second
[ByVal] Long. The second for the new time.
Millisecond
[ByVal] Long. The milliseconds for the new time.
Era
[ByRef] Optional. Variant. The era the year is in.

Return Values

cDateTime - A Gregorian version of the date specified.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: ToFourDigitYear

ToFourDigitYear

Returns a 4-digit year from a 2-digit number.

 Public Function ToFourDigitYear(
      ByVal Year As Long ) As Long

Parameters

Year
[ByVal] Long. The year to be converted to 4-digits.

Return Values

Long - A 4-digit year in the specific calendar.

Remarks

A normal way of dealing with years is by refering to them as a 2-digit value. This is evident in the Gregorian calendar system. The year 2005 may be referenced as 05 (pronounced oh-five). When converting a 2-digit year to a 4-digit the century is unknown. 05 could be 2005 or 1905. This property gives the calendar a rule to follow when converting 2-digit years to 4-digit.

A max year of 2029 will cause a minimum year of 1930. These two years represent 100 years which 2-digit years will fall. 00-99 will fall within 1930-2029.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: TwoDigitYearMax (get)

TwoDigitYearMax

Returns the maximum year to be created from a 2-digit year.

 Public Property Get TwoDigitYearMax ( ) As Long

Return Values

Long - The maximum year to be created.

Remarks

The property allows a 2-digit year (0 to 99) to be converted to a 4-digit year(0001 to 9999). The 2-digit year of 99 does not necessarily corrispond to the largest year to be created. For example, for a maximum year of 2029, the value 99 would convert to 1999 and 0 would convert to 2000. The years 29 would become 2029 and 30 would become 1930.

Read/Write.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendar: TwoDigitYearMax (let)

TwoDigitYearMax

Sets the maximum year to be created from a 2-digit year.

 Public Property Let TwoDigitYearMax(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new 4-digit year maximum a 2-digit year is converted to.

Remarks

The property allows a 2-digit year (0 to 99) to be converted to a 4-digit year(0001 to 9999). The 2-digit year of 99 does not necessarily corrispond to the largest year to be created. For example, for a maximum year of 2029, the value 99 would convert to 1999 and 0 would convert to 2000. The years 29 would become 2029 and 30 would become 1930.

Read/Write.

See Also

Project VBCorLib Overview | Class GregorianCalendar Overview


GregorianCalendarStatic

GregorianCalendarStatic

Provides static methods for the GregorianCalendar class.

See Also

Project VBCorLib Overview GregorianCalendar

Public:

Properties:

Name | Description
ADEra (get) | Returns the current era of the GregorianCalendar


GregorianCalendarStatic: ADEra (get)

ADEra

Returns the current era of the GregorianCalendar

 Public Property Get ADEra ( ) As Long

Return Values

Long - Returns a constant of 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class GregorianCalendarStatic Overview


Guid

Guid

Represents a globally unique identifier (GUID).

Remarks

A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.

See Also

Project VBCorLib Overview | GuidStatic

Implements:

IComparable
IFormattable
IObject

Public:

Properties:

Name | Description
Handle (get) | Returns a pointer to the internal GUID structure.
IsReadOnly (get) | Returns if the guid is read-only.

Methods:

Name | Description
CompareTo | Compares this guid to another.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToByteArray | Returns the guid value has an array of bytes.
ToProgramID | Returns the Program ID associated with the guid in the format.
ToString | Returns a string representation of guid value.


Guid: CompareTo

CompareTo

Compares this guid to another.

 Public Function CompareTo(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The guid to compare to this guid.

Return Values

Long - A Long

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: Handle (get)

Handle

Returns a pointer to the internal GUID structure.

 Public Property Get Handle ( ) As Long

Return Values

Long - A long containing the pointer to the structure.

Remarks

This is provided to allow for APIs to access the actual guid structure directly, since they expect to be accessing a structure, not an object.

Guid style APIs declare the guid parameter something like

ByRef g As VBGUID
In order to use the VBCorLib Guid then the API would need to be declared something like
ByVal ptrG As Long
and pass in the Handle to the guid object.

Exposing the handle is very dangerous in that the object is not immutable.

Read Only.

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: IComparable

IComparable

 Implements IComparable

Return Values

IComparable -

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: IFormattable

IFormattable

 Implements IFormattable

Return Values

IFormattable -

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: IsReadOnly (get)

IsReadOnly

Returns if the guid is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Returns True if the guid is locked, otherwise False.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: ToByteArray

ToByteArray

Returns the guid value has an array of bytes.

 Public Function ToByteArray ( ) As Byte ( )

Return Values

Byte() - An array of bytes representing the guid.

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: ToProgramID

ToProgramID

Returns the Program ID associated with the guid in the format.

 Public Function ToProgramID ( ) As String

Return Values

String - A string containing the Program ID associated with the guid.

Remarks

See Also

Project VBCorLib Overview | Class Guid Overview


Guid: ToString

ToString

Returns a string representation of guid value.

 Public Function ToString(
      Optional ByVal Format As String,
      Optional ByVal Provider As IFormatProvider ) As String

Parameters

Format
[ByVal] Optional. String. The format of the guid value to be returned.
Provider
[ByVal] Optional. IFormatProvider. A format provider used to format the guid.

Return Values

String - String representing of the guid.

Remarks

There are 4 format types: "D","B","N","P".

 "D" = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 "B" = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
 "P" = (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
 "N" = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
B is the default format.

See Also

Project VBCorLib Overview | Class Guid Overview


GuidStatic

GuidStatic

Provides static methods used to create and manipulate Guid objects.

Remarks

The name Guid conflicts with a hidden type in VB. In order to specific the VBCorLib version of Guid, a variable must be defined as VBCorLib.Guid instead of just Guid.

This class cannot be directly created. To access the methods, use the variable name directly.
 Dim g As VBCorLib.Guid
 Set g = Guid.Parse("{533217B3-CDEC-40A2-B01C-1EA8593B850F}")

See Also

Project VBCorLib Overview | Guid

Public:

Properties:

Name | Description
IDispatchGuid (get) | Returns a Guid already set to the IDispatch (Object) interface.
IUnknownGuid (get) | Returns a Guid already set to the IUnknown interface.

Methods:

Name | Description
EmptyGuid | Returns a guid that is guaranteed to be all zeros.
FromByteArray | Converts an array of 16 bytes into a Guid.
FromMemory | Creates a Guid based on a 16-byte block of memory.
FromParts | Creates a guid using specified values and byte array.
FromProgramID | Returns a Guid representation of the Program ID in the form of .
FromValues | Creates a new guid from the individual values and bytes.
NewGuid | Returns a new Guid object with a random guid generated.
Parse | Parses a string representation of a guid, returning a Guid containing the parsed value.
ReadOnly | Returns a Read-Only wrapper for the supplied Guid object.


GuidStatic: EmptyGuid

EmptyGuid

Returns a guid that is guaranteed to be all zeros.

 Public Function EmptyGuid ( ) As Guid

Return Values

Guid - A zero value guid.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: FromByteArray

FromByteArray

Converts an array of 16 bytes into a Guid.

 Public Function FromByteArray(
      ByRef Bytes ( ) As Byte ) As Guid

Parameters

Bytes
[ByRef] Byte. The bytes to convert to a guid.

Return Values

Guid - A new guid object set to the 16 bytes.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: FromMemory

FromMemory

Creates a Guid based on a 16-byte block of memory.

 Public Function FromMemory(
      ByVal lpGuid As Long ) As Guid

Parameters

lpGuid
[ByVal] Long. A poiner to the memory location of the 16 bytes.

Return Values

Guid - A new guid object.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: FromParts

FromParts

Creates a guid using specified values and byte array.

 Public Function FromParts(
      ByVal a As Long,
      ByVal b As Integer,
      ByVal c As Integer,
      ByRef d ( ) As Byte ) As Guid

Parameters

a
[ByVal] Long. A value representing 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx
b
[ByVal] Integer. A value representing xxxxxxxx-1234-xxxx-xxxx-xxxxxxxxxxxx
c
[ByVal] Integer. A value representing xxxxxxxx-xxxx-1234-xxxx-xxxxxxxxxxxx
d
[ByRef] Byte. An array representing xxxxxxxx-xxxx-xxxx-1234-123456789012

Return Values

Guid - A new guid initialized to the values and byte array specified.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: FromProgramID

FromProgramID

Returns a Guid representation of the Program ID in the form of .

 Public Function FromProgramID(
      ByVal ProgID As String ) As Guid

Parameters

ProgID
[ByVal] String. The Program ID to return the Guid of. The format for the Program ID is .

Return Values

Guid - A Guid representaion of the Program ID.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: FromValues

FromValues

Creates a new guid from the individual values and bytes.

 Public Function FromValues(
      ByVal a As Long,
      ByVal b As Integer,
      ByVal c As Integer,
      ByVal d As Byte,
      ByVal e As Byte,
      ByVal f As Byte,
      ByVal g As Byte,
      ByVal h As Byte,
      ByVal i As Byte,
      ByVal j As Byte,
      ByVal K As Byte ) As Guid

Parameters

a
[ByVal] Long. A Long
b
[ByVal] Integer. An Integer
c
[ByVal] Integer. An Integer
d
[ByVal] Byte. A Byte
e
[ByVal] Byte. A Byte
f
[ByVal] Byte. A Byte
g
[ByVal] Byte. A Byte
h
[ByVal] Byte. A Byte
i
[ByVal] Byte. A Byte
j
[ByVal] Byte. A Byte
K
[ByVal] Byte. A Byte

Return Values

Guid - A new guid initialized to the values and bytes specified.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: IDispatchGuid (get)

IDispatchGuid

Returns a Guid already set to the IDispatch (Object) interface.

 Public Property Get IDispatchGuid ( ) As Guid

Return Values

Guid - A preconfigured Guid object of type IDispatch (Object).

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: IUnknownGuid (get)

IUnknownGuid

Returns a Guid already set to the IUnknown interface.

 Public Property Get IUnknownGuid ( ) As Guid

Return Values

Guid - A preconfigured Guid object of type IUnknown.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: NewGuid

NewGuid

Returns a new Guid object with a random guid generated.

 Public Function NewGuid ( ) As Guid

Return Values

Guid - A new Guid object.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview | Guid


GuidStatic: Parse

Parse

Parses a string representation of a guid, returning a Guid containing the parsed value.

 Public Function Parse(
      ByVal strGuid As String ) As Guid

Parameters

strGuid
[ByVal] String. The guid string to be parsed.

Return Values

Guid - A Guid set to the parsed value.

Remarks

See Also

Project VBCorLib Overview | Class GuidStatic Overview


GuidStatic: ReadOnly

ReadOnly

Returns a Read-Only wrapper for the supplied Guid object.

 Public Function ReadOnly(
      ByVal g As Guid ) As Guid

Parameters

g
[ByVal] Guid. The Guid object to wrap as Read-Only.

Return Values

Guid - A Read-Only Guid object.

Remarks

This is to allow the passing of a Guid object around an application without allowing the guid to be modified through the Handle property, which allows direct access to the guid structure.

See Also

Project VBCorLib Overview | Class GuidStatic Overview


HashAlgorithm

HashAlgorithm

Represents a common interface implemented by all hashing algorithms.

Remarks

A hash is a fixed-length data that can represent unique variable-length data. The size of the hash determines the ability for different data to have a unique hash value. Since hash values are fixed-length, there are a fixed number of possible hash values, which must represent an infinite number of variable-length data.

Hashes are powerful in that a tiny change in the input data will cause a large change in the computed hash value. This provides the ability to detect when data has been altered.

It is possible for two variable-length data to have the same hash value, but the chances are so remote as to be practically impossible. The larger the hash value, the more impractical is becomes to find a duplicate hash value.

See Also

Project VBCorLib Overview | SHA1CryptoServiceProvider | SHA1Managed | SHA256Managed | SHA384Managed | SHA512Managed | RIPEMD160Managed | MD5CryptoServiceProvider

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the hash algorithm implementation can be reused once a hash has been computed.
CanTransformMultipleBlocks (get) | Returns if the hash algorithm implementation can processd multiple blocks of data at a time.
Hash (get) | Returns the computed hash after all data has been processed.
HashSize (get) | Returns the size of the hash value in bits.
InputBlockSize (get) | Returns the size of the input block size allowed.
OutputBlockSize (get) | Returns the size of the output block.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Equals | Returns if the Value is equal to this object instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Initialize | Resets a hashing object to begin hashing a new value.
ToString | Returns a string representation of this object instance.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


HashAlgorithm: CanReuseTransform (get)

CanReuseTransform

Returns if the hash algorithm implementation can be reused once a hash has been computed.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - True if the implementation can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if the hash algorithm implementation can processd multiple blocks of data at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - True if multiple blocks of data can be processed at a time, False otherwise.

Remarks

The size of 1 block of data is defined by the InputBlockSize property.

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: Equals

Equals

Returns if the Value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this object instance.

Return Values

Boolean - True if they are considered equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: Hash (get)

Hash

Returns the computed hash after all data has been processed.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A byte array containing the computed hash.

Remarks

The size of the array will vary depending on the hash algorithm being performed.

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: HashSize (get)

HashSize

Returns the size of the hash value in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - The size of the hash value in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: Initialize

Initialize

Resets a hashing object to begin hashing a new value.

 Public Sub Initialize ( )

Remarks

If Clear has been called, then the object cannot be re-initialized.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes a single input block is.

Remarks

When calling the TransformBlock method, the InputCount must equal this value. If the hashs CanTransformMultipleBlocks returns True, then the InputCount can be larger than the InputBlockSize, but must be an even multiple of InputBlockSize.

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: OutputBlockSize (get)

OutputBlockSize

Returns the size of the output block.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the output block.

Remarks

When calling the TransformBlock method, the return value will be 0 or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithm: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implemntation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class HashAlgorithm Overview


HashAlgorithmBase

HashAlgorithmBase

Provides a base implementation for implementing hash algorithms.

Remarks

The HashAlgorithmBase class provides base functionality for common task when computing a hash value on data within the VBCorLib library. This allows for an easier and more consistent implementation of the hash algorithms.

By implementing the IHashAlgorithm interface, an instance of HashAlgorithmBase will manage standard functions and validation of data. When needed, the base class will call back into the IHashAlgorithm implementation for required data processing.

See Also

Project VBCorLib Overview | Constructors

Public:

Properties:

Name | Description
Hash (get) | Returns the computed hash.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Initialize | Resets the base class to an initial state to begin computing the hash for a new set of values.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


HashAlgorithmBase: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


HashAlgorithmBase: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


HashAlgorithmBase: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - The compute hash value.

Remarks

Calling this property is only valid after the TransformFinalBlock has been called.

Read Only.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


HashAlgorithmBase: Initialize

Initialize

Resets the base class to an initial state to begin computing the hash for a new set of values.

 Public Sub Initialize ( )

Remarks

If this method is called by the base class itself, then the IHashAlgorithm.Initialize method will also be called. If this method is called from an external source, then the IHashAlgorithm.Initialize method will not be called. It is expected that the external source to be responsible for calling that method.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


HashAlgorithmBase: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


HashAlgorithmBase: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implementation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class HashAlgorithmBase Overview


Hashtable

Hashtable

The Hashtable represents a repository of key/value pairs.

Remarks

This class is persistable.

See Also

Project VBCorLib Overview | Constructors | IDictionary | ICollection | IEnumerable | ICloneable | CaseInsensitiveHashCodePrvdr | CaseInsensitiveComparer

Implements:

ICloneable
ICollection
IDictionary
IEnumerable
IObject

Public:

Properties:

Name | Description
Count (get) | Returns the number of elements in the table.
IsFixedSize (get) | Returns if this instance is fixed size.
IsReadOnly (get) | Returns if this instance is readonly
Item (get) | Returns a value associated with the specified key.
Item (let) | Sets the value associated to the specified key.
Item (set) | Sets the value associated to the specified key.
Keys (get) | Retuns an ICollection object used to access the keys of the table.
Values (get) | Retuns an ICollection object used to access the values of the table.

Methods:

Name | Description
Add | Adds a new key/value pair to the table.
Clean | Causes the Hashtable to clean up deleted buckets to improve searching capabilities.
Clear | Clears all of the elements from the table.
Clone | Returns a clone of the current instance.
Contains | Checks if the current instance contains a specific key.
ContainsKey | Checks if the current instance contains a specific key.
ContainsValue | Checks if the current instance contains a specific value.
CopyTo | Copies the contents of the table to an array.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator for the table.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Remove | Removes a key/value pair associated with a specific key.
ToString | Returns a string representation of this object instance.


Hashtable: Add

Add

Adds a new key/value pair to the table.

 Public Sub Add(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The key used to identify the value.
Value
[ByRef] Variant. The value to be added to the table.

Remarks

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object doesnt not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Clean

Clean

Causes the Hashtable to clean up deleted buckets to improve searching capabilities.

 Public Sub Clean ( )

Remarks

When many items have been deleted from the table, the buckets that contained the items are marked as Deleted. When many buckets are marked as Deleted, the search routine cannot stop searching the buckets for a duplicate key even if an empty Deleted bucket has been found. So to prevent the unnessecary searching past Deleted buckets, the table should be cleaned to remove the Deleted buckets and only have Empty and Occupied buckets remaining.

This is recommended when a large number of items are deleted.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Clear

Clear

Clears all of the elements from the table.

 Public Sub Clear ( )

Remarks

When clearing the table, the count is set to 0, but the capacity remains unchanged.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Clone

Clone

Returns a clone of the current instance.

 Public Function Clone ( ) As Hashtable

Return Values

Hashtable - The clone of the current instance.

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Contains

Contains

Checks if the current instance contains a specific key.

 Public Function Contains(
      ByRef Key As Variant ) As Boolean

Parameters

Key
[ByRef] Variant. The key to check for.

Return Values

Boolean - Indicates if the key was found.

Remarks

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object doesnt not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: ContainsKey

ContainsKey

Checks if the current instance contains a specific key.

 Public Function ContainsKey(
      ByRef Key As Variant ) As Boolean

Parameters

Key
[ByRef] Variant. The key to check for.

Return Values

Boolean - Indicates if the key was found.

Remarks

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object doesnt not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: ContainsValue

ContainsValue

Checks if the current instance contains a specific value.

 Public Function ContainsValue(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to search for.

Return Values

Boolean - Indicates if the value was found.

Remarks

The table is searched linearly checking each value. Once a matching value is found, True is returned. If there is more than one of the same values, only the first is detected.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: CopyTo

CopyTo

Copies the contents of the table to an array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      ByVal Index As Long )

Parameters

DstArray
[ByRef] Variant. The array to copy the contents to.
Index
[ByVal] Long. The starting index in dstArray to begin copying to.

Remarks

The elements that are copied to the array are DictionaryEntry elements. Each DictionaryEntry contains a key and value from the table.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Count (get)

Count

Returns the number of elements in the table.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of elements in the table.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: GetEnumerator

GetEnumerator

Returns an enumerator for the table.

 Public Function GetEnumerator ( ) As Object

Return Values

Object - An IEnumerator object that enumerates over the table.

Remarks

The values enumerated are DictionaryEntry object each containing a key/value pair.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: IDictionary

IDictionary

 Implements IDictionary

Return Values

IDictionary -

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: IsFixedSize (get)

IsFixedSize

Returns if this instance is fixed size.

 Public Property Get IsFixedSize ( ) As Boolean

Return Values

Boolean - Default is False.

Remarks

This is to satisfy the IList interface.

Read Only.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: IsReadOnly (get)

IsReadOnly

Returns if this instance is readonly

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Default is False.

Remarks

This is to satisfy the IList interface.

Read Only.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Item (get)

Item

Returns a value associated with the specified key.

 Public Property Get Item(
      ByRef Key As Variant ) As Variant

Parameters

Key
[ByRef] Variant. The key used to look up a value.

Return Values

Variant - The value associated with the Key.

Remarks

If the key does not exist, then Empty is returned.

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object doesnt not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

Read/Write.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Item (let)

Item

Sets the value associated to the specified key.

 Public Property Let Item(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The key used to look up a value.
Value
[ByRef] Variant. The value to associate with the key.

Remarks

If the key is not found, then the key/value are added to the table. If the key IS found, then the associated value with the key is replaced with the new value.

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object doesnt not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

Read/Write.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Item (set)

Item

Sets the value associated to the specified key.

 Public Property Set Item(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The key used to look up a value.
Value
[ByRef] Variant. The value to associate with the key.

Remarks

If the key is not found, then the key/value are added to the table. If the key IS found, then the associated value with the key is replaced with the new value.

The key can be any datatype other than vbUserDefinedType. If an object is being used as a key, then it should implement the IObject interface to allow for custom hashcode creation. If the object does not implement the interface, then the objects memory location is used for a hashcode. If two different objects should represent the same hashcode, then they need to implement the IObject interface and override the GetHashCode function.

Read/Write.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Keys (get)

Keys

Retuns an ICollection object used to access the keys of the table.

 Public Property Get Keys ( ) As ICollection

Return Values

ICollection - An ICollection object used to access the keys of the table.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Remove

Remove

Removes a key/value pair associated with a specific key.

 Public Sub Remove(
      ByRef Key As Variant )

Parameters

Key
[ByRef] Variant. The key use to lookup the key/value pair to be removed.

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Hashtable Overview


Hashtable: Values (get)

Values

Retuns an ICollection object used to access the values of the table.

 Public Property Get Values ( ) As ICollection

Return Values

ICollection - An ICollection object used to access the values of the table.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Hashtable Overview


HebrewCalendar

HebrewCalendar

Provides methods for manipulating Hebrew (Jewish) dates.

Remarks

Information about the Hebrew calendar was found at "http://astro.nmsu.edu/~lhuber/leaphist.html" and "http://www.geocities.com/Athens/1584/"

See Also

Project VBCorLib Overview | HebrewCalendarStatic | Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


HebrewCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class HebrewCalendar Overview


HebrewCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class HebrewCalendar Overview


HebrewCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class HebrewCalendar Overview


HebrewCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HebrewCalendar Overview


HebrewCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HebrewCalendar Overview


HebrewCalendarStatic

HebrewCalendarStatic

Provides static methods for the HebrewCalendar class.

See Also

Project VBCorLib Overview HebrewCalendar

Public:

Properties:

Name | Description
HebrewEra (get) | Returns the current era of the Hebrew calendar.


HebrewCalendarStatic: HebrewEra (get)

HebrewEra

Returns the current era of the Hebrew calendar.

 Public Property Get HebrewEra ( ) As Long

Return Values

Long - Returns a constant of 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HebrewCalendarStatic Overview


HijriCalendar

HijriCalendar

Provides methods for manipulating Hijri dates.

Remarks

This is based on the Tabular version of the Islamic calendar, not the pure lunar version.

See Also

Project VBCorLib Overview | HijriCalendarStatic | Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
HijriAdjustment (get) |
HijriAdjustment (let) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


HijriCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class HijriCalendar Overview


HijriCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class HijriCalendar Overview


HijriCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class HijriCalendar Overview


HijriCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HijriCalendar Overview


HijriCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HijriCalendar Overview


HijriCalendarStatic

HijriCalendarStatic

Provides static methods to support the Hijri calendar.

Remarks

To access the methods of this class, use the HijriCalendar method name followed by the method to execute.

Example

 i = HijriCalendar.HijriEra

See Also

Project VBCorLib Overview | HijriCalendar

Public:

Properties:

Name | Description
HijriEra (get) | Returns the current era for the Hijra calendar. This returns a constant of 1.


HijriCalendarStatic: HijriEra (get)

HijriEra

Returns the current era for the Hijra calendar. This returns a constant of 1.

 Public Property Get HijriEra ( ) As Long

Return Values

Long - The current era.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HijriCalendarStatic Overview


HMAC

HMAC

Provides a common Hash-based Message Authentication Code (HMAC) interface to be implemented by all HMAC classes.

Remarks

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview | HMACMD5 | HMACSHA1 | HMACSHA256 | HMACSHA384 | HMACSHA512 | HMACRIPEMD160

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the hash algorithm implementation can be reused once a hash has been computed.
CanTransformMultipleBlocks (get) | Returns if the hash algorithm implementation can processd multiple blocks of data at a time.
Hash (get) | Returns the computed hash after all data has been processed.
HashName (get) | Returns the name of the hash being used.
HashName (let) | Sets the name of the hash being used.
HashSize (get) | Returns the size of the hash value in bits.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the current key used with the hash process.
Key (let) | Sets the key to be used with the hash process.
OutputBlockSize (get) | Returns the size of the output block.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Equals | Returns if the Value is equal to this object instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Initialize | Resets a hashing object to begin hashing a new value.
ToString | Returns a string representation of this object instance.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


HMAC: CanReuseTransform (get)

CanReuseTransform

Returns if the hash algorithm implementation can be reused once a hash has been computed.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - True if the implementation can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if the hash algorithm implementation can processd multiple blocks of data at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - True if multiple blocks of data can be processed at a time, False otherwise.

Remarks

The size of 1 block of data is defined by the InputBlockSize property.

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Equals

Equals

Returns if the Value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this object instance.

Return Values

Boolean - True if they are considered equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Hash (get)

Hash

Returns the computed hash after all data has been processed.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A byte array containing the computed hash.

Remarks

The size of the array will vary depending on the hash algorithm being performed.

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: HashName (get)

HashName

Returns the name of the hash being used.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: HashName (let)

HashName

Sets the name of the hash being used.

 Public Property Let HashName(
      ByVal RHS As String ) :

Parameters

RHS
[ByVal] String. The new name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: HashSize (get)

HashSize

Returns the size of the hash value in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - The size of the hash value in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Initialize

Initialize

Resets a hashing object to begin hashing a new value.

 Public Sub Initialize ( )

Remarks

If Clear has been called, then the object cannot be re-initialized.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes a single input block is.

Remarks

When calling the TransformBlock method, the InputCount must equal this value. If the hashs CanTransformMultipleBlocks returns True, then the InputCount can be larger than the InputBlockSize, but must be an even multiple of InputBlockSize.

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Key (get)

Key

Returns the current key used with the hash process.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - The current key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: Key (let)

Key

Sets the key to be used with the hash process.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: OutputBlockSize (get)

OutputBlockSize

Returns the size of the output block.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the output block.

Remarks

When calling the TransformBlock method, the return value will be 0 or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMAC: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implemntation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class HMAC Overview


HMACBase

HMACBase

Provides the base functionality to perfrom Hash Message Authentication Code operations.

Remarks

This base implementation manages many of the aspects utilized with HMAC implementations. Usually, any class that implements the HashAlgorithm interface can easily be used to provide HMAC capabilities by simply initializing an instance of HMACBase with an instance of the hash object.

The HMAC set of classes provided in VBCorLib utilize the HMACBase class to provide consistent HMAC operations.

See Also

Project VBCorLib Overview | HMACMD5 | HMACRIPEMD160 | HMACSHA1 | HMACSHA256 | HMACSHA384 | HMACSHA512 | Constructors

Public:

Properties:

Name | Description
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash algorithm used.
HashName (let) | Sets the name of the hash algorithm used.

Methods:

Name | Description
Clear | Releases any resources and marks the object as disposed.
ComputeHash | Computes the hash code for the specific source.
GetKey | Returns the current key used by the hash.
Initialize | Resets an instance to begin computing a hash from the begining.
SetKey | Sets the key the hash will use.
TransformBlock | Processes a block of data towards the computed hash.
TransformFinalBlock | Processes the final block of data, generating the computed hash.


HMACBase: Clear

Clear

Releases any resources and marks the object as disposed.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: ComputeHash

ComputeHash

Computes the hash code for the specific source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. The source to compute the hash for. This can be a byte array or Stream based object.
Index
[ByRef] Optional. Variant. The starting index in the byte array to begin compute the hash. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes to used to compute the hash in a byte array. This is ignored for Stream objects.

Return Values

Byte() - The computed hash.

Remarks

For Stream objects, the stream is continuously read from and the hash computed until the stream contains no data.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: GetKey

GetKey

Returns the current key used by the hash.

 Public Function GetKey ( ) As Byte ( )

Return Values

Byte() - The current key used.

Remarks

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - The computed hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: HashName (get)

HashName

Returns the name of the hash algorithm used.

 Public Property Get HashName ( ) As String

Return Values

String - The hash algorithm name.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: HashName (let)

HashName

Sets the name of the hash algorithm used.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new hash name.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: Initialize

Initialize

Resets an instance to begin computing a hash from the begining.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: SetKey

SetKey

Sets the key the hash will use.

 Public Sub SetKey(
      ByRef Key ( ) As Byte )

Parameters

Key
[ByRef] Byte. The key to be used during the hash.

Remarks

This is required as a work-around for the byte array property assignment bug in VB6.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: TransformBlock

TransformBlock

Processes a block of data towards the computed hash.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to be processed.
InputOffset
[ByVal] Long. The starting index to begin processing data.
InputCount
[ByVal] Long. The number of bytes to be processed.
OutputBuffer
[ByRef] Byte. The array to place the processed data.
OutputOffset
[ByVal] Long. The starting index to begin placing the processed data.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will not contain a hashed value. The data processed in the InputBuffer will be copied to the OutputBuffer. The data will not be copied if the OutputBuffer is a null array or the OutputBuffer and InputBuffer are the same array and the InputOffset and OutputOffset are the same.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACBase: TransformFinalBlock

TransformFinalBlock

Processes the final block of data, generating the computed hash.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to process.
InputOffset
[ByVal] Long. The starting index of the data to be processed.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - The processed data. This is a copy of the InputBuffer data.

Remarks

The returned array is a copy of the InputBuffer with a length the same as InputCount. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACBase Overview


HMACMD5

HMACMD5

Represents an MD5 implementation of an HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACMD5: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 16-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 16-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 128 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACMD5: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACMD5 Overview


HMACRIPEMD160

HMACRIPEMD160

Represents a RIPEMD160 hash impelemntation of the HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACRIPEMD160: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 20-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 20-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 160 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACRIPEMD160: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACRIPEMD160 Overview


HMACSHA1

HMACSHA1

Represents an SHA-1 implementation of the HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACSHA1: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 20-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 20-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 160 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA1: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACSHA1 Overview


HMACSHA256

HMACSHA256

Represents an SHA-256 implementation of the HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACSHA256: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 32-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 32-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 256 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA256: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACSHA256 Overview


HMACSHA384

HMACSHA384

Represents an SHA-384 implementation of the HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACSHA384: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 48-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 48-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 384 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA384: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACSHA384 Overview


HMACSHA512

HMACSHA512

Represents an SHA-512 implementation of the HMAC algorithm.

Remarks

Information about HMAC can be found at http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

A Hash-based Message Authentication Code can be used to determine if messages sent over insecure channels have been modified. This works by each party at boths ends sharing a secret key used to sign the sent message and to also authenticate the received message. If the key were compromised, then the authentication cannot be guaranteed.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
HMAC
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashName (get) | Returns the name of the hash.
HashName (let) | Sets the name of the hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash.
Key (let) | Sets the key to be used by the hash.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


HMACSHA512: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 64-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 64-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: HashName (get)

HashName

Returns the name of the hash.

 Public Property Get HashName ( ) As String

Return Values

String - The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: HashName (let)

HashName

Sets the name of the hash.

 Public Property Let HashName(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The name of the hash.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 512 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: HMAC

HMAC

 Implements HMAC

Return Values

HMAC -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Key (get)

Key

Returns the key being used by the hash.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: Key (let)

Key

Sets the key to be used by the hash.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If a null array is passed in for the OutputBuffer, then nothing is copied, however, the hash is still computed on the InputBuffer data.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACSHA512: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class HMACSHA512 Overview


HMACStatic

HMACStatic

Provides static methods associated to the HMAC class.

See Also

Project VBCorLib Overview HMACMD5 | HMACSHA1 | HMACSHA256 | HMACSHA384 | HMACSHA512 | HMACRIPEMD160

Public:

Methods:

Name | Description
Create | Returns an HMAC implementation based on the algorithm name provided.


HMACStatic: Create

Create

Returns an HMAC implementation based on the algorithm name provided.

 Public Function Create(
      Optional ByVal AlgName As String = "HMACSHA1" ) As HMAC

Parameters

AlgName
[ByVal] Optional. String. The name of the HMAC implementation to create.

Default: "HMACSHA1"

Return Values

HMAC - Returns an HMAC implementation based on the algorithm.

Remarks

The default implementation is HMACSHA1 based on the SHA1 hash algorithm.

Valid algorithm names are:

 HMACSHA1
 HMACSHA256
 HMACSHA384
 HMACSHA512
 HMACMD5
 HMACRIPEMD160

If a different implementation is desired, then use the standard . naming convention.

See Also

Project VBCorLib Overview | Class HMACStatic Overview


IAsyncResult

IAsyncResult

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
AsyncState (get) |
AsyncWaitHandle (get) |
CompletedSyncronously (get) |
IsCompleted (get) |


ICloneable

ICloneable

Supports cloning, which creates a new instance of a class with the same value as an existing instance.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Clone | Returns an object that is a clone of this instance.


ICloneable: Clone

Clone

Returns an object that is a clone of this instance.

 Public Function Clone ( ) As Object

Return Values

Object - The objects clone.

Remarks

See Also

Project VBCorLib Overview | Class ICloneable Overview


ICollection

ICollection

Provides an interface to access size and enumeration capabilities of collections.

Remarks

Custom collection classes should implement this interface to allow VBCorLib to interact with it in way necessary. Method calls that add a range will usually accept objects implementing this interface.

Classes implementing this interface should also implement the IEnumerable interface to maintain consistency with inherited interfaces. And, the author should consider implementing the NewEnum and GetEnumerator functions in the classes public interface.

See Also

Project VBCorLib Overview | IEnumerator

Public:

Properties:

Name | Description
Count (get) | Returns the size of the collection.

Methods:

Name | Description
CopyTo | Copies the contents of the collection to an array.
GetEnumerator | Returns an IEnumerator object.


ICollection: CopyTo

CopyTo

Copies the contents of the collection to an array.

 Public Sub CopyTo(
      ByRef arr As Variant,
      ByVal Index As Long )

Parameters

arr
[ByRef] Variant. The array to copy the elements into.
Index
[ByVal] Long. The index in the destination array to start copying the elements to.

Remarks

See Also

Project VBCorLib Overview | Class ICollection Overview


ICollection: Count (get)

Count

Returns the size of the collection.

 Public Property Get Count ( ) As Long

Return Values

Long - The size of the collection.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ICollection Overview


ICollection: GetEnumerator

GetEnumerator

Returns an IEnumerator object.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - The enumerator.

Remarks

See Also

Project VBCorLib Overview | Class ICollection Overview


IComparable

IComparable

Provides a standard interface used to compare an object to a value.

Remarks

This interface is required to allow collections to compare two objects when sorting or searching. If there are objects in the collection that dont implement this interface, then those methods will fail unless an custom comparer is supplied.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CompareTo | Compares a value to the current object instance.


IComparable: CompareTo

CompareTo

Compares a value to the current object instance.

 Public Function CompareTo(
      ByRef value As Variant ) As Long

Parameters

value
[ByRef] Variant. The value to compare this object to.

Return Values

Long - Value indicating its relationship to the value.

Remarks

Comparison guide:
This object is the same value as value returns a 0.
This object is less than the value returns a negative value.
This object is greater than the value returns a positive value.

See Also

Project VBCorLib Overview | Class IComparable Overview


IComparer

IComparer

A standard interface used to implement custom comparers.

Remarks

Use this interface to create a comparer that can be used in searching and sorting functions in the collections. Generally, custom comparers are used for special-case values to compare, such as user-defined types. In order to not have to write logic to compare all types of values, the method could delegate general cases to the default comparer, and compare only the specialized values.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Compare | Compares two elements and returns their relationship.


IComparer: Compare

Compare

Compares two elements and returns their relationship.

 Public Function Compare(
      ByRef x As Variant,
      ByRef y As Variant ) As Long

Parameters

x
[ByRef] Variant. The left-hand-side of the equation.
y
[ByRef] Variant. the right-hand-side of the equation.

Return Values

Long - Value indicating the relationships between the values.

Remarks

Comparison guide:
x is the same value as y returns a 0.
x is less than the value y returns a negative value (-1).
x is greater than the value y returns a positive value (1).

Example

The following example will demonstrate how to create a custom comparer object to be used to sort arrays using special logic that might be needed.

To begin you will need the following items in a new Standard EXE project.

1. A Reference to the VBCorLib library. This should be named VB.EXT: VBCorLib
2. A Module file with Main set as your startup choice.
3. A Class file that will implement the IComparer interface.

Once the project is set up we can write our compare logic in the class. The following is the entire contents of the Class. Rename the class to OddEvenComparer and put the following code in its code window.

' We want to sort our numbers by grouping them in odd and even
' groups. We want all odd numbers to be first in the list and
' all even numbers to be last. Within each odd and even group
' we want those number to be sorted in ascending order in that group.
'
' Our comparer will compare on two levels. The first level
' is to compare whether or not the two values are odd or even.
' If they are both odd or both even, then they belong in the
' same group, so we just compare them as normal to keep them
' sorted within their group. If one is odd and the other is even,
' then we want all odd numbers to be first in the sorted list.
' This means they are a lesser value than even numbers, even if
' the actual value is greater.
'
' Example:  7 is less than 2 because 7 is odd.
'
Option Explicit

' Implement the IComparer interface to allow for custom
' comparisons to take place when sorting an array.
Implements IComparer

' The IComparer interface implementation.
' The return value indicates if x is less than, equal to, or
' greater than y. Any method can be used to compare x to y,
' as long as it is consistant.
'
' x < y should return a negative value
' x = y should return zero
' x > y should return a positive value
Private Function IComparer_Compare(x As Variant, y As Variant) As Long
    ' Check to see if x and y are both odd or both even.
    If (x And 1) = (y And 1) Then
        ' x and y are the same (odd or even), so we will
        ' just use the default comparer object for them.
        IComparer_Compare = Comparer.Default.Compare(x, y)
    ElseIf x And 1 Then
        ' if x is odd then we must indicate that x is less
        ' than y by returning a negative value.
        IComparer_Compare = -1
    Else
        ' x is even, therefore y is odd. x is then a
        ' greater value and we indicate that by return
        ' a positive value.
        IComparer_Compare = 1
    End If
End Function

Now that the OddEvenComparer class is written, we can focuse on the Main method. In the Module code window copy the following.

Option Explicit

Private Sub Main()
    Dim ints() As Long
    Dim i As Long

    ' Create an array using all digits from 0-9.
    ints = cArray.NewArray(ciLong, 6, 4, 2, 8, 7, 1, 9, 0, 5, 3)

    ' sort the array using our custom IComparer object.
    cArray.Sort ints, New OddEvenComparer

    ' Display the sorted array.
    For i = 0 To 9
        ' We use the formatting capabilities of the Console class
        ' to allow for easy value replacement within the output string.
        Console.WriteLine "ints({0}) = {1}", i, ints(i)
    Next i

    ' Wait for user.
    Console.WriteLine "Press Enter"
    Console.ReadLine
End Sub

' This code will produce the following output.
'
' ints(0) = 1
' ints(1) = 3
' ints(2) = 5
' ints(3) = 7
' ints(4) = 9
' ints(5) = 0
' ints(6) = 2
' ints(7) = 4
' ints(8) = 6
' ints(9) = 8
' Press Enter

As you can see, using our custom comparer enables us to sort an array using what ever logic we need. This allows the framework to be extended to the users needs as they are.

See Also

Project VBCorLib Overview | Class IComparer Overview


ICryptoTransform

ICryptoTransform

A common interface implemented by all crypto transform classes.

See Also

Project VBCorLib Overview CryptoAPITransform | RijndaelManagedTransform | HMAC | HMACSHA1 | HMACSHA256 | HMACSHA384 | HMACSHA512 | HMACMD5 | HMACRIPEMD160

Public:

Properties:

Name | Description
CanReuseTransform (get) | Represents if the transform can be reused to start transorming a new set of data.
CanTransformMultipleBlocks (get) | Returns if a transform can transform multiple blocks in a single call.
InputBlockSize (get) | The size of the block of plain text that is to be tranformed.
OutputBlockSize (get) | The size of the block of ciphered text after tranformation occurred.

Methods:

Name | Description
TransformBlock | Transforms a block of plain text data, placing the ciphered text in the output buffer.
TransformFinalBlock | Transforms the last of the data, adding any padding as needed.


ICryptoTransform: CanReuseTransform (get)

CanReuseTransform

Represents if the transform can be reused to start transorming a new set of data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if the transform can be reused, False otherwise.

Remarks

When a transform has finished the final transformation, it may support starting over to begin tranforming a new set of data.

Read Only.

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICryptoTransform: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if a transform can transform multiple blocks in a single call.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if multiple blocks can be transformed, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICryptoTransform: InputBlockSize (get)

InputBlockSize

The size of the block of plain text that is to be tranformed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the size of plain text in bytes to be transformed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICryptoTransform: OutputBlockSize (get)

OutputBlockSize

The size of the block of ciphered text after tranformation occurred.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the size of the ciphered text in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICryptoTransform: TransformBlock

TransformBlock

Transforms a block of plain text data, placing the ciphered text in the output buffer.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The plain text to be transformed.
InputOffset
[ByVal] Long. The starting index to begin transforming.
InputCount
[ByVal] Long. The number of bytes to be processed.
OutputBuffer
[ByRef] Byte. The array to place the transformed data.
OutputOffset
[ByVal] Long. The starting index to begin placing the transformed data.

Return Values

Long - The number of byte actually placed in the output buffer during this call.

Remarks

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICryptoTransform: TransformFinalBlock

TransformFinalBlock

Transforms the last of the data, adding any padding as needed.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The plain text buffer to process.
InputOffset
[ByVal] Long. The starting index of the data to be processed.
InputCount
[ByVal] Long. The amount of data to be processed.

Return Values

Byte() - The final array of processed data.

Remarks

See Also

Project VBCorLib Overview | Class ICryptoTransform Overview


ICspAsymmetricAlgorithm

ICspAsymmetricAlgorithm

Provices methods to allow access to Key container information and Crypto API blob import/export ability for Asymmetric algorithmes.

Remarks

This interface provides a common set of methods used to retrieve information about an Asymmetric algorithms key container and provides the ability to import and export Byte arrays represetning Crypto API blobs used by Microsoft Cryptography Service Providers.

See Also

Project VBCorLib Overview | RSACryptoServiceProvider | DSACryptoServiceProvider

Public:

Properties:

Name | Description
CspKeyContainerInfo (get) | Returns a key container object holding information about an Asymmetric algorithm.

Methods:

Name | Description
ExportCspBlob | Returns a Crypto API blob from the Asymmetric algorithm.
ImportCspBlob | Imports a Crypto API blob to be used by the Asymmetric algorithm.


ICspAsymmetricAlgorithm: CspKeyContainerInfo (get)

CspKeyContainerInfo

Returns a key container object holding information about an Asymmetric algorithm.

 Public Property Get CspKeyContainerInfo ( ) As CspKeyContainerInfo

Return Values

CspKeyContainerInfo - A CspKeyContainerInfo object.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ICspAsymmetricAlgorithm Overview


ICspAsymmetricAlgorithm: ExportCspBlob

ExportCspBlob

Returns a Crypto API blob from the Asymmetric algorithm.

 Public Function ExportCspBlob(
      ByVal IncludePrivateParameters As Boolean ) As Byte ( ) :

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the Blob should contain information considered private and sensative. The private information is usually information required to encrypt or sign data.

Return Values

Byte() - A Byte array containing the Crypto API blob information.

Remarks

See Also

Project VBCorLib Overview | Class ICspAsymmetricAlgorithm Overview


ICspAsymmetricAlgorithm: ImportCspBlob

ImportCspBlob

Imports a Crypto API blob to be used by the Asymmetric algorithm.

 Public Sub ImportCspBlob(
      ByRef RawData ( ) As Byte )

Parameters

RawData
[ByRef] Byte. The Byte array representing the Crypto API blob.

Remarks

See Also

Project VBCorLib Overview | Class ICspAsymmetricAlgorithm Overview


ICustomFormatter

ICustomFormatter

The ICustomFormatter interface is used to allow user-defined classes to be the formatting service for values.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Format | Returns a formatted value from a custom formatter.


ICustomFormatter: Format

Format

Returns a formatted value from a custom formatter.

 Public Function Format(
      ByVal fmt As String,
      ByRef arg As Variant,
      ByVal provider As IFormatProvider ) As String

Parameters

fmt
[ByVal] String. The formatting information provided.
arg
[ByRef] Variant. The value to be formatted.
provider
[ByVal] IFormatProvider. A provider that may have formatting capabilities.

Return Values

String - A formatted value.

Remarks

See Also

Project VBCorLib Overview | Class ICustomFormatter Overview


IDictionary

IDictionary

This provides a standard interface to be impelments by key-value list collection.

Remarks

Lists that maintain a key-value pair should implement this interface to allow cross-compatibility usage amongst all key-value pair lists.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
Count (get) | Returns the size of the collection.
IsFixedSize (get) | Returns if this instance is fixed-size.
IsReadOnly (get) | Returns if this instance is read-only.
Item (get) | Returns an item from the list that is associated with the specified key.
Item (let) | Sets the value in the list that is associated to the specified key.
Item (set) | Sets the value in the list that is associated to the specified key.
Keys (get) | Returns a collection of the keys in the list.
values (get) | Returns a collection of the values in the list.

Methods:

Name | Description
Add | Adds a new value that is associated with the key to the list.
Clear | Clears the list of its contents.
Contains | Searches for the existence of the key in the list.
CopyTo | Copies the contents of the collection to an array.
GetEnumerator | Returns an IEnumerator object.
Remove | Removes a value from the list that is associated to the key.


IDictionary: Add

Add

Adds a new value that is associated with the key to the list.

 Public Sub Add(
      ByRef Key As Variant,
      ByRef value As Variant )

Parameters

Key
[ByRef] Variant. The new key used to locate the value.
value
[ByRef] Variant. The value to be associated with the key.

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Clear

Clear

Clears the list of its contents.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Contains

Contains

Searches for the existence of the key in the list.

 Public Function Contains(
      ByRef Key As Variant ) As Boolean

Parameters

Key
[ByRef] Variant. The key to be searching for.

Return Values

Boolean - Indication of the existence of the key.

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: CopyTo

CopyTo

Copies the contents of the collection to an array.

 Public Sub CopyTo(
      ByRef arr As Variant,
      ByVal Index As Long )

Parameters

arr
[ByRef] Variant. The array to copy the elements into.
Index
[ByVal] Long. The index in the destination array to start copying the elements to.

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Count (get)

Count

Returns the size of the collection.

 Public Property Get Count ( ) As Long

Return Values

Long - The size of the collection.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: GetEnumerator

GetEnumerator

Returns an IEnumerator object.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - The enumerator.

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: IsFixedSize (get)

IsFixedSize

Returns if this instance is fixed-size.

 Public Property Get IsFixedSize ( ) As Boolean

Return Values

Boolean - Indication if is a fixid-size dictionary list.

Remarks

A FixedSize list can still have items replaced by new values, only now values can be added or removed.

Read Only.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: IsReadOnly (get)

IsReadOnly

Returns if this instance is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - An indication if this instance is read-only.

Remarks

A ReadOnly list can only retrieve items from the list. The list cannot change, add, or remove items.

Read Only.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Item (get)

Item

Returns an item from the list that is associated with the specified key.

 Public Property Get Item(
      ByRef Key As Variant ) As Variant

Parameters

Key
[ByRef] Variant. The key to search for in the list.

Return Values

Variant - The value that is associated to the key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Item (let)

Item

Sets the value in the list that is associated to the specified key.

 Public Property Let Item(
      ByRef Key As Variant,
      ByRef value As Variant ) :

Parameters

Key
[ByRef] Variant. The key used to identify the value.
value
[ByRef] Variant. The value to associate with the key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Item (set)

Item

Sets the value in the list that is associated to the specified key.

 Public Property Set Item(
      ByRef Key As Variant,
      ByRef value As Variant ) :

Parameters

Key
[ByRef] Variant. The key used to identify the value.
value
[ByRef] Variant. The value to associate with the key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Keys (get)

Keys

Returns a collection of the keys in the list.

 Public Property Get Keys ( ) As ICollection

Return Values

ICollection - A collection of the keys in the list.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: Remove

Remove

Removes a value from the list that is associated to the key.

 Public Sub Remove(
      ByRef Key As Variant )

Parameters

Key
[ByRef] Variant. The key to search for to be removed.

Remarks

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionary: values (get)

values

Returns a collection of the values in the list.

 Public Property Get values ( ) As ICollection

Return Values

ICollection - A collection of the values in the list.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionary Overview


IDictionaryEnumerator

IDictionaryEnumerator

An interface used to enumerate a dictionary style collections (Hashtable.)

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
IDictionaryEnumType |

Properties:

Name | Description
Current (get) | Returns a DictionaryEntry object for the current location in the collection.
Entry (get) | Returns a DictionaryEntry object for the current location in the collection.
Key (get) | Returns the key portion of the current DictionaryEntry.
Value (get) | Returns the value portion of the current DictionaryEntry.

Methods:

Name | Description
MoveNext | Moves the enumerator pointer to the next element in the collection.
Reset | Resets the enumerator to the beginning of the collection.


IDictionaryEnumerator: Current (get)

Current

Returns a DictionaryEntry object for the current location in the collection.

 Public Property Get Current ( ) As Variant

Return Values

Variant - A DictionaryEntry containing key-value pairs.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IDictionaryEnumerator: Entry (get)

Entry

Returns a DictionaryEntry object for the current location in the collection.

 Public Property Get Entry ( ) As DictionaryEntry

Return Values

DictionaryEntry - A DictionaryEntry containing key-value pairs.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IDictionaryEnumerator: Key (get)

Key

Returns the key portion of the current DictionaryEntry.

 Public Property Get Key ( ) As Variant

Return Values

Variant - The key of the current collection entry.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IDictionaryEnumerator: MoveNext

MoveNext

Moves the enumerator pointer to the next element in the collection.

 Public Function MoveNext ( ) As Boolean

Return Values

Boolean - An indication of the success of the movement.

Remarks

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IDictionaryEnumerator: Reset

Reset

Resets the enumerator to the beginning of the collection.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IDictionaryEnumerator: Value (get)

Value

Returns the value portion of the current DictionaryEntry.

 Public Property Get Value ( ) As Variant

Return Values

Variant - The value of the current collection entry.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IDictionaryEnumerator Overview


IEnumerable

IEnumerable

An interface that can be used to get an enumerator for an object.

Remarks

Implement this interface for general cases where only an enumerator is needed.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
GetEnumerator | Returns an IEnumerator object.


IEnumerable: GetEnumerator

GetEnumerator

Returns an IEnumerator object.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - The enumerator.

Remarks

See Also

Project VBCorLib Overview | Class IEnumerable Overview


IEnumerator

IEnumerator

This interface is used to allow for custom enumerators to be built.

Remarks

The enumerator can be used manually to enumerate through the values of a list, or it can be wrapped in a custom enumerator to allow it to be used in the For..Each context.

To use an IEnumerator object in For..Each, call the CreateEnumerator method passing in the IEnumerator object. The returned value is then returned in the standard NewEnum(-4) function called by For..Each. The enumeration will then be delegated to the custom IEnumerator object.

Example

 Public Function NewEnum() As IUnknown
     Dim e As New MyEnumerator
     e.Init Me
     Set NewEnum = CreateEnumerator(e)
 End Function

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
Current (get) | This returns the current item of the enumeration. The current item is called after a successful MoveNext.

Methods:

Name | Description
MoveNext | Requests the enumerator moves to the next item being enumerated. Returns True on success, False otherwise. This is called prior to Current. If this is successful, Current will be called.
Reset | Requests the enumerator resets itself to begin enumerating from the beginning.


IEnumerator: Current (get)

Current

This returns the current item of the enumeration. The current item is called after a successful MoveNext.

 Public Property Get Current ( ) As Variant

Return Values

Variant - The current value in the enumeration.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IEnumerator Overview


IEnumerator: MoveNext

MoveNext

Requests the enumerator moves to the next item being enumerated. Returns True on success, False otherwise. This is called prior to Current. If this is successful, Current will be called.

 Public Function MoveNext ( ) As Boolean

Return Values

Boolean - Indication if the move was successful.

Remarks

See Also

Project VBCorLib Overview | Class IEnumerator Overview


IEnumerator: Reset

Reset

Requests the enumerator resets itself to begin enumerating from the beginning.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class IEnumerator Overview


IFormatProvider

IFormatProvider

Provides a mechanism for retrieving an object to control formatting.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
GetFormat | Returns an object to provide formatting services.


IFormatProvider: GetFormat

GetFormat

Returns an object to provide formatting services.

 Public Function GetFormat(
      ByVal FormatType As String ) As Object

Parameters

FormatType
[ByVal] String. The TypeName of the formatting class requested.

Return Values

Object - An object to format data in a specific fashion for such methods as ToString.

Remarks

Calling this function should not raise an exception. If the requested FormatType is not supported then Nothing should be returned.

See Also

Project VBCorLib Overview | Class IFormatProvider Overview


IFormattable

IFormattable

Provides functionality to format the value of an object into a string representation.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
ToString | Returns the string representation of the object.


IFormattable: ToString

ToString

Returns the string representation of the object.

 Public Function ToString(
      ByVal Format As String,
      ByVal provider As IFormatProvider ) As String

Parameters

Format
[ByVal] String. The format string that describes the requested formatting of the value.
- or -
vbNullString to use the default formatting for the type.
provider
[ByVal] IFormatProvider. A provider that can format the value.
- or -
Nothing to use the default formatter for the current locale.

Return Values

String - A string representation of the object with formatting applied.

Remarks

See Also

Project VBCorLib Overview | Class IFormattable Overview | IFormatProvider


IHashAlgorithm

IHashAlgorithm

Provides an interface all hash algorithm callbacks must implement.

Remarks

The HashAlgorithmBase class uses callbacks to perform hashing functions. A callback object must implement this interface to be used.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
HashCore | Requests a callback to hash a set of bytes, maintaining any state needed between calls.
HashFinal | Requests the callback to hash any buffered data and return the resulting hash value.
Initialize | Requests that a callback reset itself to prepare for hashing a new value.


IHashAlgorithm: HashCore

HashCore

Requests a callback to hash a set of bytes, maintaining any state needed between calls.

 Public Sub HashCore(
      ByRef Bytes ( ) As Byte,
      ByVal Index As Long,
      ByVal Count As Long )

Parameters

Bytes
[ByRef] Byte. The data to be hashed.
Index
[ByVal] Long. The starting index in the data to begin hashing.
Count
[ByVal] Long. The number of bytes to be hashed.

Remarks

It is up to the callback to maintain any state needed between calls.

See Also

Project VBCorLib Overview | Class IHashAlgorithm Overview


IHashAlgorithm: HashFinal

HashFinal

Requests the callback to hash any buffered data and return the resulting hash value.

 Public Function HashFinal(
      ByRef Buffer ( ) As Byte,
      ByVal BufferCount As Long,
      ByVal MessageLength As Currency ) As Byte ( ) :

Parameters

Buffer
[ByRef] Byte. The internally kept buffered data.
BufferCount
[ByVal] Long. The number of bytes actually in the buffer.
MessageLength
[ByVal] Currency. The size of the message in bytes.

Return Values

Byte() - The resulting hash value.

Remarks

See Also

Project VBCorLib Overview | Class IHashAlgorithm Overview


IHashAlgorithm: Initialize

Initialize

Requests that a callback reset itself to prepare for hashing a new value.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class IHashAlgorithm Overview


IHashcodeProvider

IHashcodeProvider

Provides an interface to allow for a custom hashcode generator.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
GetHashCode | Returns a custom generated hashcode.


IHashcodeProvider: GetHashCode

GetHashCode

Returns a custom generated hashcode.

 Public Function GetHashCode(
      ByRef value As Variant ) As Long

Parameters

value
[ByRef] Variant. The value to generate a hashcode for.

Return Values

Long - The generated hashcode.

Remarks

See Also

Project VBCorLib Overview | Class IHashcodeProvider Overview


IList

IList

An interface that provides methods for accessing and manipulating values at specified indexes within a list.

Remarks

This interface should be implemented in classes that provide a list style functionality.

See Also

Project VBCorLib Overview | ICollection | IEnumerable

Public:

Properties:

Name | Description
Count (get) | Returns the number of items in the list.
IsFixedSize (get) | Returns if the list is fixed-size.
IsReadOnly (get) | Returns if the list is read-only.
Item (get) | Returns an item at specified index.
Item (let) | Sets the item at the specified index to a new value.
Item (set) | Sets the item at the specified index to a new value.

Methods:

Name | Description
Add | Adds a new item to the list.
Clear | Clears the contents of the list.
Contains | Determines if the list contains a specific value.
CopyTo | Copies the elements in the list to the array.
GetEnumerator | Returns an enumerator used to iterate over the list.
IndexOf | Returns the index of the value within the list.
Insert | Inserts a value into a list at the specified index.
Remove | Removes a value from the list.
RemoveAt | Removes a value from the list at the specified index.


IList: Add

Add

Adds a new item to the list.

 Public Function Add(
      ByRef value As Variant ) As Long

Parameters

value
[ByRef] Variant. The item to be added to the list.

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: Clear

Clear

Clears the contents of the list.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: Contains

Contains

Determines if the list contains a specific value.

 Public Function Contains(
      ByRef value As Variant,
      Optional ByVal Comparer As IComparer ) As Boolean

Parameters

value
[ByRef] Variant. the value to check the list for.
Comparer
[ByVal] Optional. IComparer. A custom comparer used for comparing values in the list to the value being sought.

Return Values

Boolean - An indication of the value being found in the list.

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: CopyTo

CopyTo

Copies the elements in the list to the array.

 Public Sub CopyTo(
      ByRef arr As Variant,
      ByVal Index As Long )

Parameters

arr
[ByRef] Variant. The array to copy the elements to.
Index
[ByVal] Long. The starting index in the array to begin copying to.

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: Count (get)

Count

Returns the number of items in the list.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of items in the list.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class IList Overview


IList: GetEnumerator

GetEnumerator

Returns an enumerator used to iterate over the list.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - An enumerator used to iterate over the list.

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: IndexOf

IndexOf

Returns the index of the value within the list.

 Public Function IndexOf(
      ByRef value As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

value
[ByRef] Variant. The value to find the index of in the list.
Comparer
[ByVal] Optional. IComparer. A custom comparer used for comparing values in the list to the value being sought.

Return Values

Long - The index the value was found, or -1 if the value was not found.

Remarks

In general, -1 is returned for an unfound value. If the lowerbound of the underlying list is not 0, then the return value should be the lowerbound-1 for values not found.

See Also

Project VBCorLib Overview | Class IList Overview


IList: Insert

Insert

Inserts a value into a list at the specified index.

 Public Sub Insert(
      ByVal Index As Long,
      ByRef value As Variant )

Parameters

Index
[ByVal] Long. The postion in the list to insert the new value.
value
[ByRef] Variant. The new value to be inserted into the list.

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IList: IsFixedSize (get)

IsFixedSize

Returns if the list is fixed-size.

 Public Property Get IsFixedSize ( ) As Boolean

Return Values

Boolean - Indication of the list being fixed-size.

Remarks

A fixed-size list can have the elements changed, however, elements cannot be added or removed.

Read Only.

See Also

Project VBCorLib Overview | Class IList Overview


IList: IsReadOnly (get)

IsReadOnly

Returns if the list is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Indication of the list being read-only.

Remarks

A read-only list can only view the elements in the list, however, elements cannot be added, removed, or modified.

Read Only.

See Also

Project VBCorLib Overview | Class IList Overview


IList: Item (get)

Item

Returns an item at specified index.

 Public Property Get Item(
      ByVal Index As Long ) As Variant

Parameters

Index
[ByVal] Long. The index of the item to return.

Return Values

Variant - The item at the specified index.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IList Overview


IList: Item (let)

Item

Sets the item at the specified index to a new value.

 Public Property Let Item(
      ByVal Index As Long,
      ByRef RHS As Variant ) :

Parameters

Index
[ByVal] Long. The index of the item to set the value to.
RHS
[ByRef] Variant. The new value to set the item to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IList Overview


IList: Item (set)

Item

Sets the item at the specified index to a new value.

 Public Property Set Item(
      ByVal Index As Long,
      ByRef RHS As Variant ) :

Parameters

Index
[ByVal] Long. The index of the item to set the value to.
RHS
[ByRef] Variant. The new value to set the item to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class IList Overview


IList: Remove

Remove

Removes a value from the list.

 Public Sub Remove(
      ByRef value As Variant,
      Optional ByVal Comparer As IComparer )

Parameters

value
[ByRef] Variant. The value to be removed from the list.
Comparer
[ByVal] Optional. IComparer. A custom comparer used for comparing values in the list to the value being sought.

Remarks

This method searches the list for the first instance of the value. If one is found, it is removed from the list.

See Also

Project VBCorLib Overview | Class IList Overview


IList: RemoveAt

RemoveAt

Removes a value from the list at the specified index.

 Public Sub RemoveAt(
      ByVal Index As Long )

Parameters

Index
[ByVal] Long. The position of the value in the list to be removed.

Remarks

See Also

Project VBCorLib Overview | Class IList Overview


IndexOutOfRangeException

IndexOutOfRangeException

The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array.

Remarks

This is the same as error 9, subcript out of range.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


IndexOutOfRangeException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview | Exception


IndexOutOfRangeException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview | Exception


IndexOutOfRangeException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


IndexOutOfRangeException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class IndexOutOfRangeException Overview


INIFile

INIFile

Provides methods for manipulating an INI initialization file.

Remarks

An INI file contains sections in a format like

[section]
key=value

 A new INIFile object can be created using the NewINIFile method.

 Dim ini As INIFile
 Set ini = NewINIFile("c:\settings.ini")

If the file name does not specify the directory, then the file will be created in the Windows directory. In order to specify the current directory, preceed the file name with a current directory symbol ".".

 Dim ini As INIFile
 Set ini = NewINIFile(".\local.ini")

See Also

Project VBCorLib Overview | INISectionWriter

Implements:

IObject

Public:

Properties:

Name | Description
AutoFlush (get) | Returns the auto-flush state of the object.
AutoFlush (let) | Sets the auto-flush state of the object.
FileName (get) | Returns the name of the INI file being manipulated.

Methods:

Name | Description
DeleteKey | Deletes a key-value pair in a specific section within an INI file.
DeleteSection | Deletes an entire section from an INI file, including all key-value pairs.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Flushes any cached updates to the INI file.
GetBoolean | Returns a Boolean value from the specified key in the specified section of an INI file.
GetByte | Returns a Byte value from the specified key in the specified section of an INI file.
GetCurrency | Returns a Currency value from the specified key in the specified section of an INI file.
GetDate | Returns a Date value from the specified key in the specified section of an INI file.
GetDateTime | Returns a cDateTime value from the specified key in the specified section of an INI file.
GetDecimal | Returns a Decimal value from the specified key in the specified section of an INI file.
GetDouble | Returns a Double value from the specified key in the specified section of an INI file.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetInteger | Returns a Integer value from the specified key in the specified section of an INI file.
GetKeyNames | Returns a list of key names in an INI file.
GetLong | Returns a Long value from the specified key in the specified section of an INI file.
GetSectionNames | Returns a list of section names in an INI file.
GetSectionWriter | Returns a SectionWriter used to create entire sections withing an INI file at once.
GetSingle | Returns a Single value from the specified key in the specified section of an INI file.
GetString | Returns the string value of the specified key in the specified section of an INI file.
GetTimeSpan | Returns a TimeSpan value from the specified key in the specified section of an INI file.
GetValues | Returns an IDictionary object containing the key-value pairs from a section in an INI file.
SetValue | Sets a key-value pair within a section of an INI file.
ToString | Returns a string representation of this object instance.


INIFile: AutoFlush (get)

AutoFlush

Returns the auto-flush state of the object.

 Public Property Get AutoFlush ( ) As Boolean

Return Values

Boolean - Returns True if AutoFlush is active, False otherwise.

Remarks

When AutoFlush is set to True, the object will call Flush after any method that writes to the INI file.

Read/Write.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: AutoFlush (let)

AutoFlush

Sets the auto-flush state of the object.

 Public Property Let AutoFlush(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. The new auto-flush state of the object.

Remarks

When AutoFlush is set to True, the object will call Flush after any method that writes to the INI file.

Read/Write.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: DeleteKey

DeleteKey

Deletes a key-value pair in a specific section within an INI file.

 Public Sub DeleteKey(
      ByVal Section As String,
      ByVal Key As String )

Parameters

Section
[ByVal] String. The section the key-value pair is to be deleted from.
Key
[ByVal] String. The key of the key-value pair to be deleted.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: DeleteSection

DeleteSection

Deletes an entire section from an INI file, including all key-value pairs.

 Public Sub DeleteSection(
      ByVal Section As String )

Parameters

Section
[ByVal] String. The name of the section to be deleted from an INI file.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: FileName (get)

FileName

Returns the name of the INI file being manipulated.

 Public Property Get FileName ( ) As String

Return Values

String - The INI file name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: Flush

Flush

Flushes any cached updates to the INI file.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetBoolean

GetBoolean

Returns a Boolean value from the specified key in the specified section of an INI file.

 Public Function GetBoolean(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Boolean ) As Boolean

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Boolean. The default value to return if the key is not found in the section, or the value could not be converted to a Boolean.

Return Values

Boolean -

Remarks

An INI file contains all values as Strings. The value is converted back into a Boolean using the CBool function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetByte

GetByte

Returns a Byte value from the specified key in the specified section of an INI file.

 Public Function GetByte(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Byte ) As Byte

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Byte. The default value to return if the key is not found in the section, or the value could not be converted to a Byte.

Return Values

Byte -

Remarks

An INI file contains all values as Strings. The value is converted back into a Byte using the CByte function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetCurrency

GetCurrency

Returns a Currency value from the specified key in the specified section of an INI file.

 Public Function GetCurrency(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Currency ) As Currency

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Currency. The default value to return if the key is not found in the section, or the value could not be converted to a Currency.

Return Values

Currency -

Remarks

An INI file contains all values as Strings. The value is converted back into a Currency using the CCur function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetDate

GetDate

Returns a Date value from the specified key in the specified section of an INI file.

 Public Function GetDate(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Date ) As Date

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Date. The default value to return if the key is not found in the section, or the value could not be converted to a Date.

Return Values

Date -

Remarks

An INI file contains all values as Strings. The value is converted back into a Date using the CDate function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetDateTime

GetDateTime

Returns a cDateTime value from the specified key in the specified section of an INI file.

 Public Function GetDateTime(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As cDateTime ) As cDateTime

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. cDateTime. The default value to return if the key is not found in the section, or the value could not be converted to a cDateTime.

Return Values

cDateTime -

Remarks

An INI file contains all values as Strings. The value is converted back into a cDateTime using the Cor.NewDate function. If an error happens, then the default is returned.

Passing in Nothing as the default will return a cDateTime of #12:00:00 AM# for the default.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetDecimal

GetDecimal

Returns a Decimal value from the specified key in the specified section of an INI file.

 Public Function GetDecimal(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Variant ) As Variant

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Variant. The default value to return if the key is not found in the section, or the value could not be converted to a Decimal.

Return Values

Variant -

Remarks

An INI file contains all values as Strings. The value is converted back into a Decimal using the CDec function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetDouble

GetDouble

Returns a Double value from the specified key in the specified section of an INI file.

 Public Function GetDouble(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Double ) As Double

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Double. The default value to return if the key is not found in the section, or the value could not be converted to a Double.

Return Values

Double -

Remarks

An INI file contains all values as Strings. The value is converted back into a Double using the CDbl function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetInteger

GetInteger

Returns a Integer value from the specified key in the specified section of an INI file.

 Public Function GetInteger(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Integer ) As Integer

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Integer. The default value to return if the key is not found in the section, or the value could not be converted to an Integer.

Return Values

Integer -

Remarks

An INI file contains all values as Strings. The value is converted back into an Integer using the CInt function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetKeyNames

GetKeyNames

Returns a list of key names in an INI file.

 Public Function GetKeyNames(
      ByVal Section As String ) As String ( )

Parameters

Section
[ByVal] String. The section within an INI file to retrieve key names.

Return Values

String() - An array of key names from a section, or a zero-length array if no keys exist in the section.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetLong

GetLong

Returns a Long value from the specified key in the specified section of an INI file.

 Public Function GetLong(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Long ) As Long

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Long. The default value to return if the key is not found in the section, or the value could not be converted to a Long.

Return Values

Long -

Remarks

An INI file contains all values as Strings. The value is converted back into a Long using the CLng function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetSectionNames

GetSectionNames

Returns a list of section names in an INI file.

 Public Function GetSectionNames ( ) As String ( )

Return Values

String() - An array of section names, or a zero-length array if no sections exist.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetSectionWriter

GetSectionWriter

Returns a SectionWriter used to create entire sections withing an INI file at once.

 Public Function GetSectionWriter(
      ByVal Section As String ) As IResourceWriter

Parameters

Section
[ByVal] String. The section to create using the writer.

Return Values

IResourceWriter - The SectionWriter used to create an entier section.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview | INISectionWriter


INIFile: GetSingle

GetSingle

Returns a Single value from the specified key in the specified section of an INI file.

 Public Function GetSingle(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As Single ) As Single

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. Single. The default value to return if the key is not found in the section, or the value could not be converted to a Single.

Return Values

Single -

Remarks

An INI file contains all values as Strings. The value is converted back into a Single using the CSng function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetString

GetString

Returns the string value of the specified key in the specified section of an INI file.

 Public Function GetString(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As String ) As String

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. String. The default value to return if the key is not found in the section.

An empty string is a valid value in an INI file. Testing for an empty string does not mean the value was not found.

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetTimeSpan

GetTimeSpan

Returns a TimeSpan value from the specified key in the specified section of an INI file.

 Public Function GetTimeSpan(
      ByVal Section As String,
      ByVal Key As String,
      Optional ByVal Default As TimeSpan ) As TimeSpan

Parameters

Section
[ByVal] String. The section within the INI file to search for the key.
Key
[ByVal] String. The key in the section of an INI file to retrieve the value of.
Default
[ByVal] Optional. TimeSpan. The default value to return if the key is not found in the section, or the value could not be converted to a TimeSpan.

Return Values

TimeSpan -

Remarks

An INI file contains all values as Strings. The value is converted back into a TimeSpan by first testing if the string is a date and taking the Time portion, otherwise, the normal TimeSpan.Parse method is used. This expects the string to be in the TimeSpan format. If an error happens, then the default is returned.

Passing in Nothing for the default will return TimeSpan.Zero for the default.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: GetValues

GetValues

Returns an IDictionary object containing the key-value pairs from a section in an INI file.

 Public Function GetValues(
      ByVal Section As String ) As IDictionary

Parameters

Section
[ByVal] String. The section to retrieve all the key-value pairs from.

Return Values

IDictionary - An IDictionary object containing zero or more key-value pairs.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: SetValue

SetValue

Sets a key-value pair within a section of an INI file.

 Public Sub SetValue(
      ByVal Section As String,
      ByVal Key As String,
      ByRef Value As Variant )

Parameters

Section
[ByVal] String. The INI section within the file to set the value.
Key
[ByVal] String. The name of the value to be set.
Value
[ByRef] Variant. The value to be set in the INI file.

Remarks

If an object is passed in, then it must implement the cObject interface or an exception will be thrown. All other datatypes will be converted to their normal string value.

See Also

Project VBCorLib Overview | Class INIFile Overview


INIFile: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class INIFile Overview


INISectionWriter

INISectionWriter

Creates an entire section at once in an INI file.

Remarks

All values in the specified section are deleted, so there is no merging of the existing section key-value pairs and the new key-value pairs. Only the new key-value pairs will exist in the section once generated.

See Also

Project VBCorLib Overview

Implements:

IObject
IResourceWriter

Public:

Properties:

Name | Description
FileName (get) | Returns the name of the INI file.
SectionName (get) | Returns the name of the section to write all the key-value pairs to.

Methods:

Name | Description
AddResource | Adds a key-value pair into the writer in preparation of creating an INI section.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Generate | Creates a section within an INI file.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


INISectionWriter: AddResource

AddResource

Adds a key-value pair into the writer in preparation of creating an INI section.

 Public Sub AddResource(
      ByVal Key As String,
      ByRef Value As Variant )

Parameters

Key
[ByVal] String. The identifier of the value to be written to the INI file section.
Value
[ByRef] Variant. The value to be written to the INI file section.

Remarks

If an object is passed in, then it must implement the IObject interface or an exception will be thrown. All other datatypes will be converted to their normal string value.

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: FileName (get)

FileName

Returns the name of the INI file.

 Public Property Get FileName ( ) As String

Return Values

String - The name of the INI file.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: Generate

Generate

Creates a section within an INI file.

 Public Sub Generate ( )

Remarks

All existing key-value pairs already in the specified section of the INI file will be removed.

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: IResourceWriter

IResourceWriter

 Implements IResourceWriter

Return Values

IResourceWriter -

Remarks

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: SectionName (get)

SectionName

Returns the name of the section to write all the key-value pairs to.

 Public Property Get SectionName ( ) As String

Return Values

String - The name of the section in the INI file.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


INISectionWriter: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class INISectionWriter Overview


InvalidCastException

InvalidCastException

The exception that is thrown for invalid casting or explicit conversion.

Remarks

This exception is thrown for the same reasone a type mismatch would be thrown. There may be additional situations in which this exception is thrown.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


InvalidCastException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview | Exception


InvalidCastException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview | Exception


InvalidCastException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidCastException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class InvalidCastException Overview


InvalidOperationException

InvalidOperationException

The exception that is thrown when a method call is invalid for the objects current state.

Remarks

InvalidOperationException is used in cases when the failure to invoke a method is caused by reasons other than invalid arguments.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


InvalidOperationException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview | Exception


InvalidOperationException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview | Exception


InvalidOperationException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


InvalidOperationException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class InvalidOperationException Overview


IObject

IObject

This is the base interface to allow objects to be utilized throughout most of VBCorLib.

Remarks

The cObject interface is utilized by many of the classes in VBCorLib. By implementing this interface in new classes, those classes help VBCorLib to perform specific tasks better. Such tasks include searching for a value.

If this interface is implemented, then the same methods should be implemented in the normal public interface to maintain consistency.

If a class is not expected to be used by VBCorLib, then implementing this interface is not necessary.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Equals | Returns a boolean indicating the equality of this instance versus the passed in value.
GetHashCode | Returns a pseudo-unique number to identify this object instance.
ToString | Returns a string representation of the object.


IObject: Equals

Equals

Returns a boolean indicating the equality of this instance versus the passed in value.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare this instance against for equality.

Return Values

Boolean - Boolean indicating the equality of this instance and the value.

Remarks

This should be overridden to provide the type of equality checking that is appropriate for each class. Most classes simply check to see if the value is the same object instance as this object, meaning, they are both the same object in memory. cDateTime checks to see if the value has the same date as this instance, and TimeSpan checks to see if the value has the same number of milliseconds as this instance to determine equality.

This method should not throw an exception if the wrong datatype is supplied. Instead, it should just return False to indicate that the value is not equal to this object instance.

What should Equals when
What should Equals return when | Returns
Two Variables Point to the same object | True
Two objects represent the same internal value | True

See Also

Project VBCorLib Overview | Class IObject Overview


IObject: GetHashCode

GetHashCode

Returns a pseudo-unique number to identify this object instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - The number representing this instance.

Remarks

A hashcode is used by VBCorLib to help distinguish different instances of objects. The Hashtable uses an objects hashcode to help search for a specific object. Since there is a finite set of numbers, each hashcode is not truly unique. A generated set of hashcodes should produce an evenly distributed set of values for a specific class type.

This should be overridden to provide a value to identify this object instance. Most objects return their location in memory, unless the objects need to be considered the same as other objects. This occurs for both cDateTime and TimeSpan objects for example. All cDateTime objects that have the same date will generate the same hashcode. Same for TimeSpan. If the spans are the same, so are the hashcodes.

A default implementation for this method could be

 Public Function GetHashCode() As Long
     GetHashCode = ObjPtr(CUnk(Me))
 End Function

See Also

Project VBCorLib Overview | Class IObject Overview


IObject: ToString

ToString

Returns a string representation of the object.

 Public Function ToString ( ) As String

Return Values

String - A string representation of the object.

Remarks

This should be overridden to return appropriate string values for the given object.As examples, the StringBuilder returns the current state of the internal string that is being built, and the cDateTime object returns the date and time for that object instance.

See Also

Project VBCorLib Overview | Class IObject Overview


IOException

IOException

This exception is thrown when an I/O error occurs.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


IOException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview | Exception


IOException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview | Exception


IOException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class IOException Overview


IOException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class IOException Overview


IResourceDecoder

IResourceDecoder

Provides an interface to allow a ResourceReader to decode resource types found within a .RES file.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Decode | Decodes a raw resource data, returning the number of embedded resources created.
GetDecodeType | Returns the type of resource this decoder can decode.
GetResource | Returns the next resource key and data that was decoded from DecodeResource.


IResourceDecoder: Decode

Decode

Decodes a raw resource data, returning the number of embedded resources created.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The key associated with the raw resource data.
Bytes
[ByRef] Byte. The raw resource data to be decoded.

Return Values

Long - The number of resources created from the raw data.

Remarks

The decoder needs to maintain the newly decoded resource. Only one resource is decoded at a time and then retrieved, so the need to maintain multiple decoded resources is unecessary.

See Also

Project VBCorLib Overview | Class IResourceDecoder Overview


IResourceDecoder: GetDecodeType

GetDecodeType

Returns the type of resource this decoder can decode.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - Either the resource name or ID.

Remarks

See Also

Project VBCorLib Overview | Class IResourceDecoder Overview


IResourceDecoder: GetResource

GetResource

Returns the next resource key and data that was decoded from DecodeResource.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. The next resource key return to be returned.
ReturnValue
[ByRef] Variant. The next resource value to be returned.

Return Values

Boolean -

Remarks

Returns the next available decoded resource. Once that resource has been returned, it should not be returned again.

This function will be called as long as it returns True.

See Also

Project VBCorLib Overview | Class IResourceDecoder Overview


IResourceEncoder

IResourceEncoder

Provides an interface for classes to be used to encode data into byte arrays used by the ResourceWriter.

Remarks

An encoder needs to hold multiple encoded resources. Once all resources have been encoded, each resource will be requested one at a time. The same resource should never be returned more than once.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Encode | Encodes a value into a byte array for later retrieval.
GetEncodedResource | Returns the next available resource from the encoder.
Reset | Requests that the encoder release all currently encoded values.


IResourceEncoder: Encode

Encode

Encodes a value into a byte array for later retrieval.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to be encoded into a resource compatible byte array.
ResourceName
[ByRef] Variant. The identifier for the specific resource. Should be converted to a string or numeric value.
ResourceType
[ByRef] Optional. Variant. The type of resource. This can be a string or numeric value. If the is value is not supplied, then an attempt to determine the type should be made based on the Value itself.
LanguageID
[ByRef] Optional. Variant. The Locale identifier this resource belongs to. If this value is not supplied, then the current cultures LCID should be used.

Return Values

Boolean - Returns True if the encoder accepted and encoded the value, False otherwise.

Remarks

This function should not throw an exception. If the encoder cannot handle the the value for encoding, it should just return False.

See Also

Project VBCorLib Overview | Class IResourceEncoder Overview


IResourceEncoder: GetEncodedResource

GetEncodedResource

Returns the next available resource from the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is the unique identifier for the resource to be returned.
ReturnValue
[ByRef] Variant. A byte array representing the encoded resource value.

Return Values

Boolean - Returns True if a resource has been returned, False otherwise.

Remarks

This function should not throw an exception. If there are not more resources to be returned, then False should just be returned.

See Also

Project VBCorLib Overview | Class IResourceEncoder Overview


IResourceEncoder: Reset

Reset

Requests that the encoder release all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class IResourceEncoder Overview


IResourceReader

IResourceReader

Provides a standard interface for resource readers

Remarks

Implement this interface to allow multiple resource reader types to be shared to read different resources.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CloseReader | Closes the resource reader.
GetEnumerator | Returns an enumerator used to enumerate a resource.


IResourceReader: CloseReader

CloseReader

Closes the resource reader.

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class IResourceReader Overview


IResourceReader: GetEnumerator

GetEnumerator

Returns an enumerator used to enumerate a resource.

 Public Function GetEnumerator ( ) As IDictionaryEnumerator

Return Values

IDictionaryEnumerator - A resource enumerator.

Remarks

See Also

Project VBCorLib Overview | Class IResourceReader Overview


IResourceWriter

IResourceWriter

Provides an interface for resource writers.

Remarks

Implement this interface to allow multiple resource writer types to be shared for different resources.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
AddResource | Adds a new resource to the collection of resources to be written.
CloseWriter | Closes the resource writer.
Generate | Creates the resource collection from the set of resources added to the writer.


IResourceWriter: AddResource

AddResource

Adds a new resource to the collection of resources to be written.

 Public Sub AddResource(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant )

Parameters

Value
[ByRef] Variant. The value of the resource.
ResourceName
[ByRef] Variant. The identifier of the resource value.
ResourceType
[ByRef] Optional. Variant. A number or name of the resource type.
LanguageID
[ByRef] Optional. Variant. A CultureInfo, Culture Name, or LCID.

Remarks

See Also

Project VBCorLib Overview | Class IResourceWriter Overview


IResourceWriter: CloseWriter

CloseWriter

Closes the resource writer.

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class IResourceWriter Overview


IResourceWriter: Generate

Generate

Creates the resource collection from the set of resources added to the writer.

 Public Sub Generate ( )

Remarks

See Also

Project VBCorLib Overview | Class IResourceWriter Overview


JapaneseCalendar

JapaneseCalendar

Provides functions for manipulate Japanese dates.

See Also

Project VBCorLib Overview Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


JapaneseCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class JapaneseCalendar Overview


JapaneseCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class JapaneseCalendar Overview


JapaneseCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class JapaneseCalendar Overview


JapaneseCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class JapaneseCalendar Overview


JapaneseCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class JapaneseCalendar Overview


JulianCalendar

JulianCalendar

Provides methods to manipulate Julian dates.

See Also

Project VBCorLib Overview JulianCalendarStatic | Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


JulianCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class JulianCalendar Overview


JulianCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class JulianCalendar Overview


JulianCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class JulianCalendar Overview


JulianCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class JulianCalendar Overview


JulianCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class JulianCalendar Overview


JulianCalendarStatic

JulianCalendarStatic

Provides static methods for the JulianCalendar class.

See Also

Project VBCorLib Overview JulianCalendar

Public:

Properties:

Name | Description
JulianEra (get) | Returns the current era of the Julian calendar.


JulianCalendarStatic: JulianEra (get)

JulianEra

Returns the current era of the Julian calendar.

 Public Property Get JulianEra ( ) As Long

Return Values

Long - Returns a constant of 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class JulianCalendarStatic Overview


KeyedHashAlgorithm

KeyedHashAlgorithm

Provides a common interface to be implementated by all keyed hash implentations.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the hash algorithm implementation can be reused once a hash has been computed.
CanTransformMultipleBlocks (get) | Returns if the hash algorithm implementation can processd multiple blocks of data at a time.
Hash (get) | Returns the computed hash after all data has been processed.
HashSize (get) | Returns the size of the hash value in bits.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the algorithm.
Key (let) | Sets the key to be used by the algorithm.
OutputBlockSize (get) | Returns the size of the output block.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Equals | Returns if the Value is equal to this object instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Initialize | Resets a hashing object to begin hashing a new value.
ToString | Returns a string representation of this object instance.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


KeyedHashAlgorithm: CanReuseTransform (get)

CanReuseTransform

Returns if the hash algorithm implementation can be reused once a hash has been computed.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - True if the implementation can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if the hash algorithm implementation can processd multiple blocks of data at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - True if multiple blocks of data can be processed at a time, False otherwise.

Remarks

The size of 1 block of data is defined by the InputBlockSize property.

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Equals

Equals

Returns if the Value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this object instance.

Return Values

Boolean - True if they are considered equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Hash (get)

Hash

Returns the computed hash after all data has been processed.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A byte array containing the computed hash.

Remarks

The size of the array will vary depending on the hash algorithm being performed.

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: HashSize (get)

HashSize

Returns the size of the hash value in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - The size of the hash value in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Initialize

Initialize

Resets a hashing object to begin hashing a new value.

 Public Sub Initialize ( )

Remarks

If Clear has been called, then the object cannot be re-initialized.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes a single input block is.

Remarks

When calling the TransformBlock method, the InputCount must equal this value. If the hashs CanTransformMultipleBlocks returns True, then the InputCount can be larger than the InputBlockSize, but must be an even multiple of InputBlockSize.

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Key (get)

Key

Returns the key being used by the algorithm.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: Key (let)

Key

Sets the key to be used by the algorithm.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The key to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: OutputBlockSize (get)

OutputBlockSize

Returns the size of the output block.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the output block.

Remarks

When calling the TransformBlock method, the return value will be 0 or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeyedHashAlgorithm: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implemntation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class KeyedHashAlgorithm Overview


KeySizes

KeySizes

Represents a set of key sizes.

Remarks

All of the key sizes are represented by indicating a minimum key size and a maximum key size, then using a step to fill in key sizes between the two.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
MaxSize (get) | The maximum key size in bits.
MinSize (get) | The mininum key size in bits.
SkipSize (get) | The step size between keys in bits.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


KeySizes: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: MaxSize (get)

MaxSize

The maximum key size in bits.

 Public Property Get MaxSize ( ) As Long

Return Values

Long - The maximum key size in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: MinSize (get)

MinSize

The mininum key size in bits.

 Public Property Get MinSize ( ) As Long

Return Values

Long - The mininum key size in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: SkipSize (get)

SkipSize

The step size between keys in bits.

 Public Property Get SkipSize ( ) As Long

Return Values

Long - the step size in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KeySizes Overview


KeySizes: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class KeySizes Overview


KoreanCalendar

KoreanCalendar

Provides functions to manipulate Korean dates.

See Also

Project VBCorLib Overview KoreanStatic | Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


KoreanCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class KoreanCalendar Overview


KoreanCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class KoreanCalendar Overview


KoreanCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class KoreanCalendar Overview


KoreanCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class KoreanCalendar Overview


KoreanCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class KoreanCalendar Overview


KoreanCalendarStatic

KoreanCalendarStatic

Provides static methods for the KoreanCalendar class.

See Also

Project VBCorLib Overview KoreanCalendar

Public:

Properties:

Name | Description
KoreanEra (get) | Returns the current era of the Korean calendar.


KoreanCalendarStatic: KoreanEra (get)

KoreanEra

Returns the current era of the Korean calendar.

 Public Property Get KoreanEra ( ) As Long

Return Values

Long - Returns a constant of 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class KoreanCalendarStatic Overview


MACTripleDES

MACTripleDES

Represents a TripleDES implementation of an HMAC algorithm.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
ICryptoTransform
IObject
KeyedHashAlgorithm

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the hash algorithm implementation can be reused once a hash has been computed.
CanTransformMultipleBlocks (get) | Returns if the hash algorithm implementation can processd multiple blocks of data at a time.
Hash (get) | Returns the computed hash after all data has been processed.
HashSize (get) | Returns the size of the hash value in bits.
InputBlockSize (get) | Returns the size of the input block size allowed.
Key (get) | Returns the key being used by the hash algorithm.
Key (let) | Sets the key to be used by the hash algorithm.
OutputBlockSize (get) | Returns the size of the output block.
Padding (get) | Returns the padding being used by the algorithm.
Padding (let) | Sets the padding to be used by the hash algorithm.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Equals | Returns if the Value is equal to this object instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Initialize | Resets a hashing object to begin hashing a new value.
ToString | Returns a string representation of this object instance.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


MACTripleDES: CanReuseTransform (get)

CanReuseTransform

Returns if the hash algorithm implementation can be reused once a hash has been computed.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - True if the implementation can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if the hash algorithm implementation can processd multiple blocks of data at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - True if multiple blocks of data can be processed at a time, False otherwise.

Remarks

The size of 1 block of data is defined by the InputBlockSize property.

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Equals

Equals

Returns if the Value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this object instance.

Return Values

Boolean - True if they are considered equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Hash (get)

Hash

Returns the computed hash after all data has been processed.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A byte array containing the computed hash.

Remarks

The size of the array will vary depending on the hash algorithm being performed.

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: HashSize (get)

HashSize

Returns the size of the hash value in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - The size of the hash value in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Initialize

Initialize

Resets a hashing object to begin hashing a new value.

 Public Sub Initialize ( )

Remarks

If Clear has been called, then the object cannot be re-initialized.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes a single input block is.

Remarks

When calling the TransformBlock method, the InputCount must equal this value. If the hashs CanTransformMultipleBlocks returns True, then the InputCount can be larger than the InputBlockSize, but must be an even multiple of InputBlockSize.

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Key (get)

Key

Returns the key being used by the hash algorithm.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The key being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Key (let)

Key

Sets the key to be used by the hash algorithm.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new key to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: KeyedHashAlgorithm

KeyedHashAlgorithm

 Implements KeyedHashAlgorithm

Return Values

KeyedHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: OutputBlockSize (get)

OutputBlockSize

Returns the size of the output block.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the output block.

Remarks

When calling the TransformBlock method, the return value will be 0 or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Padding (get)

Padding

Returns the padding being used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The padding being used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: Padding (let)

Padding

Sets the padding to be used by the hash algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDES: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implemntation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class MACTripleDES Overview


MACTripleDESStatic

MACTripleDESStatic

Provides static methods associated with the MACTripleDES class.

See Also

Project VBCorLib Overview MACTripleDES

Public:

Methods:

Name | Description
Create | Returns an implementation of the MACTripleDES class.


MACTripleDESStatic: Create

Create

Returns an implementation of the MACTripleDES class.

 Public Function Create(
      Optional ByVal AlgName As String = "MACTripleDES" ) As KeyedHashAlgorithm

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to create and return.

Default: "MACTripleDES"

Return Values

KeyedHashAlgorithm - An implementation of a TripleDES MAC algorithm.

Remarks

By default the MACTripleDES implementation is returned. If a different implementation is desired, then use the standard Server.Class' naming convention.

See Also

Project VBCorLib Overview | Class MACTripleDESStatic Overview


MathExt

MathExt

Provides extended math functionality.

Remarks

The functions in this class are global. To access them simply call the functions directly as any normal function. The MathExt class does not need to be referenced.

 Debug.Print PI

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
E (get) | Represents the natural logarithmic base, specified by the constant, e.
PI (get) | Represents the ratio of the circumference of a circle to its diameter.

Methods:

Name | Description
ACos | Returns the angle from a Cosine.
ASin | Returns the angle from a Sine.
CDeg | Converts radians to degrees.
Ceiling | Returns the next highest whole integer value.
Cosh | Returns the hyperbolic cosine of the specified angle.
CRad | Converts degrees to radians.
DivRem | Divides two integers, placing the remainder in a supplied variable.
Floor | Returns the next lowest whole integer value.
IEEERemainder | Returns the remainder resulting from the division of a specified number by another specified number.
Log10 | Returns a log value in a base 10 log.
LogBase | Returns a value in the specified base.
LShift | Shifts the bits of an integer left.
Max | Returns the maximum of two values.
MaxIn | Returns the maximum value from a list of values.
Min | Returns the minimum of two values.
MinIn | Returns the minimum value in a list of values.
RShift | Shifts the bits of an integer right.
Sinh | Returns the hyberbolic sine of the specified angle.
Tanh | Returns the hyberbolic tangent of the specified angle.


MathExt: ACos

ACos

Returns the angle from a Cosine.

 Public Function ACos(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. A number representing a Cosine.

Return Values

Double - The angle in radians.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: ASin

ASin

Returns the angle from a Sine.

 Public Function ASin(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. A number representing a Sine.

Return Values

Double - The angle in radians.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: CDeg

CDeg

Converts radians to degrees.

 Public Function CDeg(
      ByVal Radians As Double ) As Double

Parameters

Radians
[ByVal] Double. An angle in radians.

Return Values

Double - An angle in degrees.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Ceiling

Ceiling

Returns the next highest whole integer value.

 Public Function Ceiling(
      ByVal Value As Double ) As Double

Parameters

Value
[ByVal] Double. The number to round to the next integer.

Return Values

Double - The next integer.

Remarks

Negative values will round towards zero. If the value is already a whole integer value then that value will be returned.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Cosh

Cosh

Returns the hyperbolic cosine of the specified angle.

 Public Function Cosh(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. An angle in radians.

Return Values

Double - The hyberbolic cosine.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: CRad

CRad

Converts degrees to radians.

 Public Function CRad(
      ByVal Degrees As Double ) As Double

Parameters

Degrees
[ByVal] Double. An angle in degrees.

Return Values

Double - An angle in radians.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: DivRem

DivRem

Divides two integers, placing the remainder in a supplied variable.

 Public Function DivRem(
      ByVal a As Long,
      ByVal b As Long,
      ByRef Remainder As Long ) As Long

Parameters

a
[ByVal] Long. The dividend.
b
[ByVal] Long. The divosor.
Remainder
[ByRef] Long. The variable to place the remainder of the division.

Return Values

Long - The quotient of the division.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: E (get)

E

Represents the natural logarithmic base, specified by the constant, e.

 Public Property Get E ( ) As Double

Return Values

Double - e (Approx 2.71828182845905)

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Floor

Floor

Returns the next lowest whole integer value.

 Public Function Floor(
      ByVal Value As Double ) As Double

Parameters

Value
[ByVal] Double. the number to be rounded downward.

Return Values

Double - The next lowest whole integer value.

Remarks

Negative values will be rounded away from zero. -2.1 will be rounded down to -3.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: IEEERemainder

IEEERemainder

Returns the remainder resulting from the division of a specified number by another specified number.

 Public Function IEEERemainder(
      ByVal x As Double,
      ByVal y As Double ) As Double

Parameters

x
[ByVal] Double. A dividend.
y
[ByVal] Double. A devisor.

Return Values

Double - The remainder of the division.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Log10

Log10

Returns a log value in a base 10 log.

 Public Function Log10(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. The number to calculate the log of.

Return Values

Double - A base 10 log value.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: LogBase

LogBase

Returns a value in the specified base.

 Public Function LogBase(
      ByVal d As Double,
      ByVal NewBase As Double ) As Double

Parameters

d
[ByVal] Double. The number to calculate the log of.
NewBase
[ByVal] Double. The base of the log value.

Return Values

Double - The log value.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: LShift

LShift

Shifts the bits of an integer left.

 Public Function LShift(
      ByVal Value As Long,
      ByVal Count As Long ) As Long

Parameters

Value
[ByVal] Long. The value to be shifted left.
Count
[ByVal] Long. The number of bits to shift.

Return Values

Long - The newly shifted value.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Max

Max

Returns the maximum of two values.

 Public Function Max(
      ByRef x As Variant,
      ByRef y As Variant ) As Variant

Parameters

x
[ByRef] Variant. Value to test as potential max value.
y
[ByRef] Variant. Value to test as potential max value.

Return Values

Variant - The max value.

Remarks

No type checking is performed to determine the maximum of two values given. A string compared to an integer is a legal pair of values to test. The only type checked is for an IComparable object. If x is an IComparable, then the object is used to test for the maximum value.

If both values are equavalent then x is returned.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: MaxIn

MaxIn

Returns the maximum value from a list of values.

 Public Function MaxIn(
      ByRef List As Variant ) As Variant

Parameters

List
[ByRef] Variant. The list of values to continue searching for the maximum.

Return Values

Variant - The maximum value found.

Remarks

The list can be an Array, Collection, or ICollection object.

No type checking is performed to determine the maximum of two values given. A string compared to an integer is a legal pair of values to test. The only type checked is for an IComparable object. If x is an IComparable, then the object is used to test for the maximum value.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Min

Min

Returns the minimum of two values.

 Public Function Min(
      ByRef x As Variant,
      ByRef y As Variant ) As Variant

Parameters

x
[ByRef] Variant. Value to test as potential min value.
y
[ByRef] Variant. Value to test as potential min value.

Return Values

Variant - The min value.

Remarks

No type checking is performed to determine the minimum of two values given. A string compared to an integer is a legal pair of values to test. The only type checked is for an IComparable object. If x is an IComparable, then the object is used to test for the minimum value.

If both values are equavalent then x is returned.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: MinIn

MinIn

Returns the minimum value in a list of values.

 Public Function MinIn(
      ByRef List As Variant ) As Variant

Parameters

List
[ByRef] Variant. A list of values to find the mininum value in.

Return Values

Variant - The mininum value found in the list.

Remarks

The list can be an Array, Collection, or ICollection object.

No type checking is performed to determine the minimum of two values given. A string compared to an integer is a legal pair of values to test. The only type checked is for an IComparable object. If x is an IComparable, then the object is used to test for the minimum value.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: PI (get)

PI

Represents the ratio of the circumference of a circle to its diameter.

 Public Property Get PI ( ) As Double

Return Values

Double - Pi (approx 3.14159265358979)

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: RShift

RShift

Shifts the bits of an integer right.

 Public Function RShift(
      ByVal Value As Long,
      ByVal Count As Long ) As Long

Parameters

Value
[ByVal] Long. The value to be shifted right.
Count
[ByVal] Long. The number of bits to shift.

Return Values

Long - The newly shifted value.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Sinh

Sinh

Returns the hyberbolic sine of the specified angle.

 Public Function Sinh(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. An angle in radians.

Return Values

Double - The hyberbolic sine.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MathExt: Tanh

Tanh

Returns the hyberbolic tangent of the specified angle.

 Public Function Tanh(
      ByVal d As Double ) As Double

Parameters

d
[ByVal] Double. An angle in radians.

Return Values

Double - The hyperbolic tangent.

Remarks

See Also

Project VBCorLib Overview | Class MathExt Overview


MD5

MD5

Represents a base interface to be implemented by all MD5 hash algorithms.

See Also

Project VBCorLib Overview MD5CryptoServiceProvider

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the hash algorithm implementation can be reused once a hash has been computed.
CanTransformMultipleBlocks (get) | Returns if the hash algorithm implementation can processd multiple blocks of data at a time.
Hash (get) | Returns the computed hash after all data has been processed.
HashSize (get) | Returns the size of the hash value in bits.
InputBlockSize (get) | Returns the size of the input block size allowed.
OutputBlockSize (get) | Returns the size of the output block.

Methods:

Name | Description
Clear | Releases any resources being held by the hash algorithm.
ComputeHash | Computes the hash on a source in its entirety.
Equals | Returns if the Value is equal to this object instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Initialize | Resets a hashing object to begin hashing a new value.
ToString | Returns a string representation of this object instance.
TransformBlock | Continues to compute the hash value for blocks of data.
TransformFinalBlock | Finalizes the hash computation by processing the last block of data.


MD5: CanReuseTransform (get)

CanReuseTransform

Returns if the hash algorithm implementation can be reused once a hash has been computed.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - True if the implementation can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if the hash algorithm implementation can processd multiple blocks of data at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - True if multiple blocks of data can be processed at a time, False otherwise.

Remarks

The size of 1 block of data is defined by the InputBlockSize property.

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: Clear

Clear

Releases any resources being held by the hash algorithm.

 Public Sub Clear ( )

Remarks

Once this is called, the object is disposed and cannot be reused.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: ComputeHash

ComputeHash

Computes the hash on a source in its entirety.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source of data compute the hash for. This can be a byte array or object implementing the Stream interface.
Index
[ByRef] Optional. Variant. The starting index in a byte array source. If the source is not a byte array, this argument is ignored.
Count
[ByRef] Optional. Variant. The number of bytes to compute the hash on. If the source is not a byte array, this argument is ignored.

Return Values

Byte() - The hash value computed from the source provided.

Remarks

If the source is a Stream based object, then the stream is read from and the hash continuously computed until the stream no longer returns data.

If data has already been processed using TransformBlock, then that data will be included in the hashing process.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: Equals

Equals

Returns if the Value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this object instance.

Return Values

Boolean - True if they are considered equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: Hash (get)

Hash

Returns the computed hash after all data has been processed.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A byte array containing the computed hash.

Remarks

The size of the array will vary depending on the hash algorithm being performed.

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: HashSize (get)

HashSize

Returns the size of the hash value in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - The size of the hash value in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: Initialize

Initialize

Resets a hashing object to begin hashing a new value.

 Public Sub Initialize ( )

Remarks

If Clear has been called, then the object cannot be re-initialized.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes a single input block is.

Remarks

When calling the TransformBlock method, the InputCount must equal this value. If the hashs CanTransformMultipleBlocks returns True, then the InputCount can be larger than the InputBlockSize, but must be an even multiple of InputBlockSize.

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: OutputBlockSize (get)

OutputBlockSize

Returns the size of the output block.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the output block.

Remarks

When calling the TransformBlock method, the return value will be 0 or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: TransformBlock

TransformBlock

Continues to compute the hash value for blocks of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The bytes to continue computing the hash from.
InputOffset
[ByVal] Long. The index into the byte array to begin computing from.
InputCount
[ByVal] Long. The number of bytes to be included in the hash computation.
OutputBuffer
[ByRef] Byte. The data after it has been processed. This will be the same as the input data, no changes are made.
OutputOffset
[ByVal] Long. The starting index in the output buffer to place the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5: TransformFinalBlock

TransformFinalBlock

Finalizes the hash computation by processing the last block of data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The bytes to finish the hash computation with.
InputOffset
[ByVal] Long. The index into the byte array to begin hash computations.
InputCount
[ByVal] Long. The number of bytes to be included in the final hash computation.

Return Values

Byte() - A copy of the portion of the InputBuffer that was processed.

Remarks

The hash value is not returned by this method. To retrieve the final hash value, call the Hash property.

The Hash property can only be called after this method is called. If the Hash property is called before this method, then an exception is thrown.

If the implementation can be reused (CanReuseTransform) then the implementation is reset to allow computing of a new hash value.

See Also

Project VBCorLib Overview | Class MD5 Overview


MD5CryptoServiceProvider

MD5CryptoServiceProvider

Provides MD5 hashing services through the CryptoAPI interface.

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
ICryptoTransform
IObject
MD5

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the input block size this transform can work on.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Processes the final data and retrieves the hash value.


MD5CryptoServiceProvider: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 16-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 16-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 128 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: InputBlockSize (get)

InputBlockSize

Returns the input block size this transform can work on.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: MD5

MD5

 Implements MD5

Return Values

MD5 -

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same plain text data as the input buffer. No transformation of the data is applied. The OutputBuffer array can be a Null array or the same array as the InputBuffer. If the InputBuffer is used as the OutputBuffer and the InputOffset equals the OutputOffset, no data is copied.

Once this method is called, the Hash property cannot be called until the TransformFinalBlock is called, finishing the hash computation.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MD5CryptoServiceProvider: TransformFinalBlock

TransformFinalBlock

Processes the final data and retrieves the hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class MD5CryptoServiceProvider Overview


MemoryMappedFile

MemoryMappedFile

Represents a simple file-to-memory mapping.

Remarks

Though this class is not part of .NET it is included to allow for easy access to mapping a file into memory.

A new MemoryMappedFile can be created using the NewMemoryMappedFile function.

     Dim map As MemoryMappedFile
     Set map = NewMemoryMappedFile("MyFile.txt")

See Also

Project VBCorLib Overview | Constructors

Implements:

IObject

Public:

Properties:

Name | Description
BaseAddress (get) | Returns the base address for the mapped view.
FileName (get) | Returns the filename of the currently mapped file.
IsOpen (get) | Returns value indicating if the mapped file is open.
IsReadOnly (get) | Returns if the mapped file is read-only.

Methods:

Name | Description
CloseFile | Closes the currently mapped file.
CreateView | Returns a Byte array view of the mapped file.
DeleteView | Unhooks a byte array view from the mapped file view.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


MemoryMappedFile: BaseAddress (get)

BaseAddress

Returns the base address for the mapped view.

 Public Property Get BaseAddress ( ) As Long

Return Values

Long - Value of the base address.

Remarks

The BaseAddress is the starting memory location that the mapped file begins. Each byte in memory corrisponds to the same byte in the file.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: CloseFile

CloseFile

Closes the currently mapped file.

 Public Sub CloseFile ( )

Remarks

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: CreateView

CreateView

Returns a Byte array view of the mapped file.

 Public Function CreateView ( ) As Byte ( )

Return Values

Byte() - A byte array pointing to the mapped file data.

Remarks

A view can be used to easily access the mapped file data using a Byte array as the primary access method to the data.

The byte array is locked to prevent using Erase or ReDim on the array, causing unknown problems.

Warning
If the MemoryMappedFile access is read-only, then do not modify the byte array. The application will crash without write-permission.

When finished with the byte array view, call DeleteView to unhook the array variable from the view.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: DeleteView

DeleteView

Unhooks a byte array view from the mapped file view.

 Public Sub DeleteView(
      ByRef View ( ) As Byte )

Parameters

View
[ByRef] Byte. A byte array view of the mapped file created from CreateView.

Remarks

This function can still be used to unhook a byte array view even if the MemoryMappedFile object has been closed.

If the byte array is not associated with this view then an exception is thrown.

If the byte array is null then nothing happens.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: FileName (get)

FileName

Returns the filename of the currently mapped file.

 Public Property Get FileName ( ) As String

Return Values

String - The currently mapped file.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: IsOpen (get)

IsOpen

Returns value indicating if the mapped file is open.

 Public Property Get IsOpen ( ) As Boolean

Return Values

Boolean - Status of the file.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: IsReadOnly (get)

IsReadOnly

Returns if the mapped file is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Returns True if the mapped file is opened in read-only mode, False otherwise.

Remarks

Use this property to determine if a Byte array returned from the CreateView method can be written to.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryMappedFile: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class MemoryMappedFile Overview


MemoryStream

MemoryStream

Provides an in-memory stream of data that can be read/written and modified using Stream methods.

Remarks

The MemoryStream uses an array of bytes to back the data in memory. When the object is first created, no array is allocated until the first time the data must be accessed. The default capacity of the array is 4096 bytes. The capacity will grow by doubling the size of the current capacity. If The capacity needs to be larger, consider setting the Capacity directly to prevent the array from having to be resized as new data is written to the stream.

If the MemoryStream is created using a supplied Byte array, then no internal array will be allocated. The MemoryStream will access the supplied Byte array as if it were created by the MemoryStream object. As the underlying array is modified, the changes can be seen by directly accessing the array. Also, by modifying the array directly, the underlying stream will reflect the new data.

CAUTION: If a Byte array is being supplied to the MemoryStream, then the array must outlive the MemoryStream object. It is the responsibility of the user to destroy the array after the stream has been destroyed. The MemoryStream object maintains a reference to the same array in memory, but does not deallocate the array when finished. While the object is alive, the array is locked to prevent it from being ReDimed or Erased. Closing the stream will release the lock and reference to the array, at which point the user has full control of the array.

The Currency datatypes used are there for consistency across all stream objects. Internally, the MemoryStream only supports 2 ^ 31 bytes. Other streams may support more.

See Also

Project VBCorLib Overview | Constructors | Stream

Implements:

IObject
Stream

Public:

Properties:

Name | Description
CanRead (get) | Determines if the current MemoryStream can be read.
CanSeek (get) | Determines if the current MemoryStream can seek positions within the stream.
CanTimeout (get) | Returns if the MemoryStream object supports timeout events.
CanWrite (get) | Determines if the current MemoryStream can be written to.
Capacity (get) | Returns the current capacity of the internal stream buffer.
Capacity (let) | Sets the current capacity for the internal stream buffer.
Length (get) | Returns the current length of the stream.
Position (get) | Returns the current position within the stream.
Position (let) | Sets the current position within the stream.
ReadTimeout (get) | Gets the timeout duration for a read operation.
ReadTimeout (let) | Sets the timeout duration for a read operation.
WriteTimeout (get) | Gets the timeout duration of a write operation.
WriteTimeout (let) | Sets the timeout duration for a write operation.

Methods:

Name | Description
BeginRead | Begins an asynchronous buffer read. For a MemoryStream, calling an asynchronous buffer read is identical to calling ReadBlock.
BeginWrite | Begins an asynchronous buffer write. For a MemoryStream, having an asynchronous buffer write is of no use.
CloseStream | Closes the MemoryStream and releases any resources allocated.
EndRead | Signifies the end of an asynchronous read from the stream.
EndWrite | Signifies the end of an asynchronous write to the stream.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | This has no purpose in a MemoryStream
GetHashCode | Returns a pseudo-unique number identifying this instance.
ReadBlock | Reads a specifiec number of bytes from the stream.
ReadByte | Reads a single byte from the stream.
SeekPosition | Changes the position within the stream.
SetLength | Sets the current length of the stream.
ToArray | Returns a byte array copy of the underlying byte stream.
ToString | Returns a string representation of this object instance.
WriteBlock | Writes an array of bytes to the underlying stream.
WriteByte | Writes a single byte to the underlying stream.
WriteTo | Writes the underlying stream to another stream.


MemoryStream: BeginRead

BeginRead

Begins an asynchronous buffer read. For a MemoryStream, calling an asynchronous buffer read is identical to calling ReadBlock.

 Public Function BeginRead(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The destination array to copy the bytes into.
Offset
[ByVal] Long. The index in Buffer to begin copying to.
Count
[ByVal] Long. The maximum number of bytes to copy.
Callback
[ByVal] Optional. AsyncCallback. A listening object to be notified that the read is finished.
State
[ByVal] Optional. Variant. User data that can be carried within the IAsyncResult object returned.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding Endread and report information about the buffer read.

Remarks

Since the stream is directly stored and accessed in memory, there is no waiting for reads to occur. The BeginRead method works identical to the Read method in terms of immediately reading stream data into the Buffer.

When defining the Count for the number of maximum bytes to be read, if the stream does not have enough bytes, the read will copy less bytes than Count.

If an exception has occurred during the read, it will not be thrown until the EndRead is executed.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: BeginWrite

BeginWrite

Begins an asynchronous buffer write. For a MemoryStream, having an asynchronous buffer write is of no use.

 Public Function BeginWrite(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The source array to copy the bytes from into the stream.
Offset
[ByVal] Long. The starting index in the source Buffer to begin copying from.
Count
[ByVal] Long. The maximum number of bytes to be copied into the stream.
Callback
[ByVal] Optional. AsyncCallback. A user supplied object to be notified of the finish of the writing.
State
[ByVal] Optional. Variant. User data that can be carried within the IAsyncResult object return.

Return Values

IAsyncResult - An IAsyncResult object used to identify the corrisponding EndBread and report information about the buffer read.

Remarks

Since the stream is directly stored and accessed in memory, there is no waiting for reads to occur. The BeginWrite method works identical to the WriteBlock method in terms of reading immediately writing stream data to the stream.

When defining the Count for the number of maximum bytes to be written, if the Buffer does not have enough bytes, an exception will be thrown in the EndWrite method.

If an exception has occurred during the read, it will not be thrown until the EndRead is executed.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: CanRead (get)

CanRead

Determines if the current MemoryStream can be read.

 Public Property Get CanRead ( ) As Boolean

Return Values

Boolean - The status of the ability to read the stream.

Remarks

If the MemoryStream is open, then it can be read. If it is closed, it cannot be read.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: CanSeek (get)

CanSeek

Determines if the current MemoryStream can seek positions within the stream.

 Public Property Get CanSeek ( ) As Boolean

Return Values

Boolean - The status of the ability to seek a position within the stream.

Remarks

If the MemoryStream is open, then it is seekable, otherwise it is not.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: CanTimeout (get)

CanTimeout

Returns if the MemoryStream object supports timeout events.

 Public Property Get CanTimeout ( ) As Boolean

Return Values

Boolean - Always returns False.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: CanWrite (get)

CanWrite

Determines if the current MemoryStream can be written to.

 Public Property Get CanWrite ( ) As Boolean

Return Values

Boolean - The status of the ability to write to the stream.

Remarks

If the stream was created from a user-supplied array, then the user will determine if the stream is allowed to be written to. Otherwise, the stream is always writable while it is open.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Capacity (get)

Capacity

Returns the current capacity of the internal stream buffer.

 Public Property Get Capacity ( ) As Long

Return Values

Long - The number of bytes the internal array contains.

Remarks

If the the capacity is reached while writing, then the capacity will be expanded, unless the underlying byte array is user-supplied. In this case, an exception will be thrown if the capacity is changed.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Capacity (let)

Capacity

Sets the current capacity for the internal stream buffer.

 Public Property Let Capacity(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of bytes to allocate for the internal array.

Remarks

The capacity cannot be set less than the current length of the stream. If the underlying byte array is user-supplied, then an exception will be thrown if the capacity is modified.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: CloseStream

CloseStream

Closes the MemoryStream and releases any resources allocated.

 Public Sub CloseStream ( )

Remarks

If a user-supplied array is being used, it will be released at this point. The user then may modify the array as normal.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: EndRead

EndRead

Signifies the end of an asynchronous read from the stream.

 Public Function EndRead(
      ByVal AsyncResult As IAsyncResult ) As Long

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult object returned from the BeginRead function.

Return Values

Long - The number of bytes read from the stream in to Buffer in the BeginRead method.

Remarks

This method is generally called anytime after BeginRead for a MemoryStream. Since the MemoryStream uses memory for the data store, there is no need to wait for the data to arrive. The BeginRead/EndRead calls are redundant and should not be used with the MemoryStream. Instead use the Read Method.

If any exceptions were caused during the reading then they will be thrown during the call to EndRead.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: EndWrite

EndWrite

Signifies the end of an asynchronous write to the stream.

 Public Sub EndWrite(
      ByVal AsyncResult As IAsyncResult )

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult returned from the BeginWrite function.

Remarks

This method is generally called anytime after BeginWrite for a MemoryStream. Since the MemoryStream uses memory for the data store, there is no need to wait for the data to be written. The BeginWrite/EndWrite calls are redundant and should not be used with the MemoryStream. Instead use the WriteBlock Method.

If any exceptions were caused during the reading then they will be thrown during the call to EndRead.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Flush

Flush

This has no purpose in a MemoryStream

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Length (get)

Length

Returns the current length of the stream.

 Public Property Get Length ( ) As Currency

Return Values

Currency - The number of bytes the current stream is.

Remarks

The length of the stream differs from the capacity in that the capacity is the amount of allocated memory used to store the stream, and the length is the number of bytes used from within the allocated memory.

Read Only.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Position (get)

Position

Returns the current position within the stream.

 Public Property Get Position ( ) As Currency

Return Values

Currency - The byte index within the stream.

Remarks

The position is the index at which the next read or write will occur. Position is alway zero based, even if a user-supplied array is not.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Position (let)

Position

Sets the current position within the stream.

 Public Property Let Position(
      ByVal RHS As Currency )

Parameters

RHS
[ByVal] Currency. The absolution position within the stream.

Remarks

The position is the index at which the next read or write will occur. Position is always zero based, even if a user-supplied array is not.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ReadBlock

ReadBlock

Reads a specifiec number of bytes from the stream.

 Public Function ReadBlock(
      ByRef Bytes ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The destination for the bytes to be read from the stream.
Offset
[ByVal] Long. The startind index in buffer to begin storing the bytes read from the stream.
Count
[ByVal] Long. The maximum number of bytes to be read from the stream.

Return Values

Long - The total number of bytes read from the stream.

Remarks

If Offset plus Count exceeds the end of Buffer then an exception will be thrown. If the current position in the stream is closer to the end than Count bytes, then only the remaining bytes will be read.

The stream must be open to read from it, otherwise an exception will be thrown.

After reading from the stream, the current position will advance the number of byte as returend.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ReadByte

ReadByte

Reads a single byte from the stream.

 Public Function ReadByte ( ) As Long

Return Values

Long - The byte value from the current position in the stream.

Remarks

The stream must be open for read from it, otherwise an exception will be thrown.

If the end of the stream is reached during a read, then a value of -1 is returned.

Each read from the stream will advance the position one byte.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ReadTimeout (get)

ReadTimeout

Gets the timeout duration for a read operation.

 Public Property Get ReadTimeout ( ) As Long

Return Values

Long - The timeout duration in milliseconds.

Remarks

This always throws an InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ReadTimeout (let)

ReadTimeout

Sets the timeout duration for a read operation.

 Public Property Let ReadTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new duration in milliseconds

Remarks

This always throws an InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: SeekPosition

SeekPosition

Changes the position within the stream.

 Public Function SeekPosition(
      ByVal Offset As Currency,
      ByVal Loc As SeekOrigin ) As Currency

Parameters

Offset
[ByVal] Currency. The number of bytes to move.
Loc
[ByVal] SeekOrigin. The starting position in the stream to move from.

Return Values

Currency - The actual position moved to.

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: SetLength

SetLength

Sets the current length of the stream.

 Public Sub SetLength(
      ByVal Value As Currency )

Parameters

Value
[ByVal] Currency. The size of the stream in bytes.

Remarks

The shortening the length of the stream will truncate the excess data. If increasing the length, then the new exposed data will be set to zero.

If a user-supplied byte array is being used, this function has limited capabilites. The size of the stream can be changed to withing the origin size of the user-supplied byte array. If a length greater than the original array size is set, then an exception is thrown.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: Stream

Stream

 Implements Stream

Return Values

Stream -

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ToArray

ToArray

Returns a byte array copy of the underlying byte stream.

 Public Function ToArray ( ) As Byte ( )

Return Values

Byte() - The byte array copy of the underlying stream.

Remarks

If the underlying stream is a user-supplied byte array, then only that portion determined by Count when the stream was created is returned, not the entire array.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: WriteBlock

WriteBlock

Writes an array of bytes to the underlying stream.

 Public Sub WriteBlock(
      ByRef Bytes ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long )

Parameters

Bytes
[ByRef] Byte. The bytes to be written to the stream.
Offset
[ByVal] Long. The startind index in Buffer to begin writing from.
Count
[ByVal] Long. The number of bytes to be written to the stream.

Remarks

If the position in the stream is closer to the end than Count bytes, then the stream will expand if possible. If the underlying stream is a user-supplied byte array, then an exception will occur if the capacity is reached.

The stream must be open to write to it, otherwise an exception will be thrown.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: WriteByte

WriteByte

Writes a single byte to the underlying stream.

 Public Sub WriteByte(
      ByVal Value As Byte )

Parameters

Value
[ByVal] Byte. The byte to be written to the stream.

Remarks

If the position to be written exceeds the current capacity, then the stream will be expanded if possible. If the underlying stream is a user-supply byte array, then the capacity cannot be modified and an exception will be thrown.

The stream must be open to write to it, otherwise an exception will be thrown.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: WriteTimeout (get)

WriteTimeout

Gets the timeout duration of a write operation.

 Public Property Get WriteTimeout ( ) As Long

Return Values

Long - The timeout duration in milliseconds.

Remarks

This always throws an InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: WriteTimeout (let)

WriteTimeout

Sets the timeout duration for a write operation.

 Public Property Let WriteTimeout(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new timeout duration in milliseconds.

Remarks

This always throws an InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class MemoryStream Overview


MemoryStream: WriteTo

WriteTo

Writes the underlying stream to another stream.

 Public Sub WriteTo(
      ByVal Stream As Stream )

Parameters

Stream
[ByVal] Stream. The stream to write the underlying stream to.

Remarks

See Also

Project VBCorLib Overview | Class MemoryStream Overview


NotSupportedException

NotSupportedException

The exception that is thrown when an invoked method is not supported.

Remarks

Generally this exception will be thrown on objects that are set to not allow certain actions to be performed at the moment. An example would be receiving a read-only object of an ArrayList and then attempting to add an item to the list.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


NotSupportedException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception will then be returned to the caller.

When an InnerException of Nothing is reached, then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview | Exception


NotSupportedException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview | Exception


NotSupportedException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NotSupportedException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class NotSupportedException Overview


NullStream

NullStream

Provides a stream with no backing. Data can be written, but nothing will be stored.

See Also

Project VBCorLib Overview Stream

Implements:

IObject
Stream


NullStream: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class NullStream Overview


NullStream: Stream

Stream

 Implements Stream

Return Values

Stream -

Remarks

See Also

Project VBCorLib Overview | Class NullStream Overview


NumberFormatInfo

NumberFormatInfo

Provides numeric formatting information.

Remarks

An instance of this class can be used to provide formatting for numeric data in places that allow for an IFormatProvider to be supplied. StringBuilder.AppendFormat is an example of when a NumberFormatInfo object can be used. Also, an instance of NumberFormatInfo can be used stand-alone to format numeric data by calling the Format method.

To format a number using NumberFormatInfo, call the Format method passing in the value to be formated.

This table is from the Microsoft Dot NET 1.1 MSDN.
Format Character | Description and Associated Properties
c, C | Currency format. CurrencyNegativePattern, CurrencyPositivePattern, CurrencySymbol, CurrencyGroupSizes, CurrencyGroupSeparator, CurrencyDecimalDigits, CurrencyDecimalSeparator.
d, D | Decimal format.
e, E | Scientific (exponential) format.
f, F | Fixed-point format.
g, G | General format.
n, N | Number format. NumberNegativePattern, NumberGroupSizes, NumberGroupSeparator, NumberDecimalDigits, NumberDecimalSeparator.
x, X | Hexadecimal format.

' This example shows how to format a value as a currency using
' the default formatting setting and a custom setting.
Private Sub Main()
    Dim f As New NumberFormatInfo

    ' Display the value using the default currency formatting.
    Console.WriteLine f.Format(123, "c")

    ' Set a custom currency format.
    f.CurrencySymbol = "$$"
    f.CurrencyDecimalDigits = 4
    f.CurrencyPositivePattern = [$ n]

    ' Display the value using the custom currency formatting.
    Console.WriteLine f.Format(123, "c")

    ' Wait for user to press enter
    Console.ReadLine
End Sub

' This code produces the following output
'
' ¤123.00
' $$ 123.0000

See Also

Project VBCorLib Overview | NumberFormatInfoStatic | IFormatProvider | ICloneable

Implements:

ICloneable
IFormatProvider
IObject

Public:

Types:

Name | Description
CurrencyNegativePatterns | Output patterns for negative currency values. The $ is the currency symbol, then - is the negative symbol and n is the number.
CurrencyPositivePatterns | Output patterns for positive currency values. The $ is the currency symbol and n is the number.
NumberNegativePatterns | Output patterns for negative numbers.
PercentNegativePatterns | Output patterns for negative percentage values. The - is the negative symbol, # is the number and the % is the percentage symbol.
PercentPositivePatterns | Output patterns for positive percentage values. The # is the number and the % is the percentage symbol.

Properties:

Name | Description
CurrencyDecimalDigits (get) | Returns the default number of digits after the decimal separator.
CurrencyDecimalDigits (let) | Sets the default number of digits to be shown after the decimal separator.
CurrencyDecimalSeparator (get) | Returns the decimal separator used in formatting numbers into currency.
CurrencyDecimalSeparator (let) | Sets the decimal separator used in formatting numbers into currency.
CurrencyGroupSeparator (get) | Returns the string to be use as a group separator.
CurrencyGroupSeparator (let) | Sets the group separator to be used when separating digits.
CurrencyGroupSizes (let) | Sets an array of longs which represent a set of group sizes before being comma separated.
CurrencyGroupsSizes (get) | Returns an array of longs which represent a comma separator group size.
CurrencyNegativePattern (get) | The numeric pattern to be used when formatting negative values.
CurrencyNegativePattern (let) | Sets the numeric pattern to be used when formatting negative values.
CurrencyPositivePattern (get) | Returns the formatting pattern to be used for positive currency values.
CurrencyPositivePattern (let) | Sets the formatting pattern to be used for positive currency values.
CurrencySymbol (get) | Returns the currency symbol.
CurrencySymbol (let) | Sets the currency symbol to be used.
IsReadOnly (get) | Returns if this instance is read-only.
NaNSymbol (get) | Returns the string representation for Not-A-Number.
NaNSymbol (let) | Sets the string representation for Not-A-Number.
NegativeInfinitySymbol (get) | Returns a string representation of negative infinty.
NegativeInfinitySymbol (let) | Sets the negative infinity representation.
NegativeSign (get) | Returns the negative symbol for negative numbers.
NegativeSign (let) | Sets the negative symbol to be used for negative numbers.
NumberDecimalDigits (get) | The default number of digits to be appended after the decimal point if one is used.
NumberDecimalDigits (let) | Sets the default number of digits to be appended after the decimal point.
NumberDecimalSeparator (get) | Returns the character used as a decimal point.
NumberDecimalSeparator (let) | Sets the character to be used as the decimal point.
NumberGroupSeparator (get) | Returns the separator character for groups of numbers.
NumberGroupSeparator (let) | Sets the separator charactor for a group of numbers.
NumberGroupSizes (get) | Returns the current group sizes array for formatted numbers.
NumberGroupSizes (let) | Sets the group sizes for formatted numbers.
NumberNegativePattern (get) | Returns the pattern to be used when formatting negative numbers.
NumberNegativePattern (let) | Sets the pattern to be used when formatting negative numbers.
PercentDecimalDigits (get) | Returns the number of digits to be displayed after the decimal point for percent formatted numbers.
PercentDecimalDigits (let) | Sets the number of digits after the decimal point for percent formatted numbers.
PercentDecimalSeparator (get) | Returns the decimal symbol for percent formatted numbers.
PercentDecimalSeparator (let) | Sets the decimal symbol for percent formatted numbers.
PercentGroupSeparator (get) | Returns the group separator for a percent formatted number.
PercentGroupSeparator (let) | Sets the group separator for a percent formatted number.
PercentGroupSizes (let) | Sets the group sizes for percent formatted numbers.
PercentGroupsSizes (get) | Returns the current group sizes array for percent formatted numbers.
PercentNegativePattern (get) | Returns the selected negative pattern used in percent number formatting.
PercentNegativePattern (let) | Sets the negative pattern to be used in formatting negative percent numbers.
PercentPositivePattern (get) | Returns the pattern to be used in formatting positive percent numbers.
PercentPositivePattern (let) | Sets the pattern to be used in formatting positive percent numbers.
PercentSymbol (get) | Returns the percent symbol used in percent formatted numbers.
PercentSymbol (let) | Set the percent symbol used in percent formatted numbers.
PerMilleSymbol (get) | Returns the permille representation.
PerMilleSymbol (let) | Sets the permille representation.
PositiveInfinitySymbol (get) | Returns a string representation of positive infinity.
PositiveInfinitySymbol (let) | Sets the positive infinity representation.
PositiveSign (get) | Returns the current positive symbol.
PositiveSign (let) | Sets the positive symbol.

Methods:

Name | Description
Clone | Returns a clone of this instance.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Format | Format a numeric value with the proper formatting applied to the value type. Bytes, Integer, and Longs are formatted as Longs. singles and Doubles are formatted individually.
GetFormat | Returns a format provider of the requested type.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


NumberFormatInfo: Clone

Clone

Returns a clone of this instance.

 Public Function Clone ( ) As NumberFormatInfo

Return Values

NumberFormatInfo - A clone of the original instance.

Remarks

The IsReadOnly is passed to the clone, aswell.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyDecimalDigits (get)

CurrencyDecimalDigits

Returns the default number of digits after the decimal separator.

 Public Property Get CurrencyDecimalDigits ( ) As Long

Return Values

Long - The default number of digits after the decimal separator.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyDecimalDigits (let)

CurrencyDecimalDigits

Sets the default number of digits to be shown after the decimal separator.

 Public Property Let CurrencyDecimalDigits(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The default number of digits to be shown after the decimal separator.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyDecimalSeparator (get)

CurrencyDecimalSeparator

Returns the decimal separator used in formatting numbers into currency.

 Public Property Get CurrencyDecimalSeparator ( ) As String

Return Values

String - The decimal separator character.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyDecimalSeparator (let)

CurrencyDecimalSeparator

Sets the decimal separator used in formatting numbers into currency.

 Public Property Let CurrencyDecimalSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The decimal separator to be used in formatting.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyGroupSeparator (get)

CurrencyGroupSeparator

Returns the string to be use as a group separator.

 Public Property Get CurrencyGroupSeparator ( ) As String

Return Values

String - The group separator string.

Remarks

Generally a comma is the group separator. However, in some parts of the world, a comma is not used.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyGroupSeparator (let)

CurrencyGroupSeparator

Sets the group separator to be used when separating digits.

 Public Property Let CurrencyGroupSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The separator to be used when separating digits.

Remarks

Generally a comma is the group separator. However, in some parts of the world, a comma is not used.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyGroupSizes (let)

CurrencyGroupSizes

Sets an array of longs which represent a set of group sizes before being comma separated.

 Public Property Let CurrencyGroupSizes(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. An array of longs that are the group sizes.

Remarks

Each element represents the number of digits that will be grouped together before a comma separator is inserted. Each element is used once to specify the group size, then the next element is used for the next group of digits, until the last group size. The last group size is used for the remainder of digits to be formatted.

If a 0 is specified for a group size, it can only be the last size in the array. A 0 as the last group size will prevent the remaining digits from being separated.

Write Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyGroupsSizes (get)

CurrencyGroupsSizes

Returns an array of longs which represent a comma separator group size.

 Public Property Get CurrencyGroupsSizes ( ) As Variant

Return Values

Variant - An array of longs.

Remarks

Each element represents the number of digits that will be grouped together before a comma separator is inserted. Each element is used once to specify the group size, then the next element is used for the next group of digits, until the last group size. The last group size is used for the remainder of digits to be formatted.

If a 0 is specified for a group size, it can only be the last size in the array. A 0 as the last group size will prevent the remaining digits from being separated.

Read Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyNegativePattern (get)

CurrencyNegativePattern

The numeric pattern to be used when formatting negative values.

 Public Property Get CurrencyNegativePattern ( ) As CurrencyNegativePatterns

Return Values

CurrencyNegativePatterns - The negative pattern used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyNegativePattern (let)

CurrencyNegativePattern

Sets the numeric pattern to be used when formatting negative values.

 Public Property Let CurrencyNegativePattern(
      ByVal RHS As CurrencyNegativePatterns )

Parameters

RHS
[ByVal] CurrencyNegativePatterns. The pattern to be used when formatting.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyNegativePatterns

CurrencyNegativePatterns

Output patterns for negative currency values. The $ is the currency symbol, then - is the negative symbol and n is the number.

 Public Enum CurrencyNegativePatterns

Values

[($n)] = 0
[-$n] = 1
[$-n] = 2
[$n-] = 3
[(n$)] = 4
[-n$] = 5
[n-$] = 6
[n$-] = 7
[-n $] = 8
[-$ n] = 9
[n $-] = 10
[$ n-] = 11
[$ -n] = 12
[n- $] = 13
[($ n)] = 14
[(n $)] = 15

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyPositivePattern (get)

CurrencyPositivePattern

Returns the formatting pattern to be used for positive currency values.

 Public Property Get CurrencyPositivePattern ( ) As CurrencyPositivePatterns

Return Values

CurrencyPositivePatterns - The formatting pattern for positive currency values.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyPositivePattern (let)

CurrencyPositivePattern

Sets the formatting pattern to be used for positive currency values.

 Public Property Let CurrencyPositivePattern(
      ByVal RHS As CurrencyPositivePatterns )

Parameters

RHS
[ByVal] CurrencyPositivePatterns. The formatting pattern to be used with positive currency values.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencyPositivePatterns

CurrencyPositivePatterns

Output patterns for positive currency values. The $ is the currency symbol and n is the number.

 Public Enum CurrencyPositivePatterns

Values

[$n] = 0
[n$] = 1
[$ n] = 2
[n $] = 3

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencySymbol (get)

CurrencySymbol

Returns the currency symbol.

 Public Property Get CurrencySymbol ( ) As String

Return Values

String - The currency symbol.

Remarks

In the US the symbol is the dollar sign $', in other parts of the world, other symbols are used.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: CurrencySymbol (let)

CurrencySymbol

Sets the currency symbol to be used.

 Public Property Let CurrencySymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The currency symbol to be used when formatting currency.

Remarks

In the US the symbol is the dollar sign $', in other parts of the world, other symbols are used.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: Format

Format

Format a numeric value with the proper formatting applied to the value type. Bytes, Integer, and Longs are formatted as Longs. singles and Doubles are formatted individually.

 Public Function Format(
      ByRef Value As Variant,
      Optional ByRef fmt As String ) As String

Parameters

Value
[ByRef] Variant. The numeric value to be formatte to the string representation.
fmt
[ByRef] Optional. String. The formatting to perform on the value.

Return Values

String - The formatted value as a string.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: GetFormat

GetFormat

Returns a format provider of the requested type.

 Public Function GetFormat(
      ByVal FormatType As String ) As Object

Parameters

FormatType
[ByVal] String. The name of the format provider.

Return Values

Object - The requested format provider, or Nothing if no format provider was found.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: IFormatProvider

IFormatProvider

 Implements IFormatProvider

Return Values

IFormatProvider -

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: IsReadOnly (get)

IsReadOnly

Returns if this instance is read-only.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Value indicating if this instance is read-only.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NaNSymbol (get)

NaNSymbol

Returns the string representation for Not-A-Number.

 Public Property Get NaNSymbol ( ) As String

Return Values

String - The string representation.

Remarks

Not-A-Number is achieved by dividing zero by zero. The default NaN symbol is "NaN".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NaNSymbol (let)

NaNSymbol

Sets the string representation for Not-A-Number.

 Public Property Let NaNSymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new string NaN representation.

Remarks

Not-A-Number is achieved by dividing zero by zero. The default NaN symbol is "NaN".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NegativeInfinitySymbol (get)

NegativeInfinitySymbol

Returns a string representation of negative infinty.

 Public Property Get NegativeInfinitySymbol ( ) As String

Return Values

String - Negative infinity string.

Remarks

Negative infinity is achieved by dividing a negative number by zero. The default is "-Infinity".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NegativeInfinitySymbol (let)

NegativeInfinitySymbol

Sets the negative infinity representation.

 Public Property Let NegativeInfinitySymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new string that represents negative infinity.

Remarks

Negative infinity is achieved by dividing a negative number by zero. The default is "-Infinity".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NegativeSign (get)

NegativeSign

Returns the negative symbol for negative numbers.

 Public Property Get NegativeSign ( ) As String

Return Values

String - The current negative symbol.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NegativeSign (let)

NegativeSign

Sets the negative symbol to be used for negative numbers.

 Public Property Let NegativeSign(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new negative symbol.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberDecimalDigits (get)

NumberDecimalDigits

The default number of digits to be appended after the decimal point if one is used.

 Public Property Get NumberDecimalDigits ( ) As Long

Return Values

Long - The number of digits to be appended after the decimal point if one is used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberDecimalDigits (let)

NumberDecimalDigits

Sets the default number of digits to be appended after the decimal point.

 Public Property Let NumberDecimalDigits(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of digits to be appended after the decimal point.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberDecimalSeparator (get)

NumberDecimalSeparator

Returns the character used as a decimal point.

 Public Property Get NumberDecimalSeparator ( ) As String

Return Values

String - The decimal point character.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberDecimalSeparator (let)

NumberDecimalSeparator

Sets the character to be used as the decimal point.

 Public Property Let NumberDecimalSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new character to be used as the decimal point.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberGroupSeparator (get)

NumberGroupSeparator

Returns the separator character for groups of numbers.

 Public Property Get NumberGroupSeparator ( ) As String

Return Values

String - The character that is used as a separator between groups of numbers. This is typically a comma.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberGroupSeparator (let)

NumberGroupSeparator

Sets the separator charactor for a group of numbers.

 Public Property Let NumberGroupSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The character to be used when separating groups of numbers. This is typically a comma.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberGroupSizes (get)

NumberGroupSizes

Returns the current group sizes array for formatted numbers.

 Public Property Get NumberGroupSizes ( ) As Variant

Return Values

Variant - An array containing grouping sizes for a formatted number.

Remarks

A group size is the number of digits that are to be grouped together before being separated by the group separator symbol. Generally the group sizes is an array of one element having a value of 3.

The sizes can be changed to different sizes, such as {3,2,1}. This particular set of group sizes would cause a number 1234567890 to be formatted as 1,2,3,4,5,67,890. Once the last group size has been reached, it is repeatedly used in grouping the remaining digits.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberGroupSizes (let)

NumberGroupSizes

Sets the group sizes for formatted numbers.

 Public Property Let NumberGroupSizes(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. A vbLong array containing the grouping sizes.

Remarks

A group size is the number of digits that are to be grouped together before being separated by the group separator symbol. Generally the group sizes is an array of one element having a value of 3.

The sizes can be changed to different sizes, such as {3,2,1}. This particular set of group sizes would cause a number 1234567890 to be formatted as 1,2,3,4,5,67,890. Once the last group size has been reached, it is repeatedly used in grouping the remaining digits.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberNegativePattern (get)

NumberNegativePattern

Returns the pattern to be used when formatting negative numbers.

 Public Property Get NumberNegativePattern ( ) As NumberNegativePatterns

Return Values

NumberNegativePatterns - The pattern to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberNegativePattern (let)

NumberNegativePattern

Sets the pattern to be used when formatting negative numbers.

 Public Property Let NumberNegativePattern(
      ByVal RHS As NumberNegativePatterns )

Parameters

RHS
[ByVal] NumberNegativePatterns. The new pattern to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: NumberNegativePatterns

NumberNegativePatterns

Output patterns for negative numbers.

 Public Enum NumberNegativePatterns

Values

[(n)] = 0
Negative value inside perenthesis. Negative symbol is not included.
[-n] = 1
Negative symbol before the value.
[- n] = 2
Negative symbol before the value, separated by a space.
[n-] = 3
Negative symbol after the value.
[n -] = 4
Negative symbol after the value, separated by a space.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentDecimalDigits (get)

PercentDecimalDigits

Returns the number of digits to be displayed after the decimal point for percent formatted numbers.

 Public Property Get PercentDecimalDigits ( ) As Long

Return Values

Long - The number of digits to display after the decimal point.

Remarks

This is used when a specifier of "p" is used with no associated digits (ie "p5").

If the number is less than the precision of the value, then the value is rounded to fit within the number of digits specified. If omitted the value is rounded to the number of digits returned by this property.

If the specified number of digits is larger than the precision of value, then the formatted value will be padded with zeros.

The default number of digits is 2.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentDecimalDigits (let)

PercentDecimalDigits

Sets the number of digits after the decimal point for percent formatted numbers.

 Public Property Let PercentDecimalDigits(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of digits to display after the decimal point.

Remarks

This is used when a specifier of "p" is used with no associated digits (ie "p5").

If the number is less than the precision of the value, then the value is rounded to fit within the number of digits specified. If omitted the value is rounded to the number of digits returned by this property.

If the specified number of digits is larger than the precision of value, then the formatted value will be padded with zeros.

The default number of digits is 2.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentDecimalSeparator (get)

PercentDecimalSeparator

Returns the decimal symbol for percent formatted numbers.

 Public Property Get PercentDecimalSeparator ( ) As String

Return Values

String - The symbol for decimal separation.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentDecimalSeparator (let)

PercentDecimalSeparator

Sets the decimal symbol for percent formatted numbers.

 Public Property Let PercentDecimalSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new decimal symbol.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentGroupSeparator (get)

PercentGroupSeparator

Returns the group separator for a percent formatted number.

 Public Property Get PercentGroupSeparator ( ) As String

Return Values

String - The group separator symbol.

Remarks

Generally a group separator is a comman ,'. However, different cultures may use different symbols.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentGroupSeparator (let)

PercentGroupSeparator

Sets the group separator for a percent formatted number.

 Public Property Let PercentGroupSeparator(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The symbol used as a group separator defined by the group sizes.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentGroupSizes (let)

PercentGroupSizes

Sets the group sizes for percent formatted numbers.

 Public Property Let PercentGroupSizes(
      ByRef RHS As Variant )

Parameters

RHS
[ByRef] Variant. A vbLong array containing the grouping sizes.

Remarks

A group size is the number of digits that are to be groupsed together before being separated by the group separator symbol. Generally the group sizes is an array of one element having a value of 3.

The sizes can be changed to different sizes, such as {3,2,1}. This particular set of group sizes would cause a number 1234567890 to be formatted as 1,2,3,4,5,67,890. Once the last group size has been reached, it is repeatedly used in grouping the remaining digits.

Write Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentGroupsSizes (get)

PercentGroupsSizes

Returns the current group sizes array for percent formatted numbers.

 Public Property Get PercentGroupsSizes ( ) As Variant

Return Values

Variant - An array containing grouping sizes for a percent formatted number.

Remarks

A group size is the number of digits that are to be grouped together before being separated by the group separator symbol. Generally the group sizes is an array of one element having a value of 3.

The sizes can be changed to different sizes, such as {3,2,1}. This particular set of group sizes would cause a number 1234567890 to be formatted as 1,2,3,4,5,67,890. Once the last group size has been reached, it is repeatedly used in grouping the remaining digits.

Read Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentNegativePattern (get)

PercentNegativePattern

Returns the selected negative pattern used in percent number formatting.

 Public Property Get PercentNegativePattern ( ) As PercentNegativePatterns

Return Values

PercentNegativePatterns - Then negative number pattern to be used in formating negative numbers.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentNegativePattern (let)

PercentNegativePattern

Sets the negative pattern to be used in formatting negative percent numbers.

 Public Property Let PercentNegativePattern(
      ByVal RHS As PercentNegativePatterns )

Parameters

RHS
[ByVal] PercentNegativePatterns. The pattern to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentNegativePatterns

PercentNegativePatterns

Output patterns for negative percentage values. The - is the negative symbol, # is the number and the % is the percentage symbol.

 Public Enum PercentNegativePatterns

Values

[-# %] = 0
[-#%] = 1
[-%#] = 2

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentPositivePattern (get)

PercentPositivePattern

Returns the pattern to be used in formatting positive percent numbers.

 Public Property Get PercentPositivePattern ( ) As PercentPositivePatterns

Return Values

PercentPositivePatterns - The pattern used in formatting positive percent numbers.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentPositivePattern (let)

PercentPositivePattern

Sets the pattern to be used in formatting positive percent numbers.

 Public Property Let PercentPositivePattern(
      ByVal RHS As PercentPositivePatterns )

Parameters

RHS
[ByVal] PercentPositivePatterns. The pattern to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentPositivePatterns

PercentPositivePatterns

Output patterns for positive percentage values. The # is the number and the % is the percentage symbol.

 Public Enum PercentPositivePatterns

Values

[# %] = 0
[#%] = 1
[%#] = 2

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentSymbol (get)

PercentSymbol

Returns the percent symbol used in percent formatted numbers.

 Public Property Get PercentSymbol ( ) As String

Return Values

String - The percent symbole, usually %'.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PercentSymbol (let)

PercentSymbol

Set the percent symbol used in percent formatted numbers.

 Public Property Let PercentSymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The symbol to be used in percent formatted numbers.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PerMilleSymbol (get)

PerMilleSymbol

Returns the permille representation.

 Public Property Get PerMilleSymbol ( ) As String

Return Values

String - Permille string representation.

Remarks

From MathWorld
The use of permille (a.k.a. parts per thousand) is a way of expressing ratios in terms of whole numbers. Given a ratio or fraction, it is converted to a permil-age by multiplying by 1000 and appending a "‰" (Unicode &H2030). For example, if an investment grows from a number P=13.00 to a number A=22.50, then A is 22.50/13.00=1.7308 times as much as P, or 1730.8‰.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PerMilleSymbol (let)

PerMilleSymbol

Sets the permille representation.

 Public Property Let PerMilleSymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new permille string representation.

Remarks

From From MathWorld
The use of permille (a.k.a. parts per thousand) is a way of expressing ratios in terms of whole numbers. Given a ratio or fraction, it is converted to a permil-age by multiplying by 1000 and appending a "‰" (Unicode &H2030). For example, if an investment grows from a number P=13.00 to a number A=22.50, then A is 22.50/13.00=1.7308 times as much as P, or 1730.8‰.

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PositiveInfinitySymbol (get)

PositiveInfinitySymbol

Returns a string representation of positive infinity.

 Public Property Get PositiveInfinitySymbol ( ) As String

Return Values

String - Positive infinity string.

Remarks

Positive infinity is achieved by dividing a positive number by zero. The default is "Infinity".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PositiveInfinitySymbol (let)

PositiveInfinitySymbol

Sets the positive infinity representation.

 Public Property Let PositiveInfinitySymbol(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new string representation of positive infinity.

Remarks

Positive infinity is achieved by dividing a positive number by zero. The default is "Infinity".

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PositiveSign (get)

PositiveSign

Returns the current positive symbol.

 Public Property Get PositiveSign ( ) As String

Return Values

String - The current positive symbol.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: PositiveSign (let)

PositiveSign

Sets the positive symbol.

 Public Property Let PositiveSign(
      ByRef RHS As String )

Parameters

RHS
[ByRef] String. The new positive symbol.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfo: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfo Overview


NumberFormatInfoStatic

NumberFormatInfoStatic

Provides methods to retrieve the various types of NumberFormatInfo objects.

Remarks

This class cannot be directly instantiated. To access these methods use the variable name directly.

 Dim info As NumberFormatInfo
 Set info = NumberFormatInfo.CurrentInfo

See Also

Project VBCorLib Overview | NumberFormatInfo

Public:

Properties:

Name | Description
CurrentInfo (get) | Returns the NumberFormatInfo object of the threads current culture.
InvariantInfo (get) | Returns the NumberFormatInfo object of the variant culture type. This is the same no matter what culture is current.

Methods:

Name | Description
GetInstance | Returns the NumberFormatInfo object from a specific provider.
ReadOnly | Returns a read-only version of the NumberFormatInfo object.


NumberFormatInfoStatic: CurrentInfo (get)

CurrentInfo

Returns the NumberFormatInfo object of the threads current culture.

 Public Property Get CurrentInfo ( ) As NumberFormatInfo

Return Values

NumberFormatInfo -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfoStatic Overview


NumberFormatInfoStatic: GetInstance

GetInstance

Returns the NumberFormatInfo object from a specific provider.

 Public Function GetInstance(
      ByVal FormatProvider As IFormatProvider ) As NumberFormatInfo

Parameters

FormatProvider
[ByVal] IFormatProvider. The provider of the NumberFormatInfo object.

Return Values

NumberFormatInfo - A NumberFormatInfo object from the provider.

Remarks

If the provider does not provide a NumberFormatInfo object, then the NumberFormatInfo object for the current culture is returned.

See Also

Project VBCorLib Overview | Class NumberFormatInfoStatic Overview


NumberFormatInfoStatic: InvariantInfo (get)

InvariantInfo

Returns the NumberFormatInfo object of the variant culture type. This is the same no matter what culture is current.

 Public Property Get InvariantInfo ( ) As NumberFormatInfo

Return Values

NumberFormatInfo -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class NumberFormatInfoStatic Overview


NumberFormatInfoStatic: ReadOnly

ReadOnly

Returns a read-only version of the NumberFormatInfo object.

 Public Function ReadOnly(
      ByVal Info As NumberFormatInfo ) As NumberFormatInfo

Parameters

Info
[ByVal] NumberFormatInfo. The NumberFormatInfo object to create a read-only version of.

Return Values

NumberFormatInfo - A read-only version of the NumberFormatInfo object.

Remarks

See Also

Project VBCorLib Overview | Class NumberFormatInfoStatic Overview


ObjectDisposedException

ObjectDisposedException

This exception is thrown when an operation is attempted on a disposed object.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
InvalidOperationException
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
ObjectName (get) | Gets the name of the object that has been disposed of, or an empty string if no object name was passed into the constructor.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


ObjectDisposedException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview | Exception


ObjectDisposedException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview | Exception


ObjectDisposedException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: InvalidOperationException

InvalidOperationException

 Implements InvalidOperationException

Return Values

InvalidOperationException -

Remarks

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: ObjectName (get)

ObjectName

Gets the name of the object that has been disposed of, or an empty string if no object name was passed into the constructor.

 Public Property Get ObjectName ( ) As String

Return Values

String - Returns a string representation of the object that has been disposed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview | Constructors


ObjectDisposedException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectDisposedException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class ObjectDisposedException Overview


ObjectStatic

ObjectStatic

Provides default implementations of the IObject interface.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Equals | Determines if the value and the object are the same instance.
GetHashCode | Returns a default hashcode for the specific value.
ToString | Returns a default string representation of an object.


ObjectStatic: Equals

Equals

Determines if the value and the object are the same instance.

 Public Function Equals(
      ByVal YourObject As Object,
      ByRef Value As Variant ) As Boolean

Parameters

YourObject
[ByVal] Object. The object to compare the value against.
Value
[ByRef] Variant. The value to compare against the object.

Return Values

Boolean - Returns True if the value and the object are the same instance, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ObjectStatic Overview


ObjectStatic: GetHashCode

GetHashCode

Returns a default hashcode for the specific value.

 Public Function GetHashCode(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The value to generate the hashcode for.

Return Values

Long - The hashcode value.

Remarks

An object should never pass itself into this function. Instead, the object should implement the default hashcode by using ObjPtr.

 Public Function GetHashCode As Long
     GetHashCode = ObjPtr(CUnk(Me))
 End Function

See Also

Project VBCorLib Overview | Class ObjectStatic Overview


ObjectStatic: ToString

ToString

Returns a default string representation of an object.

 Public Function ToString(
      ByVal YourObject As Object,
      ByVal YourApp As Object ) As String

Parameters

YourObject
[ByVal] Object. The object to derive the name from.
YourApp
[ByVal] Object. the App object from the calling function.

Return Values

String - A string representation of the object.

Remarks

See Also

Project VBCorLib Overview | Class ObjectStatic Overview


OperatingSystem

OperatingSystem

Provides information about the currently running operating system.

See Also

Project VBCorLib Overview Constructors | ICloneable

Implements:

ICloneable
IObject

Public:

Types:

Name | Description
PlatformID | The identification for the specific Windows platforms.

Properties:

Name | Description
Platform (get) | Returns the operating system type currently running on this machine.
ServicePack (get) | Returns the service pack for the current operating system.
Version (get) | Returns the version of the current operating system.

Methods:

Name | Description
Clone | Returns a clone of the OperatingSystem object.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of the current operating system.


OperatingSystem: Clone

Clone

Returns a clone of the OperatingSystem object.

 Public Function Clone ( ) As OperatingSystem

Return Values

OperatingSystem - The clone of the OperatingSystem object.

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: Platform (get)

Platform

Returns the operating system type currently running on this machine.

 Public Property Get Platform ( ) As PlatformID

Return Values

PlatformID - The current operating system running.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: PlatformID

PlatformID

The identification for the specific Windows platforms.

 Public Enum PlatformID

Values

Win32NT = 2
Identification for Windows NT4.0, 2000, XP, Server 2003, and future NT platforms.
Win32S = 0
Identification for legacy Windows systems that are 16bit, but allowed to access 32bit functionality.
Win32Windows = 1
Identification for Windows 95, 98, ME platforms.
WinCE = 3
Identification for Windows CE which runs on handheld PDAs.

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: ServicePack (get)

ServicePack

Returns the service pack for the current operating system.

 Public Property Get ServicePack ( ) As String

Return Values

String -

Remarks

An empty string is always returned on Windows 95, 98, and ME.

Read Only.

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: ToString

ToString

Returns a string representation of the current operating system.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OperatingSystem: Version (get)

Version

Returns the version of the current operating system.

 Public Property Get Version ( ) As Version

Return Values

Version - The operating system version.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class OperatingSystem Overview


OutOfMemoryException

OutOfMemoryException

This the exception thrown when a memory error occurs.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


OutOfMemoryException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview | Exception


OutOfMemoryException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview | Exception


OutOfMemoryException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OutOfMemoryException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class OutOfMemoryException Overview


OverflowException

OverflowException

This exception is thrown when a mathimatical operation causes a value outside the valid range of values for the destination object.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

ArithmeticException
Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


OverflowException: ArithmeticException

ArithmeticException

 Implements ArithmeticException

Return Values

ArithmeticException -

Remarks

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview | Exception


OverflowException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview | Exception


OverflowException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class OverflowException Overview


OverflowException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class OverflowException Overview


Path

Path

Provides functions to locate and format path information.

Remarks

All members of Path are static. To access them, use the Path.* convention.

 Dim p As String
 p = Path.Combine(App.Path, "file.txt")

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
AltDirectorySeparatorChar (get) | Returns the character code for the alternative directory separator character.
AltDirectorySeparatorString (get) | Returns the string for the alternative directory separator character.
DirectorySeparatorChar (get) | Returns the directory separator character for Windows.
DirectorySeparatorString (get) | Returns the directory separator string for Windows.
InvalidPathChars (get) | Returns an array of characters that are invalid in a Windows path string.
MaxPathLength (get) | Returns the maximum length for a path.
PathSeparator (get) | The character code used to separate strings in an environment variable.
PathSeparatorString (get) | The string used to seperate strings in an environment variable.
VolumeSeparatorChar (get) | The character code used to separate volume labels from path information.
VolumeSeparatorString (get) | Returns the string version of the volume separator.

Methods:

Name | Description
ChangeExtension | Replaces the extension of a filename with a new extension.
Combine | Combintes two paths into a single path.
GetDirectoryName | Returns the directory portion of a file path.
GetExtension | Returns the extension of a filename.
GetFileName | Returns the filename portion of the specified path.
GetFileNameWithoutExtension | Returns the filename portion of a path without the filename extension.
GetFullPath | Creates a full path to the specified filename.
GetInvalidFileNameChars | Returns an array of invalid filename characters.
GetInvalidPathChars | Returns an array of invalid path characters.
GetPathRoot | Returns the root directory of the specified path.
GetTempFileName | Returns the filename for a temporary file.
GetTempPath | Returns the path to the temporary folder for the current user.
HasExtension | Returns if a filename has an extension.
IsPathRooted | Returns an indication if the path is rooted or not.


Path: AltDirectorySeparatorChar (get)

AltDirectorySeparatorChar

Returns the character code for the alternative directory separator character.

 Public Property Get AltDirectorySeparatorChar ( ) As Integer

Return Values

Integer - The character code of the alternative directory separator (47).

Remarks

The alternate character is usually found on systems such as Unix.

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: AltDirectorySeparatorString (get)

AltDirectorySeparatorString

Returns the string for the alternative directory separator character.

 Public Property Get AltDirectorySeparatorString ( ) As String

Return Values

String - The string of the alternative directory separator "/".

Remarks

The alternate string is usually found on systems such as Unix.

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: ChangeExtension

ChangeExtension

Replaces the extension of a filename with a new extension.

 Public Function ChangeExtension(
      ByVal Path As String,
      ByVal Extension As String ) As String

Parameters

Path
[ByVal] String. The filename with an optional path.
Extension
[ByVal] String. The new extension to change the filenames to.

Return Values

String - The filename with the new extension, including a path if supplied.

Remarks

Passing in an Extension of vbNullString will remove any extension and period from the path.

See Also

Project VBCorLib Overview | Class Path Overview


Path: Combine

Combine

Combintes two paths into a single path.

 Public Function Combine(
      ByVal Path1 As String,
      ByVal Path2 As String ) As String

Parameters

Path1
[ByVal] String. The left-hand side of the two paths to be joined.
Path2
[ByVal] String. The right-hand side of the two paths to be joined.

Return Values

String - The joined paths.

Remarks

If Path1 is an empty string, then Path2 is returned as is. If Path2 is empty, but not Path1, then Path1 is returned as is.

If Path2 is rooted (starts with a volume, UNC identifier or directory separator), then Path2 is returned, regardless of Path1.

If Path1 does not end with a directory separator, one will be inserted.

This function does not verify that the paths exist.

See Also

Project VBCorLib Overview | Class Path Overview


Path: DirectorySeparatorChar (get)

DirectorySeparatorChar

Returns the directory separator character for Windows.

 Public Property Get DirectorySeparatorChar ( ) As Integer

Return Values

Integer - The directory separator character for Windows (92).

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: DirectorySeparatorString (get)

DirectorySeparatorString

Returns the directory separator string for Windows.

 Public Property Get DirectorySeparatorString ( ) As String

Return Values

String - The directory separator string for windows "\".

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetDirectoryName

GetDirectoryName

Returns the directory portion of a file path.

 Public Function GetDirectoryName(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The path to parse the directory from.

Return Values

String - The directory parsed from the path.

Remarks

The function does not verify that the directory exists.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetExtension

GetExtension

Returns the extension of a filename.

 Public Function GetExtension(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The filename to retrieve the extension of.

Return Values

String - The extension of the filename

Remarks

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetFileName

GetFileName

Returns the filename portion of the specified path.

 Public Function GetFileName(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The path to retrieve the filename from.

Return Values

String - The filetime portion of the specified path.

Remarks

This function does not verify that the file exists.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetFileNameWithoutExtension

GetFileNameWithoutExtension

Returns the filename portion of a path without the filename extension.

 Public Function GetFileNameWithoutExtension(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The path to parse the filename from.

Return Values

String - A filename without the extension present.

Remarks

This function does not verify the file exists.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetFullPath

GetFullPath

Creates a full path to the specified filename.

 Public Function GetFullPath(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The filename to prepend any path to.

Return Values

String - A fully qualified path to a filename.

Remarks

The filename is prepended with the current directory to give a full path. The file does not need to exists, nor is the existence verified.

If Path is already rooted, then Path is returned.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetInvalidFileNameChars

GetInvalidFileNameChars

Returns an array of invalid filename characters.

 Public Function GetInvalidFileNameChars ( ) As Integer ( )

Return Values

Integer() -

Remarks

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetInvalidPathChars

GetInvalidPathChars

Returns an array of invalid path characters.

 Public Function GetInvalidPathChars ( ) As Integer ( )

Return Values

Integer() -

Remarks

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetPathRoot

GetPathRoot

Returns the root directory of the specified path.

 Public Function GetPathRoot(
      ByVal Path As String ) As String

Parameters

Path
[ByVal] String. The path to retrieve the root directory from.

Return Values

String - The root directory of the specified path.

Remarks

Path is not checked if it exists. The root is derived from what information is in Path.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetTempFileName

GetTempFileName

Returns the filename for a temporary file.

 Public Function GetTempFileName ( ) As String

Return Values

String - The temporary files filename.

Remarks

This function creates a 0 byte temporary file of the returned name. The file is placed in the temporary path of the current user.

See Also

Project VBCorLib Overview | Class Path Overview


Path: GetTempPath

GetTempPath

Returns the path to the temporary folder for the current user.

 Public Function GetTempPath ( ) As String

Return Values

String - The temporary path for the current user.

Remarks

See Also

Project VBCorLib Overview | Class Path Overview


Path: HasExtension

HasExtension

Returns if a filename has an extension.

 Public Function HasExtension(
      ByVal Path As String ) As Boolean

Parameters

Path
[ByVal] String. A filename and optional path to check for an extension.

Return Values

Boolean - An indication of the filename having an extension.

Remarks

The path string is search for a .' that separates the the extension from the filename itself. If any of the directory separator characters or volume separator is encountered before a .', then the filename is considered not to have an extension.

See Also

Project VBCorLib Overview | Class Path Overview


Path: InvalidPathChars (get)

InvalidPathChars

Returns an array of characters that are invalid in a Windows path string.

 Public Property Get InvalidPathChars ( ) As Integer ( )

Return Values

Integer() - An Integer array representing the character code of the the invalid characters.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: IsPathRooted

IsPathRooted

Returns an indication if the path is rooted or not.

 Public Function IsPathRooted(
      ByVal Path As String ) As Boolean

Parameters

Path
[ByVal] String. The path to check if is rooted.

Return Values

Boolean - The indication of the path being rooted.

Remarks

A rooted path is one that starts with a volume name, UNC server name, or directory separator. Such paths as C:\MyDir\File, \\Server\Share\File, and \MyFile are rooted.

This function does not verify that the path actually exists.

See Also

Project VBCorLib Overview | Class Path Overview


Path: MaxPathLength (get)

MaxPathLength

Returns the maximum length for a path.

 Public Property Get MaxPathLength ( ) As Long

Return Values

Long - Tha maximum length allowed for a path.

Remarks

Returns 32767 on Windows NT machines, 260 for Win9x machines.

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: PathSeparator (get)

PathSeparator

The character code used to separate strings in an environment variable.

 Public Property Get PathSeparator ( ) As Integer

Return Values

Integer - The environment variable string separator character code (59).

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: PathSeparatorString (get)

PathSeparatorString

The string used to seperate strings in an environment variable.

 Public Property Get PathSeparatorString ( ) As String

Return Values

String - The environment variable string separator ";".

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: VolumeSeparatorChar (get)

VolumeSeparatorChar

The character code used to separate volume labels from path information.

 Public Property Get VolumeSeparatorChar ( ) As Integer

Return Values

Integer - The character code for the volume separator (58).

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


Path: VolumeSeparatorString (get)

VolumeSeparatorString

Returns the string version of the volume separator.

 Public Property Get VolumeSeparatorString ( ) As String

Return Values

String - The string version of the volume separator ":".

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Path Overview


PathTooLongException

PathTooLongException

An exception that is caused by a path being longer than Windows can handle.

Remarks

The maximum length for a path in Windows is 260 characters.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
IOException
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


PathTooLongException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview | Exception


PathTooLongException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview | Exception


PathTooLongException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: IOException

IOException

 Implements IOException

Return Values

IOException -

Remarks

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PathTooLongException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class PathTooLongException Overview


PlatformNotSupportedException

PlatformNotSupportedException

This exception is thrown when an operation is to be performed, but the current operating system does not support the action.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
NotSupportedException
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


PlatformNotSupportedException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview | Exception


PlatformNotSupportedException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview | Exception


PlatformNotSupportedException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: NotSupportedException

NotSupportedException

 Implements NotSupportedException

Return Values

NotSupportedException -

Remarks

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PlatformNotSupportedException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class PlatformNotSupportedException Overview


PublicFunctions

PublicFunctions

Provides some helper functions.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CharToLong | Converts an Integer to the corrisponding Long Ascii char.
CopyVariant | Provides a way to copy a variant value to another variant without the knowledge if Set needs to be used for objects.
CUnk | Returns the controlling IUnknown interface of the object.
LongToChar | Converts a Char value greater than 32768 to the corrisponding negative Integer value without overflow.
MoveVariant | Provides a way to move a variant datatype to another variant without the knowledge if Set needs to be used for objects.


PublicFunctions: CharToLong

CharToLong

Converts an Integer to the corrisponding Long Ascii char.

 Public Function CharToLong(
      ByVal Value As Integer ) As Long

Parameters

Value
[ByVal] Integer. An Integer character.

Return Values

Long - A positive representation of the character.

Remarks

See Also

Project VBCorLib Overview | Class PublicFunctions Overview


PublicFunctions: CopyVariant

CopyVariant

Provides a way to copy a variant value to another variant without the knowledge if Set needs to be used for objects.

 Public Sub CopyVariant(
      ByRef Destination As Variant,
      ByRef Source As Variant )

Parameters

Destination
[ByRef] Variant. The variant variable to receive a copy of the value.
Source
[ByRef] Variant. The variant variable to be copied.

Remarks

This works identical to the Win32 VariantCopyInd API function.

Any value in the destination variant will be released correctly before the source variants is copied into it.

See Also

Project VBCorLib Overview | Class PublicFunctions Overview


PublicFunctions: CUnk

CUnk

Returns the controlling IUnknown interface of the object.

 Public Function CUnk(
      ByVal Obj As IUnknown ) As IUnknown

Parameters

Obj
[ByVal] IUnknown. The object get the controlling interface of.

Return Values

IUnknown - The controlling IUnknown interface.

Remarks

See Also

Project VBCorLib Overview | Class PublicFunctions Overview


PublicFunctions: LongToChar

LongToChar

Converts a Char value greater than 32768 to the corrisponding negative Integer value without overflow.

 Public Function LongToChar(
      ByVal Value As Long ) As Integer

Parameters

Value
[ByVal] Long. The Long Ascii value to be converted.

Return Values

Integer - Integer version of the Long value.

Remarks

The Value can only range from -32767 to 65535, otherwise an ArgumentOutOfRangeException will be thrown.

See Also

Project VBCorLib Overview | Class PublicFunctions Overview


PublicFunctions: MoveVariant

MoveVariant

Provides a way to move a variant datatype to another variant without the knowledge if Set needs to be used for objects.

 Public Sub MoveVariant(
      ByRef Destination As Variant,
      ByRef Source As Variant )

Parameters

Destination
[ByRef] Variant. The variable to move the variant value to.
Source
[ByRef] Variant. The variable to move the variant value from.

Remarks

This function moves the contents of the source variant to the destination variant. It does not make a copy. This lowers duplication overhead when a variant value needs to be transfered to another variant.

Any value in the destination variant will be released correctly before the source variants is moved into it.

See Also

Project VBCorLib Overview | Class PublicFunctions Overview


Queue

Queue

Provides a collections that maintains a list of items in a First-in-First-Out sequence.

See Also

Project VBCorLib Overview Constructors | ICollection | IEnumerable | ICloneable

Implements:

ICloneable
ICollection
IEnumerable
IObject

Public:

Properties:

Name | Description
Count (get) | Returns the number of items in the queue.

Methods:

Name | Description
Clear | Clears the contents of the queue
Clone | Returns a clone of the queue.
Contains | Determines if the queue contains a specific value.
CopyTo | Copy the contents of the queue to an array.
Dequeue | Returns the item at the head of the queue and removes that item from the queue.
Enqueue | Adds an item to the tail of the queue, expanding the queue as necessary.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator for the queue.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Peek | Returns the next value to be removed from the queue without removing the value from the queue.
ToArray | Returns the contents of the queue in a variant array.
ToString | Returns a string representation of this object instance.
TrimToSize | Resizes the internal capacity to match the number of items in the queue.


Queue: Clear

Clear

Clears the contents of the queue

 Public Sub Clear ( )

Remarks

Even though the contents are cleared, the capacity of the queue is unchanged.

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Clone

Clone

Returns a clone of the queue.

 Public Function Clone ( ) As Queue

Return Values

Queue -

Remarks

Returns a second queue with the same contents as the original.

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Contains

Contains

Determines if the queue contains a specific value.

 Public Function Contains(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer ) As Boolean

Parameters

Value
[ByRef] Variant. The value to search for in the queue.
Comparer
[ByVal] Optional. IComparer. A user supplied comparer for custom comparisons.

Return Values

Boolean - Value indicating if the value was found.

Remarks

If more than one instance of the same value exists in the queue, this will stop once it finds the first instance.

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: CopyTo

CopyTo

Copy the contents of the queue to an array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      ByVal Index As Long )

Parameters

DstArray
[ByRef] Variant. The array to copy the contents to.
Index
[ByVal] Long. The starting index in the dstArray to copy the contents to.

Remarks

The values in the queue will be cast to the array datatype if possible.

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Count (get)

Count

Returns the number of items in the queue.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of items in the queue.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Dequeue

Dequeue

Returns the item at the head of the queue and removes that item from the queue.

 Public Function Dequeue ( ) As Variant

Return Values

Variant - The item at the head of the queue.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Enqueue

Enqueue

Adds an item to the tail of the queue, expanding the queue as necessary.

 Public Sub Enqueue(
      ByRef Value As Variant )

Parameters

Value
[ByRef] Variant. The item to be placed at the tail of the queue.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: GetEnumerator

GetEnumerator

Returns an enumerator for the queue.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - Enumerator to allow iterating over the queue.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: Peek

Peek

Returns the next value to be removed from the queue without removing the value from the queue.

 Public Function Peek ( ) As Variant

Return Values

Variant - The next value in the queue.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: ToArray

ToArray

Returns the contents of the queue in a variant array.

 Public Function ToArray ( ) As Variant ( )

Return Values

Variant() - An array of variants containing the queue contents.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


Queue: TrimToSize

TrimToSize

Resizes the internal capacity to match the number of items in the queue.

 Public Sub TrimToSize ( )

Remarks

See Also

Project VBCorLib Overview | Class Queue Overview


QueueEnumerator

QueueEnumerator

Class derived from IObject.

See Also

Project VBCorLib Overview

Implements:

ICloneable
IEnumerator
IObject


QueueEnumerator: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class QueueEnumerator Overview


QueueEnumerator: IEnumerator

IEnumerator

 Implements IEnumerator

Return Values

IEnumerator -

Remarks

See Also

Project VBCorLib Overview | Class QueueEnumerator Overview


QueueEnumerator: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class QueueEnumerator Overview


Random

Random

Provides a sequence of pseudo-random generated numbers.

See Also

Project VBCorLib Overview Constructors

Implements:

IObject

Public:

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
NextBytes | Fills an array of bytes with random numbers.
NextDouble | Returns a random number between 0.0 and 1.0.
NextLong | Returns the next generated number in the sequence.
NextRange | Returns the next generated number in the sequence within a specified range.
ToString | Returns a string representation of this object instance.


Random: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Random Overview


Random: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Random Overview


Random: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Random Overview


Random: NextBytes

NextBytes

Fills an array of bytes with random numbers.

 Public Sub NextBytes(
      ByRef Bytes ( ) As Byte )

Parameters

Bytes
[ByRef] Byte. The array to be filled.

Remarks

See Also

Project VBCorLib Overview | Class Random Overview


Random: NextDouble

NextDouble

Returns a random number between 0.0 and 1.0.

 Public Function NextDouble ( ) As Double

Return Values

Double - The random number.

Remarks

The number will be equal to or greater than 0.0 and less than 1.0. The number will never equal 1.0.

See Also

Project VBCorLib Overview | Class Random Overview


Random: NextLong

NextLong

Returns the next generated number in the sequence.

 Public Function NextLong(
      Optional ByVal MaxValue As Long = &H7FFFFFFF ) As Long

Parameters

MaxValue
[ByVal] Optional. Long. The value that the generated number must be less than.

Default: &H7FFFFFFF

Return Values

Long - The next generated number in the sequence.

Remarks

The generated number will be equal or greater than zero and less than maxValue. The number will never equal maxValue.

See Also

Project VBCorLib Overview | Class Random Overview


Random: NextRange

NextRange

Returns the next generated number in the sequence within a specified range.

 Public Function NextRange(
      ByVal MinValue As Long,
      ByVal MaxValue As Long ) As Long

Parameters

MinValue
[ByVal] Long. The lowerbound of the number to be generated.
MaxValue
[ByVal] Long. The upperbound of the number to be generated. Must be equal to or greater than minValue.

Return Values

Long - A number generated within the specified range.

Remarks

The number generated will always be equal to or greater than minValue, and less than maxValue. The number will never equal maxValue.

See Also

Project VBCorLib Overview | Class Random Overview


Random: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Random Overview


RandomNumberGenerator

RandomNumberGenerator

A common interface to be implemented by random number generators.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetBytes | Fills the array with random byte values.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
GetNonZeroBytes | Files the array with random byte values, ensuring no zeros are included.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


RandomNumberGenerator: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to be tested for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class RandomNumberGenerator Overview


RandomNumberGenerator: GetBytes

GetBytes

Fills the array with random byte values.

 Public Sub GetBytes(
      ByRef Data ( ) As Byte )

Parameters

Data
[ByRef] Byte. The array to fill with random data.

Remarks

See Also

Project VBCorLib Overview | Class RandomNumberGenerator Overview


RandomNumberGenerator: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class RandomNumberGenerator Overview


RandomNumberGenerator: GetNonZeroBytes

GetNonZeroBytes

Files the array with random byte values, ensuring no zeros are included.

 Public Sub GetNonZeroBytes(
      ByRef Data ( ) As Byte )

Parameters

Data
[ByRef] Byte. The array to fill with random data.

Remarks

See Also

Project VBCorLib Overview | Class RandomNumberGenerator Overview


RandomNumberGenerator: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class RandomNumberGenerator Overview


RandomNumberGeneratorStatic

RandomNumberGeneratorStatic

Provides static methods associated with the RandomNumberGenerator class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates a new random number generator based on the name.


RandomNumberGeneratorStatic: Create

Create

Creates a new random number generator based on the name.

 Public Function Create(
      Optional ByVal RngName As String ) As RandomNumberGenerator

Parameters

RngName
[ByVal] Optional. String. The name of the implementation to create.

Return Values

RandomNumberGenerator - A new RandomNumberGenerator implementation.

Remarks

If the name is empty then RNGCryptoServiceProvider is returned.

See Also

Project VBCorLib Overview | Class RandomNumberGeneratorStatic Overview


RankException

RankException

The exception that is thrown when an array with the wrong number of dimensions is passed to a method.

See Also

Project VBCorLib Overview Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


RankException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview | Exception


RankException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview | Exception


RankException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class RankException Overview


RankException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class RankException Overview


RC2

RC2

Represents a standard interface implemented by all RC2 crypto service providers.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by the cryptographic operation.
BlockSize (let) | Sets the block size, in bits, used by the cryptographic operation.
EffectiveKeySize (get) | Returns the effective key size.
EffectiveKeySize (let) | Sets the effective key size.
FeedbackSize (get) | Returns the feedback size, in bits, used by the cryptographic operation.
FeedbackSize (let) | Sets the feedback size, in bits, used by the cryptographic operation.
IV (get) | Returns the Initialization Vector used by the cryptographic operation.
IV (let) | Sets the Initialization Vector used by the cryptographic operation.
Key (get) | Returns the secret key used by the cryptographic operation.
Key (let) | Sets the secret key to be used by the cryptographic operation.
KeySize (get) | Returns the size of the key, in bits, used by the cryptographic operation.
KeySize (let) | Sets the size of the key, in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the mode the current algoritm is set to.
Mode (let) | Sets the mode the current algorithm is set to.
Padding (get) | Returns the padding to be used by the algorithm.
Padding (let) | Sets the padding to be used by the algorithm.

Methods:

Name | Description
Clear | Releases all resources.
CreateDecryptor | Creates a new decryptor using the RC2 algorithm.
CreateEncryptor | Creates a new encryptor using the RC2 algorithm.
Equals | Returns if this instance and the value are equal.
GenerateIV | Generates a new Initialization Vector array.
GenerateKey | Generates a new Key based on the key size.
GetHashCode | Returns a semi-unique value that represents this instance.
ToString | Returns a string representation of this instance.
ValidKeySize | Checks if the specific number of bits is a valid key size.


RC2: BlockSize (get)

BlockSize

Returns the block size, in bits, used by the cryptographic operation.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: BlockSize (let)

BlockSize

Sets the block size, in bits, used by the cryptographic operation.

 Public Property Let BlockSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

An invalid block size will cause a CryptographicException.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Clear

Clear

Releases all resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: CreateDecryptor

CreateDecryptor

Creates a new decryptor using the RC2 algorithm.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to decrypt the ciphered text back into plain text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to decrypt ciphered text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: CreateEncryptor

CreateEncryptor

Creates a new encryptor using the RC2 algorithm.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to encrypt the plain text into ciphered text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to encrypt plain text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: EffectiveKeySize (get)

EffectiveKeySize

Returns the effective key size.

 Public Property Get EffectiveKeySize ( ) As Long

Return Values

Long - The effective key size.

Remarks

The effective key size is the number of bits to actually be used from the key itself. This applies to Windows 2000.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: EffectiveKeySize (let)

EffectiveKeySize

Sets the effective key size.

 Public Property Let EffectiveKeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The effective key size.

Remarks

The effective key size is the number of bits to actually be used from the key itself. This applies to Windows 2000.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Equals

Equals

Returns if this instance and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare for equality.

Return Values

Boolean - Returns if the value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: FeedbackSize (get)

FeedbackSize

Returns the feedback size, in bits, used by the cryptographic operation.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - Returns the feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: FeedbackSize (let)

FeedbackSize

Sets the feedback size, in bits, used by the cryptographic operation.

 Public Property Let FeedbackSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: GenerateIV

GenerateIV

Generates a new Initialization Vector array.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: GenerateKey

GenerateKey

Generates a new Key based on the key size.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: GetHashCode

GetHashCode

Returns a semi-unique value that represents this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns the semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: IV (get)

IV

Returns the Initialization Vector used by the cryptographic operation.

 Public Property Get IV ( ) As Byte ( ) :

Return Values

Byte() - Returns an array of bytes representing an Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same aswell. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: IV (let)

IV

Sets the Initialization Vector used by the cryptographic operation.

 Public Property Let IV(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same aswell. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

This must be set to an array the same size as the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Key (get)

Key

Returns the secret key used by the cryptographic operation.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - Returns the secret key.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

If a key has not been set, then a new key will be generated automatically.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Key (let)

Key

Sets the secret key to be used by the cryptographic operation.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new secret key to be used.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: KeySize (get)

KeySize

Returns the size of the key, in bits, used by the cryptographic operation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The size of the key in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: KeySize (let)

KeySize

Sets the size of the key, in bits.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the key in bits.

Remarks

This will cause the Key property to reset and regenerate when needed.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal block sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal key sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Mode (get)

Mode

Returns the mode the current algoritm is set to.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - Returns a CipherMode value.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Mode (let)

Mode

Sets the mode the current algorithm is set to.

 Public Property Let Mode(
      ByVal RHS As CipherMode ) :

Parameters

RHS
[ByVal] CipherMode. The new mode for the algorithm.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Padding (get)

Padding

Returns the padding to be used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - A current padding being used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: Padding (let)

Padding

Sets the padding to be used by the algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode ) :

Parameters

RHS
[ByVal] PaddingMode. The new padding value to be used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that represents this instance.

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2: ValidKeySize

ValidKeySize

Checks if the specific number of bits is a valid key size.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. A value to determine if is a legal key size.

Return Values

Boolean - Returns True if the bit length is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class RC2 Overview


RC2CryptoServiceProvider

RC2CryptoServiceProvider

Provides cryptography services using the RC2 symmetric algorithm.

Remarks

This class uses the Windows CryptoAPI services.

This example shows a very simple method of encrypting then decrypting a String value.

Private Sub Main()
    ' Create a new RC2CryptoServiceProvider key.
    Dim Key As New RC2CryptoServiceProvider

    ' Encrypt a string to a byte array.
    Dim Buffer() As Byte
    Buffer = Encrypt("This is some plaintext!", Key)

    ' Decrypt the byte array back to a string.
    Dim PlainText As String
    PlainText = Decrypt(Buffer, Key)

    ' Display the plaintext value to the console.
    Console.WriteLine PlainText
    Console.ReadKey
End Sub Main

' Encrypt the string.
Private Function Encrypt(ByVal PlainText As String, ByVal Key As SymmetricAlgorithm) As Byte()
    Dim Buffer() As Byte
    Buffer = StrConv(PlainText, vbFromUnicode)

    Dim Encryptor As ICryptoTransform
    Set Encryptor = Key.CreateEncryptor
    Encrypt = Encryptor.TransformFinalBlock(Buffer, 0, cArray.GetLength(Buffer))
End Function

' Decrypt the byte array.
Public Function Decrypt(ByRef CypherText() As Byte, ByVal Key As SymmetricAlgorithm) As String
    Dim Decryptor As ICryptoTransform
    Set Decryptor = Key.CreateDecryptor

    Dim Buffer() As Byte
    Buffer = Decryptor.TransformFinalBlock(CypherText, 0, cArray.GetLength(CypherText))
    Decrypt = StrConv(Buffer, vbUnicode)
End Function

See Also

Project VBCorLib Overview | RC2

Implements:

IObject
RC2
SymmetricAlgorithm

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by this algorithm.
BlockSize (let) | Sets the block size, in bits, used by this algorithm.
EffectiveKeySize (get) | Returns the effective key size to be used.
EffectiveKeySize (let) | Sets the effective key size to be used.
FeedbackSize (get) | Returns the Feedback Size in bits.
FeedbackSize (let) | Sets the Feedback size in bits.
IV (get) | Returns the Initialization Vector.
IV (let) | Sets the Initialization Vector to be used.
Key (get) | Returns the current secret key.
Key (let) | Sets the secret key.
KeySize (get) | Returns the key size in bits.
KeySize (let) | Sets the key size in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of valid key sizes supported by this algorithm.
Mode (get) | Returns the Cipher mode this algorithm will use.
Mode (let) | Sets the Cipher mode this algorithm will use.
Padding (get) | Returns the padding mode being used.
Padding (let) | Sets the padding mode to be used.
UseSalt (get) | Returns if a salt value is to be used with the key generation.
UseSalt (let) | Sets if a salt value will be used with the key generation.

Methods:

Name | Description
Clear | Clears the Key and IV arrays.
CreateDecryptor | Returns a new cipher used to decrypt data.
CreateEncryptor | Returns a new cipher used to encrypt data.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GenerateIV | Generates a random IV array to use.
GenerateKey | Generates a random key to be used.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
ValidKeySize | Tests if a specific bit length is valid for a key.


RC2CryptoServiceProvider: BlockSize (get)

BlockSize

Returns the block size, in bits, used by this algorithm.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

This will always return 64 bits (8 bytes).

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: BlockSize (let)

BlockSize

Sets the block size, in bits, used by this algorithm.

 Public Property Let BlockSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new block size in bits.

Remarks

The only valid block size is 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Clear

Clear

Clears the Key and IV arrays.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: CreateDecryptor

CreateDecryptor

Returns a new cipher used to decrypt data.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to dencrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: CreateEncryptor

CreateEncryptor

Returns a new cipher used to encrypt data.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to encrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: EffectiveKeySize (get)

EffectiveKeySize

Returns the effective key size to be used.

 Public Property Get EffectiveKeySize ( ) As Long

Return Values

Long - The effective key size.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: EffectiveKeySize (let)

EffectiveKeySize

Sets the effective key size to be used.

 Public Property Let EffectiveKeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new effective key size.

Remarks

This property can only be set to the same value as KeySize. This property is useless in setting the effective key size. It is here to complete the .NET interface for this class.

The effective key size to use will ultimately be determined by the length of the actual key being used.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: FeedbackSize (get)

FeedbackSize

Returns the Feedback Size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The Feedback size in bits.

Remarks

Always returns 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: FeedbackSize (let)

FeedbackSize

Sets the Feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new feedback size in bits.

Remarks

Only 64 bits is valid.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: GenerateIV

GenerateIV

Generates a random IV array to use.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: GenerateKey

GenerateKey

Generates a random key to be used.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: IV (get)

IV

Returns the Initialization Vector.

 Public Property Get IV ( ) As Byte ( )

Return Values

Byte() - The Initialization Vector.

Remarks

If no IV has been set, then a new random IV will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: IV (let)

IV

Sets the Initialization Vector to be used.

 Public Property Let IV(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new IV to use.

Remarks

The array must be 8 bytes in length.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Key (get)

Key

Returns the current secret key.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The secret key.

Remarks

If no key has been set, then a new random key will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Key (let)

Key

Sets the secret key.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new secret key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: KeySize (get)

KeySize

Returns the key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: KeySize (let)

KeySize

Sets the key size in bits.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

Key sizes of 128 or 192 are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of legal block sizes.

Remarks

Only one block size is legal, 64 bits.

Read Only.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: LegalKeySizes (get)

LegalKeySizes

Returns a list of valid key sizes supported by this algorithm.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of valid key sizes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Mode (get)

Mode

Returns the Cipher mode this algorithm will use.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - The Cipher mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Mode (let)

Mode

Sets the Cipher mode this algorithm will use.

 Public Property Let Mode(
      ByVal RHS As CipherMode )

Parameters

RHS
[ByVal] CipherMode. The cipher mode to use.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Padding (get)

Padding

Returns the padding mode being used.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The current padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: Padding (let)

Padding

Sets the padding mode to be used.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: RC2

RC2

 Implements RC2

Return Values

RC2 -

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: SymmetricAlgorithm

SymmetricAlgorithm

 Implements SymmetricAlgorithm

Return Values

SymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: UseSalt (get)

UseSalt

Returns if a salt value is to be used with the key generation.

 Public Property Get UseSalt ( ) As Boolean

Return Values

Boolean - Returns if the a salt value will be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: UseSalt (let)

UseSalt

Sets if a salt value will be used with the key generation.

 Public Property Let UseSalt(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Whether a salt value will be used with the key generation.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2CryptoServiceProvider: ValidKeySize

ValidKeySize

Tests if a specific bit length is valid for a key.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. The number of bits to test for.

Return Values

Boolean - Return True if the number of bits is supported, False otherwise.

Remarks

Valid sizes are from 40 bits to 128 bits in steps of 8 bits.

See Also

Project VBCorLib Overview | Class RC2CryptoServiceProvider Overview


RC2Static

RC2Static

Provides static methods associated with the RC2 algorithm.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates an RC2 crypto service provider based on the name.


RC2Static: Create

Create

Creates an RC2 crypto service provider based on the name.

 Public Function Create(
      Optional ByVal AlgName As String = "RC2" ) As RC2

Parameters

AlgName
[ByVal] Optional. String. The name of the algorithm implementation.

Default: "RC2"

Return Values

RC2 -

Remarks

The names "RC2" and "RC2CryptoServiceProvider" will return the default RC2CryptoServiceProvider.

See Also

Project VBCorLib Overview | Class RC2Static Overview


Registry

Registry

Supplies the base Registrykeys that access values and subkeys in the registry.

Remarks

These are the base sets of root registry keys used to access different classes of registry keys.

To access these methods, use the Registry.* syntax:

     Dim rk As RegistryKey
     Set rk = Registry.ClassesRoot

See Also

Project VBCorLib Overview | RegistryKey | RegistryKeyStatic

Public:

Properties:

Name | Description
ClassesRoot (get) | Returns a RegistryKey object that is then used to access registry keys and values for class types and their properties. The root section of the Registry accessed is HKEY_CLASSES_ROOT.
CurrentConfig (get) | Returns a RegistryKey object that is then used to access registry keys and values for the current configuration of hardware. This is not user specific data. The root section of the Registry accessed is HKEY_CURRENT_CONFIG.
CurrentUser (get) | Returns a RegistryKey object that is then used to access registry keys and values for information and preferences of the current user. The root section of the Registry accessed is HKEY_CURRENT_USER.
DynData (get) | Contains dynamic registry data. This field reads the Windows registry base key HKEY_DYN_DATA.
LocalMachine (get) | Returns a RegistryKey object that can be used to access information and preferences about the local user machine. The root section of the Registry accessed is HKEY_LOCAL_MACHINE.
MaxValueLength (get) |
MaxValueNameLength (get) |
PerformanceData (get) | Contains performance information for software components. This field reads the Windows registry base key HKEY_PERFORMANCE_DATA.
Users (get) | Contains information about the default user configuration. This field reads the Windows registry base key HKEY_USERS.

Methods:

Name | Description
GetRootKey | Returns a root RegistryKey for the key defined in the key name.
GetSubKey | Returns a RegistryKey to the full path of the key name.
GetValue | Returns a value from the registry key.
SetValue | Sets a value to a registry key, creating it if it does not exist.


Registry: ClassesRoot (get)

ClassesRoot

Returns a RegistryKey object that is then used to access registry keys and values for class types and their properties. The root section of the Registry accessed is HKEY_CLASSES_ROOT.

 Public Property Get ClassesRoot ( ) As RegistryKey

Return Values

RegistryKey - Returns a Registrykey that is used to access the Class Root keys.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: CurrentConfig (get)

CurrentConfig

Returns a RegistryKey object that is then used to access registry keys and values for the current configuration of hardware. This is not user specific data. The root section of the Registry accessed is HKEY_CURRENT_CONFIG.

 Public Property Get CurrentConfig ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: CurrentUser (get)

CurrentUser

Returns a RegistryKey object that is then used to access registry keys and values for information and preferences of the current user. The root section of the Registry accessed is HKEY_CURRENT_USER.

 Public Property Get CurrentUser ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: DynData (get)

DynData

Contains dynamic registry data. This field reads the Windows registry base key HKEY_DYN_DATA.

 Public Property Get DynData ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

This root class is only available of Windows 95/98/ME. An exception is thrown for other windows platforms.

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: GetRootKey

GetRootKey

Returns a root RegistryKey for the key defined in the key name.

 Public Function GetRootKey(
      ByVal KeyName As String ) As RegistryKey

Parameters

KeyName
[ByVal] String. The keyname path, including the root name at the beginning.

Return Values

RegistryKey - The root RegistryKey.

Remarks

The KeyName can contain subkeys. The root key name will be parsed out.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: GetSubKey

GetSubKey

Returns a RegistryKey to the full path of the key name.

 Public Function GetSubKey(
      ByVal KeyName As String,
      Optional ByVal AutoCreate As Boolean = False,
      Optional ByVal Writable As Boolean = False ) As RegistryKey

Parameters

KeyName
[ByVal] String. The full registry key path, including the root name.
AutoCreate
[ByVal] Optional. Boolean. Flag to indicate if the full path should be created if it does not exist.

Default: False

Writable
[ByVal] Optional. Boolean. Flag to indicate if an existing path is writable.

Default: False

Return Values

RegistryKey - A RegistryKey to the full path of the key name, or Nothing if the path does not exist.

Remarks

If AutoCreate is true, then Writable is ignored.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: GetValue

GetValue

Returns a value from the registry key.

 Public Function GetValue(
      ByVal KeyName As String,
      ByVal ValueName As String,
      Optional ByRef DefaultValue As Variant ) As Variant

Parameters

KeyName
[ByVal] String. The full registry key name that contains the value.
ValueName
[ByVal] String. The name of the value in the registry key.
DefaultValue
[ByRef] Optional. Variant. The value to return if the registry value does not exist.

Return Values

Variant - A value from the registry.

Remarks

A full registry key name must include the root level key.

 v = Registry.GetValue("HKEY_CURRENT_USER\Environment\", "TEMP")

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: LocalMachine (get)

LocalMachine

Returns a RegistryKey object that can be used to access information and preferences about the local user machine. The root section of the Registry accessed is HKEY_LOCAL_MACHINE.

 Public Property Get LocalMachine ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: PerformanceData (get)

PerformanceData

Contains performance information for software components. This field reads the Windows registry base key HKEY_PERFORMANCE_DATA.

 Public Property Get PerformanceData ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: SetValue

SetValue

Sets a value to a registry key, creating it if it does not exist.

 Public Sub SetValue(
      ByVal KeyName As String,
      ByVal ValueName As String,
      ByRef Value As Variant )

Parameters

KeyName
[ByVal] String. The full registry key name to write the value to.
ValueName
[ByVal] String. The name of the value to be written in the key.
Value
[ByRef] Variant. The value to be written in the key.

Remarks

A full registry key name must include the root level key.

 Registry.SetValue "HKEY_CURRENT_USER\Environment\", "MyValue", "Hello"

See Also

Project VBCorLib Overview | Class Registry Overview


Registry: Users (get)

Users

Contains information about the default user configuration. This field reads the Windows registry base key HKEY_USERS.

 Public Property Get Users ( ) As RegistryKey

Return Values

RegistryKey -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Registry Overview


RegistryKey

RegistryKey

Represents a key level node inside the Windows Registry.

Remarks

This class allows for easy access and manipulation of keys and key values within the Windows Registry. By using a key naming convention similar to folders the keys and values can be traversed and modified.

There a set of Root nodes that separate the Registry to common areas for specific needs. The Root nodes are the starting place for any keys in the registry. A key name could look like HKEY_LOCAL_MACHINE\Software'.

 Iterate the values found in a registry key.

 Private Sub Main()
     Dim rk As RegistryKey
     Dim names() As String
     Dim i As Long

     ' Open a registry subkey for enumeration.
     Set rk = Registry.LocalMachine.OpenSubKey("software\microsoft\windows\currentversion\run")

     ' Retrieve all names for the values in the key.
     names = rk.GetValueNames

     ' enumerate the names and get the value for each,
     ' displaying the pair as [name] = [value].
     For i = 0 To UBound(names)
         Console.WriteLine "{0} = {1}", names(i), rk.GetValue(names(i))
     Next i

     ' Close the registry key.
     rk.CloseKey

     ' Wait for user to hit return.
     Console.ReadLine
 End Sub

 'This code produces the following output.
 'The list will vary from machine to machine.

 'CplBCL50 = C:\Program Files\EzButton\CplBCL50.EXE
 'ccApp = "C:\Program Files\Common Files\Symantec Shared\ccApp.exe"
 'Symantec NetDriver Monitor = C:\PROGRA~1\SYMNET~1\SNDMon.exe

See Also

Project VBCorLib Overview | Registry | RegistryKeyStatic

Implements:

IEnumerable
IObject

Public:

Types:

Name | Description
RegistryValueKind | The value types that can be set and retrieved from the Registry.
RegistryValueOptions |

Properties:

Name | Description
Name (get) | Returns the name of the key.
SubKeyCount (get) | Returns the number of SubKeys within the current key.
ValueCount (get) | Returns the number of values within the current key.

Methods:

Name | Description
CloseKey | Closes the RegistryKey object.
CreateSubKey | Creates a new Windows Registry node.
DeleteSubKey | Deletes a node from the Windows Registry.
DeleteSubKeyTree | Deletes all SubKeys within the specified SubKey to delete.
DeleteValue | Deletes the value from the registry.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Flushes any changes to the Windows Registry back to disk.
GetEnumerator | Returns an enumerator to enumerate the name/value pairs.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetLastWriteTime | Returns the last time the subkey was written to.
GetSubKeyNames | Returns a list of SubKey names within the current SubKey.
GetValue | Returns the value of a key within a SubKey.
GetValueKind | Returns the type of value stored in the registry.
GetValueNames | Returns a list of value names within the current SubKey.
OpenSubKey | Returns a RegistryKey of the requested SubKey with the write permission specified.
SetValue | Sets the value of a key value within the SubKey.
ToString | Returns a string representation of this object instance.


RegistryKey: CloseKey

CloseKey

Closes the RegistryKey object.

 Public Sub CloseKey ( )

Remarks

When the key is closed, then it can no longer be manipulated using the RegistryKey

If the RegistryKey is a system root key, then it will not be closed.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: CreateSubKey

CreateSubKey

Creates a new Windows Registry node.

 Public Function CreateSubKey(
      ByVal SubKey As String ) As RegistryKey

Parameters

SubKey
[ByVal] String. The name of the new node to be created. Any slashes will be trimmed from the ends.

Return Values

RegistryKey - A RegistryKey to manipulate the new Registry node.

Remarks

If the Registry node already exists, then it is returned.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: DeleteSubKey

DeleteSubKey

Deletes a node from the Windows Registry.

 Public Sub DeleteSubKey(
      ByVal SubKey As String,
      Optional ByVal ThrowOnMissingSubKey As Boolean = True )

Parameters

SubKey
[ByVal] String. The node to be deleted.
ThrowOnMissingSubKey
[ByVal] Optional. Boolean. Whether to throw an exception if the node was not found.

Default: True

Remarks

The key node must be empty to be deleted. No sub keys or values are deleted. To delete all SubKeys use the DeleteSubKeyTree to recursively delete SubKeys and values.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: DeleteSubKeyTree

DeleteSubKeyTree

Deletes all SubKeys within the specified SubKey to delete.

 Public Sub DeleteSubKeyTree(
      ByVal SubKey As String )

Parameters

SubKey
[ByVal] String. The Registry node to be deleted.

Remarks

All subkeys and values are deleted recursively. Caution should be used.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: DeleteValue

DeleteValue

Deletes the value from the registry.

 Public Sub DeleteValue(
      ByVal Name As String,
      Optional ByVal ThrowOnMissingValue As Boolean = True )

Parameters

Name
[ByVal] String. The name of the value to be deleted, or an empty string to delete the default value for the key.
ThrowOnMissingValue
[ByVal] Optional. Boolean. Whether to throw an exception if the value was not found.

Default: True

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: Flush

Flush

Flushes any changes to the Windows Registry back to disk.

 Public Sub Flush ( )

Remarks

Generally this does not need to be called. Windows writes back to the disk Registry at regular intervals and when the system shuts down. values of other keys written to the Registry may also be flushed back to disk as well.

Only call this function if it is absolutely necessary to be sure the data has been written to the Registry. Excessive calls to this function can impact system performance.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetEnumerator

GetEnumerator

Returns an enumerator to enumerate the name/value pairs.

 Public Function GetEnumerator(
      Optional ByVal EnumType As IDictionaryEnumType = detEntries,
      Optional ByVal Options As RegistryValueOptions ) As Object

Parameters

EnumType
[ByVal] Optional. IDictionaryEnumType. A flag indicating which type of values to be enumerated in the key.

Default: detEntries

Options
[ByVal] Optional. RegistryValueOptions. Additional options on how to handle registry values.

Return Values

Object - An IEnumerator object.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetLastWriteTime

GetLastWriteTime

Returns the last time the subkey was written to.

 Public Function GetLastWriteTime ( ) As cDateTime

Return Values

cDateTime - A cDateTime object.

Remarks

This method returns cDateTime.MinValue on Windows 95,98 and ME.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetSubKeyNames

GetSubKeyNames

Returns a list of SubKey names within the current SubKey.

 Public Function GetSubKeyNames ( ) As String ( )

Return Values

String() - The list of SubKeys.

Remarks

Values within the SubKey are not included in the list.

If no SubKeys exist then a zero-length array is returned.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetValue

GetValue

Returns the value of a key within a SubKey.

 Public Function GetValue(
      ByVal Name As String,
      Optional ByRef Default As Variant,
      Optional ByVal Options As RegistryValueOptions ) As Variant

Parameters

Name
[ByVal] String. The name of the value to retrieve, or an empty string to retrieve the key default value.
Default
[ByRef] Optional. Variant. The value to be returned if the key name was not found.
Options
[ByVal] Optional. RegistryValueOptions. Additional options on how to handle how data is handled when reading from the key.

Return Values

Variant - The value found in the Registry, or Empty if the value does not exist.

Remarks

RegistryKey supports the return of 6 different key value types.
REG_DWORD (Integer numbers)
REG_QWORD (64-bit integer)
REG_BINARY (Byte arrays)
REG_SZ (Strings)
REG_MULTI_SZ (String arrays)
REG_EXPAND_SZ (String containing an environment variable)
The specific type will be created and returned based on the type in the registry.

If retrieving a REG_QWORD, a vbCurrency variable is returned to represent the 64-bit value. This means that the value will have the bias of being divided by 10000. To get the true 64-bit value, the vbCurrency value will need to be multiplied by 10000. The result may be an overflow.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetValueKind

GetValueKind

Returns the type of value stored in the registry.

 Public Function GetValueKind(
      ByVal Name As String ) As RegistryValueKind

Parameters

Name
[ByVal] String. The name of the value to get the type of.

Return Values

RegistryValueKind - The type of value in the registry.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: GetValueNames

GetValueNames

Returns a list of value names within the current SubKey.

 Public Function GetValueNames ( ) As String ( )

Return Values

String() - The list of value names.

Remarks

SubKeys within the SubKey are not included in the list.

Bad Spec: The MSDN says that if a default value exists, it will not be included as part of the names returned. However, a simple test in Dot NET shows that the default is included in the list. An empty string is the name of the default value. We include the default name ("") in the returned list.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: Name (get)

Name

Returns the name of the key.

 Public Property Get Name ( ) As String

Return Values

String - The name of the key.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: OpenSubKey

OpenSubKey

Returns a RegistryKey of the requested SubKey with the write permission specified.

 Public Function OpenSubKey(
      ByVal Name As String,
      Optional ByVal Writable As Boolean = False ) As RegistryKey

Parameters

Name
[ByVal] String. The name of the SubKey to be opened. Any slashes will will be trimmed from both ends.
Writable
[ByVal] Optional. Boolean. The permission to modify the opened SubKey.

Default: False

Return Values

RegistryKey - A new RegistryKey of the opened SubKey.

Remarks

The requested SubKey is opened starting at the location of the current RegistryKey node within the Registry.

If the requested SubKey was not found, then Nothing is returned. No error is thrown.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: RegistryValueKind

RegistryValueKind

The value types that can be set and retrieved from the Registry.

 Public Enum RegistryValueKind

Values

UnknownKind = 0
Determines the value type based on the variable type or registry setting.
StringKind = 1
Attempts to set or retrieve the value as a string.
DWordKind = 4
Attempts to set or retrieve the value as a DWord (Long).
BinaryKind = 3
Attempts to set or retrieve the value as a Byte array.
MultiStringKind = 7
Attempts to set or retrieve the value as a String array.
ExpandStringKind = 2
Attempts to set or retrieve the value as an expandable string.
QWordKind = 11
Attempts to set or retrieve the value as a 64-bit value.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: SetValue

SetValue

Sets the value of a key value within the SubKey.

 Public Sub SetValue(
      ByVal Name As String,
      ByRef Value As Variant,
      Optional ByVal ValueKind As RegistryValueKind = UnknownKind )

Parameters

Name
[ByVal] String. The name of the value to set, or an empty string to set the key default value.
Value
[ByRef] Variant. The value to write to the Registry.
ValueKind
[ByVal] Optional. RegistryValueKind. The type of value to be written to the registry.

Default: UnknownKind

Remarks

The registry can hold several types of data. RegistryKey supports many data types.
REG_DWORD (Integer numbers)
REG_QWORD (64-bit integer)
REG_BINARY (Byte arrays)
REG_SZ (Strings)
REG_MULTI_SZ (String arrays)
REG_EXPAND_SZ (Expandable string)

Another value type is any class that implements the cObject interface. The ToString method is used to write the string representation to the Registry. This makes it easy to write such values as cDateTime with ease.

If saving as a REG_QWORD then numeric values passed in may be adjusted to and mapped to an internal vbCurrency datatype to represent the 64-bit value accurately in the registry. If a vbLong value of 1 is passed in, then it will be set to a vbCurrency value of 0.0001. This will give the proper bit alignment with the 64-bit registry value. In order to avoid having the value mapped to a vbCurrency, pass the value in as a vbCurrency. In this case, the value is not changed and the 64-bits are saved to the registry as is. A vbCurrency of 1 will be saved to the registry as is, not as 0.0001.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: SubKeyCount (get)

SubKeyCount

Returns the number of SubKeys within the current key.

 Public Property Get SubKeyCount ( ) As Long

Return Values

Long - The number of SubKeys.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKey: ValueCount (get)

ValueCount

Returns the number of values within the current key.

 Public Property Get ValueCount ( ) As Long

Return Values

Long -

Remarks

The number of values.

Read Only.

See Also

Project VBCorLib Overview | Class RegistryKey Overview


RegistryKeyStatic

RegistryKeyStatic

Provides static methods for the RegistryKey class.

Remarks

This class cannot be directly instantiated. To access the methods, use the variable name directly.

 Dim rk As RegistryKey
 Set rk = RegistryKey.OpenRemoteBaseKey(LocalMachine, "RemoteName")

See Also

Project VBCorLib Overview | Registry | PublicFunctions

Public:

Types:

Name | Description
RegistryHive | The root registry key to open on the remote machine.

Methods:

Name | Description
OpenRemoteBaseKey | Connects to a Registry on a remote machine and returns a RegistryKey to the specified registry key on that machine.


RegistryKeyStatic: OpenRemoteBaseKey

OpenRemoteBaseKey

Connects to a Registry on a remote machine and returns a RegistryKey to the specified registry key on that machine.

 Public Function OpenRemoteBaseKey(
      ByVal hKey As RegistryHive,
      ByVal MachineName As String ) As RegistryKey

Parameters

hKey
[ByVal] RegistryHive. The registry key on the remote machine to open.
MachineName
[ByVal] String. The name of the remote machine.

Return Values

RegistryKey - A RegistryKey connected to the registry of a remote machine.

Remarks

If the MachineName is an empty String, then the registry of the local machine is opened.

See Also

Project VBCorLib Overview | Class RegistryKeyStatic Overview


RegistryKeyStatic: RegistryHive

RegistryHive

The root registry key to open on the remote machine.

 Public Enum RegistryHive

Values

ClassesRoot = &H80000000
Specifies the HKEY_CLASSES_ROOT key.
CurrentConfig = &H80000005
Specifies the HKEY_CURRENT_CONFIG key.
CurrentUser = &H80000001
Specifies the HKEY_CURRENT_USER key.
DynData = &H80000006
Specifies the HKEY_DYN_DATA key.
LocalMachine = &H80000002
Specifies the HKEY_LOCAL_MACHINE key.
Users = &H80000003
Specifies The HKEY_USERS key.
PerformanceData = &H80000004
Specifies the HKEY_PERFORMANCE_DATA key.

Remarks

See Also

Project VBCorLib Overview | Class RegistryKeyStatic Overview


ResBitmapDecoder

ResBitmapDecoder

Decodes bitmap byte data from a byte array and produces a StdPicture. Usually the byte array comes from a .RES file file.

See Also

Project VBCorLib Overview ResourceReader | WinResourceReader

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Attempts to decode a set of bytes into a Bitmap.
GetDecodeType | Returns the of resource this decoder can decode.
GetResource | Returns the next decoded resource available in the decoder.


ResBitmapDecoder: Decode

Decode

Attempts to decode a set of bytes into a Bitmap.

 Public Function Decode(
      ByVal Key As ResourceKey,
      Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The identifier for the set of bytes.
Bytes
[ByRef] Byte. The byte data to be decoded into a bitmap.

Return Values

Long - The number of resources decoded from the byte data. Returns 1 on success.

Remarks

The key must be of a resource type bitmap (ResourceTypes.BitmapResource).

See Also

Project VBCorLib Overview | Class ResBitmapDecoder Overview | ResourceTypes | ResourceKey


ResBitmapDecoder: GetDecodeType

GetDecodeType

Returns the of resource this decoder can decode.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - Returns either a number or string representing the resource type.

Remarks

See Also

Project VBCorLib Overview | Class ResBitmapDecoder Overview | ResourceTypes


ResBitmapDecoder: GetResource

GetResource

Returns the next decoded resource available in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the resource key of the next available resource.
ReturnValue
[ByRef] Variant. This is set to the resource value of the next available resource.

Return Values

Boolean - Returns True if a return resource was available and set, False otherwise.

Remarks

For this resource type only 1 resource is ever returned. Once it is returned, the function will return False and the resource cannot be retrieved again.

See Also

Project VBCorLib Overview | Class ResBitmapDecoder Overview | ResourceKey


ResBitmapDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResBitmapDecoder Overview


ResBitMapEncoder

ResBitMapEncoder

This encodes a multiple StdPicture bitmaps into individual arrays of bytes.

Remarks

In order to save a bitmap into a .RES file, it must be converted to an array of bytes so it can be written to the file.

Each time a bitmap is encoded, the array of bytes is stored internally for future retrieval. Multiple bitmaps can be encoded, each encoded bitmap will be stored with a ResourceKey for future retrieval.

See Also

Project VBCorLib Overview | ResourceWriter

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | Encodes a bitmap into a ResourceKey and encoded byte array.
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResBitMapEncoder: Encode

Encode

Encodes a bitmap into a ResourceKey and encoded byte array.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The bitmap to be encoded.
ResourceName
[ByRef] Variant. The name or ID of the bitmap.
ResourceType
[ByRef] Optional. Variant. The type of value being encoded.
LanguageID
[ByRef] Optional. Variant. The LocaleID the bitmap is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview | Class ResBitMapEncoder Overview


ResBitMapEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResBitMapEncoder Overview


ResBitMapEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResBitMapEncoder Overview


ResBitMapEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResBitMapEncoder Overview


ResByteEncoder

ResByteEncoder

This will accept a byte array to be encoded into a .RES file.

Remarks

Use this encoder to create a ResourceKey and byte array to be included in a .RES file.

Multiple resources can be encoded. Each encoded resource will be stored internally for later retrieval.

See Also

Project VBCorLib Overview | ResourceWriter

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | The byte array is assumed to be the encoded data and is written to a .RES file as is.
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResByteEncoder: Encode

Encode

The byte array is assumed to be the encoded data and is written to a .RES file as is.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The byte array to be written to the .RES file.
ResourceName
[ByRef] Variant. The name or ID of the bitmap.
ResourceType
[ByRef] Optional. Variant. The type of value being encoded.
LanguageID
[ByRef] Optional. Variant. The LocaleID the bitmap is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

Null arrays are not encoded. False will be returned.

See Also

Project VBCorLib Overview | Class ResByteEncoder Overview


ResByteEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResByteEncoder Overview


ResByteEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResByteEncoder Overview


ResByteEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResByteEncoder Overview


ResCursorDecoder

ResCursorDecoder

Decodes cursor byte data from a .RES formatted byte array.

Remarks

This works exactly like the ResIconDecoder.

See Also

Project VBCorLib Overview | ResourceReader | WinResourceReader

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Decodes an array of bytes into a Cursor StdPicture object.
GetDecodeType | Returns the type of resource this decoder supports.
GetResource | Returns the next available resource in the decoder.


ResCursorDecoder: Decode

Decode

Decodes an array of bytes into a Cursor StdPicture object.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The identifier associated with the array of bytes.
Bytes
[ByRef] Byte. The byte data containing the encoded cursor.

Return Values

Long - Returns the number of resourced decoded from the byte array. This decoder will return no more than 1.

Remarks

See Also

Project VBCorLib Overview | Class ResCursorDecoder Overview | ResourceKey | ResourceTypese


ResCursorDecoder: GetDecodeType

GetDecodeType

Returns the type of resource this decoder supports.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - This decoder returns ResourceTypes.CursorResource.

Remarks

See Also

Project VBCorLib Overview | Class ResCursorDecoder Overview | ResourceTypes


ResCursorDecoder: GetResource

GetResource

Returns the next available resource in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the key that identifies the resource being returned.
ReturnValue
[ByRef] Variant. This is set to the resource value being returned.

Return Values

Boolean - If a resource has been returned, this returns True, otherwise False is returned.

Remarks

Once a resource has been returned, that resource is never returned again.

See Also

Project VBCorLib Overview | Class ResCursorDecoder Overview


ResCursorDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResCursorDecoder Overview


ResCursorEncoder

ResCursorEncoder

Encodes a StdPicture Cursor to byte data used in .RES files.

See Also

Project VBCorLib Overview ResourceWriter

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | Encodes the StdPicture cursor.
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResCursorEncoder: Encode

Encode

Encodes the StdPicture cursor.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The StdPicture to be encoded.
ResourceName
[ByRef] Variant. The identifier for the resource value. This can be a String or Number.
ResourceType
[ByRef] Optional. Variant. Identifies the type of resource this is. If this is not supplied, then the type is derived from the value.
LanguageID
[ByRef] Optional. Variant. The LocaleID the value is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview | Class ResCursorEncoder Overview


ResCursorEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResCursorEncoder Overview


ResCursorEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResCursorEncoder Overview


ResCursorEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResCursorEncoder Overview


ResCursorGroupDecoder

ResCursorGroupDecoder

Decodes a CursorGroup resource.

Remarks

This returns a ResPictureGroup object when decoded.

See Also

Project VBCorLib Overview | ResourceReader | WinResourceReader

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Decodes a byte array into a ResPictureGroup that represents a cursor group.
GetDecodeType | Returns the type of resource this decoder supports.
GetResource | Returns the next available resource in the decoder.


ResCursorGroupDecoder: Decode

Decode

Decodes a byte array into a ResPictureGroup that represents a cursor group.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The identifier for the cursor group.
Bytes
[ByRef] Byte. The bytes to be decoded into a cursor group.

Return Values

Long - The number of groups decoded. This will return 0 or 1.

Remarks

See Also

Project VBCorLib Overview | Class ResCursorGroupDecoder Overview


ResCursorGroupDecoder: GetDecodeType

GetDecodeType

Returns the type of resource this decoder supports.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - This decoder returns ResourceTypes.GroupCursor.

Remarks

See Also

Project VBCorLib Overview | Class ResCursorGroupDecoder Overview | ResourceTypes


ResCursorGroupDecoder: GetResource

GetResource

Returns the next available resource in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the key that identifies the resource being returned.
ReturnValue
[ByRef] Variant. This is set to the resource value being returned.

Return Values

Boolean - If a resource has been returned, this returns True, otherwise False is returned.

Remarks

Once a resource has been returned, that resource is never returned again.

See Also

Project VBCorLib Overview | Class ResCursorGroupDecoder Overview


ResCursorGroupDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResCursorGroupDecoder Overview


ResCursorGroupEncoder

ResCursorGroupEncoder

Encodes a ResPictureGroup object to a .RES byte array.

See Also

Project VBCorLib Overview ResourceWriter

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | Encodes a ResPictureGroup object.
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResCursorGroupEncoder: Encode

Encode

Encodes a ResPictureGroup object.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. A Cursor StdPicture to be encoded.
ResourceName
[ByRef] Variant. The identifier for the resource value. This can be a String or Number.
ResourceType
[ByRef] Optional. Variant. Identifies the type of resource this is. If this is not supplied, then the type is derived from the value.
LanguageID
[ByRef] Optional. Variant. The LocaleID the value is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview | Class ResCursorGroupEncoder Overview


ResCursorGroupEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResCursorGroupEncoder Overview


ResCursorGroupEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResCursorGroupEncoder Overview


ResCursorGroupEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResCursorGroupEncoder Overview


ResIconDecoder

ResIconDecoder

Decodes an icon from a .RES formatted byte array.

Remarks

This takes a byte array formatted like that in a .RES file and extracts the Icon picture.

See Also

Project VBCorLib Overview | ResourceReader | WinResourceReader

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Decodes a byte array into a StdPicture that represents an icon.
GetDecodeType | Returns the type of resource this decoder supports.
GetResource | Returns the next available resource in the decoder.


ResIconDecoder: Decode

Decode

Decodes a byte array into a StdPicture that represents an icon.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The identifier for the icon.
Bytes
[ByRef] Byte. The bytes to be decoded into an icon.

Return Values

Long - The number of icons decoded. This will return 0 or 1.

Remarks

See Also

Project VBCorLib Overview | Class ResIconDecoder Overview


ResIconDecoder: GetDecodeType

GetDecodeType

Returns the type of resource this decoder supports.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - This decoder returns ResourceTypes.IconResource.

Remarks

See Also

Project VBCorLib Overview | Class ResIconDecoder Overview | ResourceTypes


ResIconDecoder: GetResource

GetResource

Returns the next available resource in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the key that identifies the resource being returned.
ReturnValue
[ByRef] Variant. This is set to the resource value being returned.

Return Values

Boolean - If a resource has been returned, this returns True, otherwise False is returned.

Remarks

Once a resource has been returned, that resource is never returned again.

See Also

Project VBCorLib Overview | Class ResIconDecoder Overview


ResIconDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResIconDecoder Overview


ResIconEncoder

ResIconEncoder

Encodes the StdPicture icon.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode |
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResIconEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResIconEncoder Overview


ResIconEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResIconEncoder Overview


ResIconEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResIconEncoder Overview


ResIconGroupDecoder

ResIconGroupDecoder

Decodes an IconGroup resource.

Remarks

This returns a ResPictureGroup object when decoded.

See Also

Project VBCorLib Overview | ResourceReader | WinResourceReader

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Decodes a byte array into a ResPictureGroup that represents an icon group.
GetDecodeType | Returns the type of resource this decoder supports.
GetResource | Returns the next available resource in the decoder.


ResIconGroupDecoder: Decode

Decode

Decodes a byte array into a ResPictureGroup that represents an icon group.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The identifier for the icon group.
Bytes
[ByRef] Byte. The bytes to be decoded into an icon group.

Return Values

Long - The number of groups decoded. This will return 0 or 1.

Remarks

See Also

Project VBCorLib Overview | Class ResIconGroupDecoder Overview


ResIconGroupDecoder: GetDecodeType

GetDecodeType

Returns the type of resource this decoder supports.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - This decoder returns ResourceTypes.GroupIcon.

Remarks

See Also

Project VBCorLib Overview | Class ResIconGroupDecoder Overview | ResourceTypes


ResIconGroupDecoder: GetResource

GetResource

Returns the next available resource in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the key that identifies the resource being returned.
ReturnValue
[ByRef] Variant. This is set to the resource value being returned.

Return Values

Boolean - If a resource has been returned, this returns True, otherwise False is returned.

Remarks

Once a resource has been returned, that resource is never returned again.

See Also

Project VBCorLib Overview | Class ResIconGroupDecoder Overview


ResIconGroupDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResIconGroupDecoder Overview


ResIconGroupEncoder

ResIconGroupEncoder

Encodes a ResPictureGroup object to a .RES byte array.

See Also

Project VBCorLib Overview ResourceWriter

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | Encodes a ResPictureGroup object.
GetEncodedResource | Retrieves the next encoded resource in the encoder.
Reset | Releases all currently encoded values.


ResIconGroupEncoder: Encode

Encode

Encodes a ResPictureGroup object.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The Icon StdPicture to be encodes.
ResourceName
[ByRef] Variant. The identifier for the resource value. This can be a String or Number.
ResourceType
[ByRef] Optional. Variant. Identifies the type of resource this is. If this is not supplied, then the type is derived from the value.
LanguageID
[ByRef] Optional. Variant. The LocaleID the value is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a bitmap then the function returns False.

The ResourceName can be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview | Class ResIconGroupEncoder Overview


ResIconGroupEncoder: GetEncodedResource

GetEncodedResource

Retrieves the next encoded resource in the encoder.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to a ResourceKey object that uniquely identify the encoded resource.
ReturnValue
[ByRef] Variant. This will be set to a byte array.

Return Values

Boolean - Returns True if an encoded resource was returned, False otherwise.

Remarks

This function can be called multiple times to retrieve multiple resources. As long as a resource is returned, True will be returned, otherwise False will be returned.

See Also

Project VBCorLib Overview | Class ResIconGroupEncoder Overview


ResIconGroupEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResIconGroupEncoder Overview


ResIconGroupEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResIconGroupEncoder Overview


ResourceKey

ResourceKey

This class represents a Resource key by containing the 3 primary identifiers for a Windows resource.

Remarks

A Windows resource uses up to 3 identifying values that when combined are unique within the specific resource set. The LanguageID, ResourceName, and ResourceType are combined to create a single unique identifier for a Windows resource.

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Types:

Name | Description
ResourceTypes | The type of resources acknowledged by Windows. These are used when a resource type is requested in function calls.

Properties:

Name | Description
LanguageID (get) | Returns the language this resource is identified with.
ResourceName (get) | Returns the Name or ID of the resource.
ResourceType (get) | Returns the Name or ID of the resource type.

Methods:

Name | Description
Equals | Determines if this object and the value are equal.
GetHashCode | Returns a pseudo-unique hashcode that represents this object.
ToString | Returns a String representation of this object.


ResourceKey: Equals

Equals

Determines if this object and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare to this object instance.

Return Values

Boolean - Returns True if the value and object are equal, otherwise False.

Remarks

The value is equal if it is a ResourceKey with the same LanguageID, ResourceName, and ResourceType.

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: GetHashCode

GetHashCode

Returns a pseudo-unique hashcode that represents this object.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A pseudo-unique hashcode that represents this object.

Remarks

The ResourceName, ResourceType, and LanguageID are all used to create the hashcode.

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: LanguageID (get)

LanguageID

Returns the language this resource is identified with.

 Public Property Get LanguageID ( ) As Long

Return Values

Long - The LCID or language ID for this resource.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: ResourceName (get)

ResourceName

Returns the Name or ID of the resource.

 Public Property Get ResourceName ( ) As Variant

Return Values

Variant -

Remarks

A String or Numeric value. A resource can have an identification as either a string name or a numeric value. A string name of "101" is not the same as a numeric value of 101.

Read Only.

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: ResourceType (get)

ResourceType

Returns the Name or ID of the resource type.

 Public Property Get ResourceType ( ) As Variant

Return Values

Variant - A String or Numeric value.

Remarks

A resource can be a type that is defined by the system. A system type is numeric. A custom resource type usually uses a name for the type.

Read Only.

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: ResourceTypes

ResourceTypes

The type of resources acknowledged by Windows. These are used when a resource type is requested in function calls.

 Public Enum ResourceTypes

Values

CursorResource = 1
A Windows cursor resource type.
BitmapResource = 2
A bitmap resource type.
IconResource = 3
An icon resource type.
MenuResource = 4
A menu set resource type.
DialogBox = 5
A dialog box resource type.
StringResource = 6
A String resource type.
FontDirectory = 7
A font directory resource type.
FontResource = 8
A font resource type.
AcceleratorTable = 9
An accelerator table resource type.
UserDefined = 10
A user-defined resource type.
GroupCursor = 12
A group cursor resource type.
GroupIcon = 14
A group icon resource type.
VersionResource = 16
A version resource type.
DialogInclude = 17
A dialog include resource type.
PlugPlay = 19
A plug-n-play resource type.
VXD = 20
A VXD resource type.
AniCursor = 21
An animated cursor resource type.
AniIcon = 22
An animated icon resource type.
HTML = 23
An html resource type.
Dim
-ERROR: Can not find parameter 'Dim'.
'
 The type of resources acknowledged by Windows. These are used
 when a resource type is requested in function calls.

 @param CursorResource A Windows cursor resource type.
 @param BitmapResource A bitmap resource type.
 @param IconResource An icon resource type.
 @param MenuResource A menu set resource type.
 @param DialogBox A dialog box resource type.
 @param StringResource A String resource type.
 @param FontDirectory A font directory resource type.
 @param FontResource A font resource type.
 @param AcceleratorTable An accelerator table resource type.
 @param UserDefined A user-defined resource type.
 @param GroupCursor A group cursor resource type.
 @param GroupIcon A group icon resource type.
 @param VersionResource A version resource type.
 @param DialogInclude A dialog include resource type.
 @param PlugPlay A plug-n-play resource type.
 @param VXD A VXD resource type.
 @param AniCursor An animated cursor resource type.
 @param AniIcon An animated icon resource type.
 @param HTML An html resource type.

Remarks

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceKey: ToString

ToString

Returns a String representation of this object.

 Public Function ToString ( ) As String

Return Values

String - A String representation of this object.

Remarks

See Also

Project VBCorLib Overview | Class ResourceKey Overview


ResourceManager

ResourceManager

Provides convenient access to culture-specific resources at runtime.

Remarks

A ResourceManager contains all resources for all of the cultures found using an IResourceReader object or a .RES filename.

To load the resources from multiple .RES files, use ResourceManager.CreateFileBasedResourceManager.

See Also

Project VBCorLib Overview | Constructors | ResourceManagerStatic | ResourceReader | WinResourceReader | IResourceReader | Win32Resource

Implements:

IEnumerable
IObject

Public:

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator used to iterate through all resources for all cultures.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetObject | Returns a resource from the specified culture.
GetResourceSet | Returns a set of resources for a specific culture.
GetString | Returns a resource string for the specific culture.
ReleaseAllResources | Releases all resources.
ToString | Returns a string representation of this object instance.


ResourceManager: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: GetEnumerator

GetEnumerator

Returns an enumerator used to iterate through all resources for all cultures.

 Public Function GetEnumerator ( ) As IDictionaryEnumerator

Return Values

IDictionaryEnumerator - An IDictionaryEnumerator object.

Remarks

The enumerator returns DictionaryEntry objects. The Key contains the Culture ID. The Value contains the ResourceSet for that specific culture.

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: GetObject

GetObject

Returns a resource from the specified culture.

 Public Function GetObject(
      ByRef ResourceName As Variant,
      ByRef ResourceType As Variant,
      Optional ByRef CultureID As Variant ) As Variant

Parameters

ResourceName
[ByRef] Variant. The resource identifier.
ResourceType
[ByRef] Variant. The type of resource to search for.
CultureID
[ByRef] Optional. Variant. A CultureInfo object or Culture ID. The current culture is used if this parameter is missing.

Return Values

Variant - The resource value, or Empty if the resourse was not found.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: GetResourceSet

GetResourceSet

Returns a set of resources for a specific culture.

 Public Function GetResourceSet(
      ByRef CultureID As Variant ) As ResourceSet

Parameters

CultureID
[ByRef] Variant. A CultureInfo object or Culture ID. The current culture is used if this parameter is missing.

Return Values

ResourceSet - A set of resources for a specific culture, or Nothing if not found.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: GetString

GetString

Returns a resource string for the specific culture.

 Public Function GetString(
      ByRef ResourceName As Variant,
      Optional ByRef CultureID As Variant ) As String

Parameters

ResourceName
[ByRef] Variant. The resource ID.
CultureID
[ByRef] Optional. Variant. A CultureInfo object or Culture ID. The current culture is used if this parameter is missing.

Return Values

String - The resource as a String, or an empty string if the resource was not found.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: ReleaseAllResources

ReleaseAllResources

Releases all resources.

 Public Sub ReleaseAllResources ( )

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManager: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceManager Overview


ResourceManagerStatic

ResourceManagerStatic

Provides static methods for the ResourceManager object.

Remarks

To access these methods, use the ResourceManager.* syntax.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
CreateFileBasedResourceManager | Creates a ResourceManager from a set of .RES files found in the ResourceDir.


ResourceManagerStatic: CreateFileBasedResourceManager

CreateFileBasedResourceManager

Creates a ResourceManager from a set of .RES files found in the ResourceDir.

 Public Function CreateFileBasedResourceManager(
      ByVal ResourceDir As String,
      Optional ByVal SearchPattern As String = "*" ) As ResourceManager

Parameters

ResourceDir
[ByVal] String. The folder containing the .RES files.
SearchPattern
[ByVal] Optional. String. The pattern used to match .RES files.

Default: "*"

Return Values

ResourceManager - A ResourceManager contain resources from a set of .RES files.

Remarks

To load a single specific .RES file use the Cor.NewResourceManager method.

See Also

Project VBCorLib Overview | Class ResourceManagerStatic Overview | Constructors | ResourceManager


ResourceReader

ResourceReader

Provides a means to iterate through the resources in a .RES file.

Remarks

The only resource types recognized are Strings, Icons, Cursors, and Bitmaps. All other resource types are contained as a byte array.

Pass this object into the ResourceManager constructor to access specific resources based on ID, Type, and Culture. Or pass this object into a ResourceSet to retrieve the resources for a specific culture.

See Also

Project VBCorLib Overview | Constructors | ResourceManager | ResourceSet | IResourceReader | Win32Resource

Implements:

IEnumerable
IObject
IResourceReader

Public:

Methods:

Name | Description
AddDecoder | Adds additional resource decoders to interpret binary data that is unknown to the ResourceReader.
CloseReader | Closes the reader and releases any resources.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an IDictionaryEnumerator object.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


ResourceReader: AddDecoder

AddDecoder

Adds additional resource decoders to interpret binary data that is unknown to the ResourceReader.

 Public Sub AddDecoder(
      ByVal DecoderToAdd As IResourceDecoder )

Parameters

DecoderToAdd
[ByVal] IResourceDecoder. A resource decoder associated with a specific resource type.

Remarks

This allows the ResourceReader to be extended to handle additional resource types. If no decoder exists for the specific resource type, then the raw data is returned in a Byte array.

Resource types can be identified by either a numeric value, or a string name.

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: CloseReader

CloseReader

Closes the reader and releases any resources.

 Public Sub CloseReader ( )

Remarks

Close can be called safely multiple times.

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: GetEnumerator

GetEnumerator

Returns an IDictionaryEnumerator object.

 Public Function GetEnumerator ( ) As IDictionaryEnumerator

Return Values

IDictionaryEnumerator - An enumerator.

Remarks

The enumerator returns values as DictionaryEntry objects. The value property in the DictionaryEntry object returns a Win32Resource object which contains details about the specific resource found in the .RES file. The Key property returns the ID for the specific resource. The Keys may not be unique across all resources, os using the Key as a unique identifier is not recommended.

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: IResourceReader

IResourceReader

 Implements IResourceReader

Return Values

IResourceReader -

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceReader: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceReader Overview


ResourceSet

ResourceSet

Stores all the resources localized for one particular culture, ignoring all other cultures.

Remarks

This can be constructed using a .RES filename, a .RES formatted Stream, or an IResourceReader object.

See Also

Project VBCorLib Overview | Constructors | ResourceReader | WinResourceReader | ResourceManager | Win32Resource

Implements:

IEnumerable
IObject

Public:

Properties:

Name | Description
LanguageID (get) | Returns the Culture ID for the specific set of resources.

Methods:

Name | Description
CloseResourceSet | Closes the resource set.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDefaultReader | Returns the name of the type of resource reader to use with this specifici ResourceSet
GetDefaultWriter | Returns the name of the type of resource writer to use with this specifici ResourceSet
GetEnumerator | Returns an enumerator to iterate through all resources within the resource set.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetObject | Returns the resource specified.
GetString | Returns a String resource from the set.
ToString | Returns a string representation of this object instance.


ResourceSet: CloseResourceSet

CloseResourceSet

Closes the resource set.

 Public Sub CloseResourceSet ( )

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetDefaultReader

GetDefaultReader

Returns the name of the type of resource reader to use with this specifici ResourceSet

 Public Function GetDefaultReader ( ) As String

Return Values

String - The name of a resource reader type.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetDefaultWriter

GetDefaultWriter

Returns the name of the type of resource writer to use with this specifici ResourceSet

 Public Function GetDefaultWriter ( ) As String

Return Values

String - The name of a resource writer type.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetEnumerator

GetEnumerator

Returns an enumerator to iterate through all resources within the resource set.

 Public Function GetEnumerator ( ) As IDictionaryEnumerator

Return Values

IDictionaryEnumerator - An enumerator.

Remarks

The enumerator returns values as DictionaryEntry objects. The value property in the DictionaryEntry object returns a Win32Resource object which contains details about the specific resource found in the .RES file. The Key property returns the ID for the specific resource.

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetObject

GetObject

Returns the resource specified.

 Public Function GetObject(
      ByRef ResourceName As Variant,
      ByRef ResourceType As Variant ) As Variant

Parameters

ResourceName
[ByRef] Variant. The resource identifier.
ResourceType
[ByRef] Variant. The type of resource to search for.

Return Values

Variant - The resource value, or Empty if the resource was not found.

Remarks

The ResType can be either a String of the type of resource or a ResourceTypes enum value.

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: GetString

GetString

Returns a String resource from the set.

 Public Function GetString(
      ByRef ResourceName As Variant ) As String

Parameters

ResourceName
[ByRef] Variant. The string identifier.

Return Values

String - A resource string, or an empty string if not found.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: LanguageID (get)

LanguageID

Returns the Culture ID for the specific set of resources.

 Public Property Get LanguageID ( ) As Long

Return Values

Long - The culture ID.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceSet: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceSet Overview


ResourceWriter

ResourceWriter

Writes encoded resources out to a .RES file.

See Also

Project VBCorLib Overview

Implements:

IObject
IResourceWriter

Public:

Methods:

Name | Description
AddEncoder | Allows additional encoders to be added to the writer to encode additional datatypes to be written to a .RES file.
AddResource | Adds a new value to the writer.
CloseWriter | Closes the writer.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
Generate | Creates a .RES file from the added resources.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.


ResourceWriter: AddEncoder

AddEncoder

Allows additional encoders to be added to the writer to encode additional datatypes to be written to a .RES file.

 Public Sub AddEncoder(
      ByVal EncoderToAdd As IResourceEncoder )

Parameters

EncoderToAdd
[ByVal] IResourceEncoder. The encodoer to be added to the writer.

Remarks

The encoder is inserted at the beginning of an internal list. This gives the most recent encoders first chance at encoding values.

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: AddResource

AddResource

Adds a new value to the writer.

 Public Sub AddResource(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant )

Parameters

Value
[ByRef] Variant. The value to be added to a .RES file.
ResourceName
[ByRef] Variant. The identifier of the value. Can be a string or number.
ResourceType
[ByRef] Optional. Variant. The type of resource being writting.
LanguageID
[ByRef] Optional. Variant. The Locale ID associated with the resource.

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: CloseWriter

CloseWriter

Closes the writer.

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare with this instance.

Return Values

Boolean - Returns True if the value equals this instance, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: Generate

Generate

Creates a .RES file from the added resources.

 Public Sub Generate ( )

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a hashcode value.

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: IResourceWriter

IResourceWriter

 Implements IResourceWriter

Return Values

IResourceWriter -

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResourceWriter: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResourceWriter Overview


ResPictureGroup

ResPictureGroup

This class represents a group of Icons or Cursors.

See Also

Project VBCorLib Overview ResPictureGroupInfo

Implements:

IObject

Public:

Types:

Name | Description
PictureGroupTypes | The list of picture types supported.

Properties:

Name | Description
Count (get) | Returns the number of pictures in the group.
GroupType (get) | Returns the type of pictures in the group.
Item (get) | Returns the info of a picture at the specific index.

Methods:

Name | Description
Add | Adds a picture to the group.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.


ResPictureGroup: Add

Add

Adds a picture to the group.

 Public Sub Add(
      ByVal ResourceID As Long,
      ByVal Pic As IPicture )

Parameters

ResourceID
[ByVal] Long. The numeric ID of the picture resource to be included in the group.
Pic
[ByVal] IPicture. The picture to be added to the group.

Remarks

The Pic value is not added to the resource. It is only used to obtain information about the picture. The actual picture resource needs to be added to the ResourceWriter independently.

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: Count (get)

Count

Returns the number of pictures in the group.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of pictures in the group.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compere equality with this instance.

Return Values

Boolean - Returns True if the value equals this instance, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a hashcode value.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: GroupType (get)

GroupType

Returns the type of pictures in the group.

 Public Property Get GroupType ( ) As PictureGroupTypes

Return Values

PictureGroupTypes - The type of pictures in the group.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: Item (get)

Item

Returns the info of a picture at the specific index.

 Public Property Get Item(
      ByVal Index As Long ) As ResPictureGroupInfo

Parameters

Index
[ByVal] Long. An index into the list of pictures in the group.

Return Values

ResPictureGroupInfo - A ResPictureGroupInfo at the specified index.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: PictureGroupTypes

PictureGroupTypes

The list of picture types supported.

 Public Enum PictureGroupTypes

Values

IconGroup = ResourceTypes . IconResource
Represents a group of icon pictures.
CursorGroup = ResourceTypes . CursorResource
Represents a group of cursor pictures.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroup: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroup Overview


ResPictureGroupInfo

ResPictureGroupInfo

Represents a picture resource that is part of a group of pictures.

See Also

Project VBCorLib Overview ResPictureGroup

Implements:

IObject

Public:

Properties:

Name | Description
BitCount (get) | Returns the number of bits used to represent the color range.
Colors (get) | Returns the number of colors used in the picture.
Height (get) | Returns the height of the picture.
Planes (get) | Returns the number of planes. This returns 1.
ResourceID (get) | The numeric identifier of the associated picture.
Size (get) | Returns the number of bytes in this resource.
Width (get) | Returns the width of the picture.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.


ResPictureGroupInfo: BitCount (get)

BitCount

Returns the number of bits used to represent the color range.

 Public Property Get BitCount ( ) As Long

Return Values

Long - The number of bits used to represent the color range.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Colors (get)

Colors

Returns the number of colors used in the picture.

 Public Property Get Colors ( ) As Long

Return Values

Long - The number of colors used.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare to this instance.

Return Values

Boolean - Returns True if the value is equal to this instance, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A hashcode value.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Height (get)

Height

Returns the height of the picture.

 Public Property Get Height ( ) As Long

Return Values

Long - The picture height in pixels.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Planes (get)

Planes

Returns the number of planes. This returns 1.

 Public Property Get Planes ( ) As Long

Return Values

Long - The number of planes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: ResourceID (get)

ResourceID

The numeric identifier of the associated picture.

 Public Property Get ResourceID ( ) As Long

Return Values

Long - The numeric identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Size (get)

Size

Returns the number of bytes in this resource.

 Public Property Get Size ( ) As Long

Return Values

Long -

Remarks

The number of bytes in this resource.

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResPictureGroupInfo: Width (get)

Width

Returns the width of the picture.

 Public Property Get Width ( ) As Long

Return Values

Long - The picture width in pixels.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ResPictureGroupInfo Overview


ResStringTableDecoder

ResStringTableDecoder

Decodes a resource String table containing up to 16 strings.

See Also

Project VBCorLib Overview IResourceDecoder

Implements:

IResourceDecoder

Public:

Methods:

Name | Description
Decode | Decodes an array of bytes into a string table containing up to 16 strings.
GetDecodeType | Returns the type of resource that can be decoded with this decoder.
GetResource | Returns the next available resource in the decoder.


ResStringTableDecoder: Decode

Decode

Decodes an array of bytes into a string table containing up to 16 strings.

 Public Function Decode(
      ByVal Key As ResourceKey,
      ByRef Bytes ( ) As Byte ) As Long

Parameters

Key
[ByVal] ResourceKey. The resource identifier for the specific string table.
Bytes
[ByRef] Byte. The byte data that is decoded to a string table.

Return Values

Long - The number of strings decoded from the byte array.

Remarks

Up to 16 strings can be decoded from a resource string table.

See Also

Project VBCorLib Overview | Class ResStringTableDecoder Overview | ResourceKey


ResStringTableDecoder: GetDecodeType

GetDecodeType

Returns the type of resource that can be decoded with this decoder.

 Public Function GetDecodeType ( ) As Variant

Return Values

Variant - The type of resource that can be decoded.

Remarks

See Also

Project VBCorLib Overview | Class ResStringTableDecoder Overview | ResourceTypes


ResStringTableDecoder: GetResource

GetResource

Returns the next available resource in the decoder.

 Public Function GetResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. This is set to the key that identifies the resource being returned.
ReturnValue
[ByRef] Variant. This is set to the resource value being returned.

Return Values

Boolean - If a resource has been returned, this returns True, otherwise False is returned.

Remarks

Once a resource has been returned, that resource is never returned again.

See Also

Project VBCorLib Overview | Class ResStringTableDecoder Overview | ResourceKey


ResStringTableDecoder: IResourceDecoder

IResourceDecoder

 Implements IResourceDecoder

Return Values

IResourceDecoder -

Remarks

See Also

Project VBCorLib Overview | Class ResStringTableDecoder Overview


ResStringTableEncoder

ResStringTableEncoder

Encodes strings into string tables.

Remarks

In a .RES file strings are stored into tables of up to 16 strings per table. Each table is uniquely identified based on the range of string IDs.

See Also

Project VBCorLib Overview

Implements:

IResourceEncoder

Public:

Methods:

Name | Description
Encode | Encodes a string into a string table.
GetEncodedResource | Returns the next resource entry byte array.
Reset | Releases all currently encoded values.


ResStringTableEncoder: Encode

Encode

Encodes a string into a string table.

 Public Function Encode(
      ByRef Value As Variant,
      ByRef ResourceName As Variant,
      Optional ByRef ResourceType As Variant,
      Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The string to be encoded.
ResourceName
[ByRef] Variant. The name of the string. This must be a numeric value.
ResourceType
[ByRef] Optional. Variant. The type of resource to be encoded.
LanguageID
[ByRef] Optional. Variant. The Locale ID this resource is associated with.

Return Values

Boolean - Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a string then the function returns False.

The ResourceName should be a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

See Also

Project VBCorLib Overview | Class ResStringTableEncoder Overview


ResStringTableEncoder: GetEncodedResource

GetEncodedResource

Returns the next resource entry byte array.

 Public Function GetEncodedResource(
      ByRef ReturnKey As ResourceKey,
      ByRef ReturnValue As Variant ) As Boolean

Parameters

ReturnKey
[ByRef] ResourceKey. Our own key for the resource entry.
ReturnValue
[ByRef] Variant. The next byte array of a ResStringResource.

Return Values

Boolean - If we have returned something, Return True, otherwise return False.

Remarks

Each resource can contain up to 16 of the strings previously encoded.

See Also

Project VBCorLib Overview | Class ResStringTableEncoder Overview


ResStringTableEncoder: IResourceEncoder

IResourceEncoder

 Implements IResourceEncoder

Return Values

IResourceEncoder -

Remarks

See Also

Project VBCorLib Overview | Class ResStringTableEncoder Overview


ResStringTableEncoder: Reset

Reset

Releases all currently encoded values.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class ResStringTableEncoder Overview


Rfc2898DeriveBytes

Rfc2898DeriveBytes

Provides a methods to derive Byte array keys from string passwords.

Remarks

This class implements the RFC2898 standard for generating keys from string or byte array passwords utilizing the SHA-1 hash algorithm.

With this class, a key of any length can be generated from a string or byte array password.

See Also

Project VBCorLib Overview | Constructors

Implements:

IObject

Public:

Properties:

Name | Description
IterationCount (get) | Returns the number of iterations used when computing the next set of bytes.
IterationCount (let) | Sets the number of iterations to be used when computing the next set of bytes.
Salt (get) | Returns any Salt being used during key generation.
Salt (let) | Sets the Salt to be used during key generation.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetBytes | Returns the next set of bytes to be generated for a specific string password.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
Reset | Resets the key generator.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


Rfc2898DeriveBytes: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: GetBytes

GetBytes

Returns the next set of bytes to be generated for a specific string password.

 Public Function GetBytes(
      ByVal cb As Long ) As Byte ( )

Parameters

cb
[ByVal] Long. The number of bytes to be generated.

Return Values

Byte() -

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: IterationCount (get)

IterationCount

Returns the number of iterations used when computing the next set of bytes.

 Public Property Get IterationCount ( ) As Long

Return Values

Long - The number of iterations to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: IterationCount (let)

IterationCount

Sets the number of iterations to be used when computing the next set of bytes.

 Public Property Let IterationCount(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of iterations to be used.

Remarks

The value must be greater than 0.

Read/Write.

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: Reset

Reset

Resets the key generator.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: Salt (get)

Salt

Returns any Salt being used during key generation.

 Public Property Get Salt ( ) As Byte ( )

Return Values

Byte() - The Salt being used during key generation.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: Salt (let)

Salt

Sets the Salt to be used during key generation.

 Public Property Let Salt(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The Salt to be used.

Remarks

The length of the array cannot be less than 8 bytes.

Read/Write.

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rfc2898DeriveBytes: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class Rfc2898DeriveBytes Overview


Rijndael

Rijndael

Provides a standard interface implemented by all Rijndael cryptographic service providers.

See Also

Project VBCorLib Overview RijndaelManaged.

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size in bits.
BlockSize (let) | Sets the block size in bits.
FeedbackSize (get) | Returns the feedback size in bits.
FeedbackSize (let) | Sets the feedback size in bits.
IV (get) | Returns the Initialization Vector (IV).
IV (let) | Sets the Initialization Vectory (IV).
Key (get) | Returns the secret key used by the cryptographic operation.
Key (let) | Sets the secret key to be used by the cryptographic operation.
KeySize (get) | Returns the size of the key, in bits, used by the cryptographic operation.
KeySize (let) | Sets the size of the key, in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the mode the current algoritm is set to.
Mode (let) | Sets the mode the current algorithm is set to.
Padding (get) | Returns the padding to be used by the algorithm.
Padding (let) | Sets the padding to be used by the algorithm.

Methods:

Name | Description
Clear | Releases all resources.
CreateDecryptor | Creates a new decryptor using the Rijndael algorithm.
CreateEncryptor | Creates a new encryptor using the Rijndael algorithm.
Equals | Returns if this instance and the value are equal.
GenerateIV | Generates a new Initialization Vector array.
GenerateKey | Generates a new Key based on the key size.
GetHashCode | Returns a semi-unique value that represents this instance.
ToString | Returns a string representation of this instance.
ValidKeySize | Checks if the specific number of bits is a valid key size.


Rijndael: BlockSize (get)

BlockSize

Returns the block size in bits.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

The block size is the amount of data that is processed as a single unit by the cipher

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: BlockSize (let)

BlockSize

Sets the block size in bits.

 Public Property Let BlockSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the block in bits.

Remarks

The block size is the amount of data that is processed as a single unit by the cipher.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Clear

Clear

Releases all resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: CreateDecryptor

CreateDecryptor

Creates a new decryptor using the Rijndael algorithm.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to decrypt the ciphered text back into plain text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to decrypt ciphered text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: CreateEncryptor

CreateEncryptor

Creates a new encryptor using the Rijndael algorithm.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to encrypt the plain text into ciphered text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to encrypt plain text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Equals

Equals

Returns if this instance and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare for equality.

Return Values

Boolean - Returns if the value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: FeedbackSize (get)

FeedbackSize

Returns the feedback size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The feedback size in bits.

Remarks

The always returns 64 bits.

The feedback size determines how much of the previous data processed is to be used on the next block of data. This is to prevent identical blocks of data to appear the same when encrypted.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: FeedbackSize (let)

FeedbackSize

Sets the feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of feedback in bits.

Remarks

DES only supports 64 bits.

The feedback size determines how much of the previous data processed is to be used on the next block of data. This is to prevent identical blocks of data to appear the same when encrypted.

Not all modes of DES support feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: GenerateIV

GenerateIV

Generates a new Initialization Vector array.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: GenerateKey

GenerateKey

Generates a new Key based on the key size.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: GetHashCode

GetHashCode

Returns a semi-unique value that represents this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns the semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: IV (get)

IV

Returns the Initialization Vector (IV).

 Public Property Get IV ( ) As Byte ( ) :

Return Values

Byte() - An array representing the IV.

Remarks

Only an 8-byte array is supported.

When the very first block of data is process there is no previous data to pull feedback data from, so the Initialization Vector is used as a dummy set of data for feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: IV (let)

IV

Sets the Initialization Vectory (IV).

 Public Property Let IV(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. A set of bytes representing the IV.

Remarks

Only an 8-byte array is supported.

When the very first block of data is process there is no previous data to pull feedback data from, so the Initialization Vector is used as a dummy set of data for feedback.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Key (get)

Key

Returns the secret key used by the cryptographic operation.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - Returns the secret key.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Key (let)

Key

Sets the secret key to be used by the cryptographic operation.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new secret key to be used.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: KeySize (get)

KeySize

Returns the size of the key, in bits, used by the cryptographic operation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The size of the key in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: KeySize (let)

KeySize

Sets the size of the key, in bits.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the key in bits.

Remarks

This will cause the Key property to reset and regenerate when needed.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal block sizes the cryptographic operation supports.

Remarks

Block sizes are represented in bits.

Read Only.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal key sizes the cryptographic operation supports.

Remarks

Key sizes are represented in bits.

Read Only.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Mode (get)

Mode

Returns the mode the current algoritm is set to.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - Returns a CipherMode value.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Mode (let)

Mode

Sets the mode the current algorithm is set to.

 Public Property Let Mode(
      ByVal RHS As CipherMode ) :

Parameters

RHS
[ByVal] CipherMode. The new mode for the algorithm.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Padding (get)

Padding

Returns the padding to be used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - A current padding being used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: Padding (let)

Padding

Sets the padding to be used by the algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode ) :

Parameters

RHS
[ByVal] PaddingMode. The new padding value to be used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that represents this instance.

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


Rijndael: ValidKeySize

ValidKeySize

Checks if the specific number of bits is a valid key size.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. A value to determine if is a legal key size.

Return Values

Boolean - Returns True if the bit length is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class Rijndael Overview


RijndaelManaged

RijndaelManaged

Represents an implementation of the Rijndael symmetric block cipher algorithm

Remarks

Details about Rijndael can be found here: http://www.iaik.tugraz.at/research/krypto/AES/old/~rijmen/rijndael/

This example shows a very simple method of encrypting then decrypting a String value.

Private Sub Main()
    ' Create a new Rijndael key.
    Dim Key As New RijndaelManaged

    ' Encrypt a string to a byte array.
    Dim Buffer() As Byte
    Buffer = Encrypt("This is some plaintext!", Key)

    ' Decrypt the byte array back to a string.
    Dim PlainText As String
    PlainText = Decrypt(Buffer, Key)

    ' Display the plaintext value to the console.
    Console.WriteLine PlainText
    Console.ReadKey
End Sub Main

' Encrypt the string.
Private Function Encrypt(ByVal PlainText As String, ByVal Key As SymmetricAlgorithm) As Byte()
    Dim Buffer() As Byte
    Buffer = StrConv(PlainText, vbFromUnicode)

    Dim Encryptor As ICryptoTransform
    Set Encryptor = Key.CreateEncryptor
    Encrypt = Encryptor.TransformFinalBlock(Buffer, 0, cArray.GetLength(Buffer))
End Function

' Decrypt the byte array.
Public Function Decrypt(ByRef CypherText() As Byte, ByVal Key As SymmetricAlgorithm) As String
    Dim Decryptor As ICryptoTransform
    Set Decryptor = Key.CreateDecryptor

    Dim Buffer() As Byte
    Buffer = Decryptor.TransformFinalBlock(CypherText, 0, cArray.GetLength(CypherText))
    Decrypt = StrConv(Buffer, vbUnicode)
End Function

See Also

Project VBCorLib Overview | RijndaelManagedTransform

Implements:

IObject
Rijndael
SymmetricAlgorithm

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by this algorithm.
BlockSize (let) | Sets the block size, in bits, used by this algorithm.
FeedbackSize (get) | Returns the Feedback Size in bits.
FeedbackSize (let) | Sets the Feedback size in bits.
IV (get) | Returns the Initialization Vector.
IV (let) | Sets the Initialization Vector to be used.
Key (get) | Returns the current secret key.
Key (let) | Sets the secret key.
KeySize (get) | Returns the key size in bits.
KeySize (let) | Sets the key size in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of valid key sizes supported by this algorithm.
Mode (get) | Returns the Cipher mode this algorithm will use.
Mode (let) | Sets the Cipher mode this algorithm will use.
Padding (get) | Returns the padding mode being used.
Padding (let) | Sets the padding mode to be used.

Methods:

Name | Description
Clear | Clears the Key and IV arrays.
CreateDecryptor | Returns a new cipher used to decrypt data.
CreateEncryptor | Returns a new cipher used to encrypt data.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GenerateIV | Generates a random IV array to use.
GenerateKey | Generates a random key to be used.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
ValidKeySize | Tests if a specific bit length is valid for a key.


RijndaelManaged: BlockSize (get)

BlockSize

Returns the block size, in bits, used by this algorithm.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

Block sizes of 128, 192, and 256 are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: BlockSize (let)

BlockSize

Sets the block size, in bits, used by this algorithm.

 Public Property Let BlockSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new block size in bits.

Remarks

Block sizes of 128, 192, and 256 are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Clear

Clear

Clears the Key and IV arrays.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: CreateDecryptor

CreateDecryptor

Returns a new cipher used to decrypt data.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform (RijndaelManagedTransform) object used to dencrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview | RijndaelManagedTransform


RijndaelManaged: CreateEncryptor

CreateEncryptor

Returns a new cipher used to encrypt data.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform (RijndaelManagedTransform) object used to encrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview | RijndaelManagedTransform


RijndaelManaged: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: FeedbackSize (get)

FeedbackSize

Returns the Feedback Size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The Feedback size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: FeedbackSize (let)

FeedbackSize

Sets the Feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new feedback size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: GenerateIV

GenerateIV

Generates a random IV array to use.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: GenerateKey

GenerateKey

Generates a random key to be used.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: IV (get)

IV

Returns the Initialization Vector.

 Public Property Get IV ( ) As Byte ( )

Return Values

Byte() - The Initialization Vector.

Remarks

If no IV has been set, then a new random IV will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: IV (let)

IV

Sets the Initialization Vector to be used.

 Public Property Let IV(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new IV to use.

Remarks

The array must be 8 bytes in length.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Key (get)

Key

Returns the current secret key.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The secret key.

Remarks

If no key has been set, then a new random key will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Key (let)

Key

Sets the secret key.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new secret key.

Remarks

Key sizes of 128, 192, and 256 bits are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: KeySize (get)

KeySize

Returns the key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits.

Remarks

128, 192, and 256 bits are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: KeySize (let)

KeySize

Sets the key size in bits.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

128, 192, and 256 bits are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of legal block sizes.

Remarks

Block sizes of 128, 192, and 256 are supported.

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: LegalKeySizes (get)

LegalKeySizes

Returns a list of valid key sizes supported by this algorithm.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of valid key sizes.

Remarks

Key sizes of 128, 192, and 256 are supported.

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Mode (get)

Mode

Returns the Cipher mode this algorithm will use.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - The Cipher mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Mode (let)

Mode

Sets the Cipher mode this algorithm will use.

 Public Property Let Mode(
      ByVal RHS As CipherMode )

Parameters

RHS
[ByVal] CipherMode. The cipher mode to use.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Padding (get)

Padding

Returns the padding mode being used.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The current padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Padding (let)

Padding

Sets the padding mode to be used.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: Rijndael

Rijndael

 Implements Rijndael

Return Values

Rijndael -

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: SymmetricAlgorithm

SymmetricAlgorithm

 Implements SymmetricAlgorithm

Return Values

SymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManaged: ValidKeySize

ValidKeySize

Tests if a specific bit length is valid for a key.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. The number of bits to test for.

Return Values

Boolean - Return True if the number of bits is supported, False otherwise.

Remarks

128, 192, 256 bit keys are supported.

See Also

Project VBCorLib Overview | Class RijndaelManaged Overview


RijndaelManagedTransform

RijndaelManagedTransform

Performs cryptographic operations on data using the Rijndael algorithm.

Remarks

Details about the Rijndael algorithm can be found at http://csrc.nist.gov/CryptoToolkit/aes/rijndael

Use the RijndaelManaged class to create an instance of this class.

See Also

Project VBCorLib Overview | RijndaelManaged

Implements:

ICryptoTransform
IObject

Public:

Properties:

Name | Description
BlockSizeValue (get) | Returns the blocksize in bits.
CanReuseTransform (get) | Returns if the current transfrom can be reused after calling TransformFinalBlock.
CanTransformMultipleBlocks (get) | Returns if this transform can process more than one block per TransformBlock call.
InputBlockSize (get) | Returns the size of one block of data that is to be processed.
OutputBlockSize (get) | Returns the size of the resulting block of data after an input block of data has been processed.

Methods:

Name | Description
Clear | Releases all resources used by the class.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Reset | Resets the transform so a new set of data can begin to be processed.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Processes a set of data, encrypting or decrypting it.
TransformFinalBlock | Processes a set of data adding any padding needed to complete the process.


RijndaelManagedTransform: BlockSizeValue (get)

BlockSizeValue

Returns the blocksize in bits.

 Public Property Get BlockSizeValue ( ) As Long

Return Values

Long - The blocksize in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: CanReuseTransform (get)

CanReuseTransform

Returns if the current transfrom can be reused after calling TransformFinalBlock.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if it can be reused, False otherwise.

Remarks

This always returns True.

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can process more than one block per TransformBlock call.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - This always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: Clear

Clear

Releases all resources used by the class.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: InputBlockSize (get)

InputBlockSize

Returns the size of one block of data that is to be processed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The size of one block of data to be processed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: OutputBlockSize (get)

OutputBlockSize

Returns the size of the resulting block of data after an input block of data has been processed.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The size of the resulting block of data after an input block of data has been processed.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: Reset

Reset

Resets the transform so a new set of data can begin to be processed.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: TransformBlock

TransformBlock

Processes a set of data, encrypting or decrypting it.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to be processed.
InputOffset
[ByVal] Long. The index to begin processing from.
InputCount
[ByVal] Long. The amount of data to be processed.
OutputBuffer
[ByRef] Byte. The buffer to place the processed data.
OutputOffset
[ByVal] Long. The index to begin placing the processed data.

Return Values

Long - The number of bytes that were processed.

Remarks

The InputCount must be an exact multiple of the InputBlockSize or an exception will be thrown.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelManagedTransform: TransformFinalBlock

TransformFinalBlock

Processes a set of data adding any padding needed to complete the process.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final data to be processed.
InputOffset
[ByVal] Long. The index to begin processing from.
InputCount
[ByVal] Long. The amount of data to be processed.

Return Values

Byte() - The final block of processed data.

Remarks

Once a final block has been processed, the transform is reset to begin transforming new data.

See Also

Project VBCorLib Overview | Class RijndaelManagedTransform Overview


RijndaelStatic

RijndaelStatic

Provides static methods associated with the Rijndael class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Returns an implementation of the Rijndael algorithm based on the name.


RijndaelStatic: Create

Create

Returns an implementation of the Rijndael algorithm based on the name.

 Public Function Create(
      Optional ByVal AlgName As String = "Rijndael" ) As Rijndael

Parameters

AlgName
[ByVal] Optional. String. The name of the specific implementation.

Default: "Rijndael"

Return Values

Rijndael - An implementation of the Rijndael alogrithm.

Remarks

If "Rijndael" or "RijndaelManaged" are passed in, then the default implementation RijndaelManaged is returned.

See Also

Project VBCorLib Overview | Class RijndaelStatic Overview


RIPEMD160

RIPEMD160

Provides a common interface to be implemented by all RIPEMD160 implementations.

See Also

Project VBCorLib Overview RIPEMD160Managed

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the RIPEMD160 implementation can be reused after a final transformation.
CanTransformMultipleBlocks (get) | Returns if an RIPEMD160 implementation can transform multiple blocks at a time.
Hash (get) | Returns the final hash value generated after performing the hashing algorithm.
HashSize (get) | Returns the size of the hash in bits.
InputBlockSize (get) | Returns the input block size used by the SHA-1 hash implementation.
OutputBlockSize (get) | Returns the output block size created by the SHA-1 hash implementation.

Methods:

Name | Description
Clear | Releases any resources used by the hash implementation.
ComputeHash | Computes the hash for a give source.
Equals | Returns if the value is equal to this object instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


RIPEMD160: CanReuseTransform (get)

CanReuseTransform

Returns if the RIPEMD160 implementation can be reused after a final transformation.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if an instance can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if an RIPEMD160 implementation can transform multiple blocks at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if an instance can transform multiple blocks at once, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: Clear

Clear

Releases any resources used by the hash implementation.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: ComputeHash

ComputeHash

Computes the hash for a give source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source to compute the hash for.
Index
[ByRef] Optional. Variant. The starting index in a byte array to begin computing the hash.
Count
[ByRef] Optional. Variant. The number of bytes to use to compute the hash.

Return Values

Byte() - A 20-byte array containing the computed hash.

Remarks

The Source can be either a byte-array or a Stream object.

If the source is a Stream object, then the hash continues to read the stream until no more data is can be read. The hash is computed from all data read from the stream.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: Equals

Equals

Returns if the value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the value and this instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: Hash (get)

Hash

Returns the final hash value generated after performing the hashing algorithm.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A 20 byte array representing the final hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: HashSize (get)

HashSize

Returns the size of the hash in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Returns 160 for RIPEMD160 hashes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: InputBlockSize (get)

InputBlockSize

Returns the input block size used by the SHA-1 hash implementation.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: OutputBlockSize (get)

OutputBlockSize

Returns the output block size created by the SHA-1 hash implementation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class RIPEMD160 Overview


RIPEMD160Managed

RIPEMD160Managed

Represents an implementation of the RIPEMD160 hashing algorithm.

Remarks

Details about the hash algorithm can be found here: http://homes.esat.kuleuven.be/~bosselae/ripemd160.html

See Also

Project VBCorLib Overview

Implements:

HashAlgorithm
ICryptoTransform
IHashAlgorithm
IObject
RIPEMD160

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


RIPEMD160Managed: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 20-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 20-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 160 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: IHashAlgorithm

IHashAlgorithm

 Implements IHashAlgorithm

Return Values

IHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: RIPEMD160

RIPEMD160

 Implements RIPEMD160

Return Values

RIPEMD160 -

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RIPEMD160Managed: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class RIPEMD160Managed Overview


RNGCryptoServiceProvider

RNGCryptoServiceProvider

Provides random number generation that is a bit more random than the regular Visual Basic method by using a Cryptographic Service Provider.

See Also

Project VBCorLib Overview

Implements:

IObject
RandomNumberGenerator

Public:

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetBytes | Fills an array of bytes with random values.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
GetNonZeroBytes | Fills an array of bytes with random values, with no zeros.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


RNGCryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: GetBytes

GetBytes

Fills an array of bytes with random values.

 Public Sub GetBytes(
      ByRef Data ( ) As Byte )

Parameters

Data
[ByRef] Byte. The byte array to be filled.

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: GetNonZeroBytes

GetNonZeroBytes

Fills an array of bytes with random values, with no zeros.

 Public Sub GetNonZeroBytes(
      ByRef Data ( ) As Byte )

Parameters

Data
[ByRef] Byte. The byte array to be filled.

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: RandomNumberGenerator

RandomNumberGenerator

 Implements RandomNumberGenerator

Return Values

RandomNumberGenerator -

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RNGCryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class RNGCryptoServiceProvider Overview


RSA

RSA

Represents the base interface from which all RSA class implementations must implement.

See Also

Project VBCorLib Overview RSACryptoServiceProvider

Public:

Properties:

Name | Description
KeyExchangeAlgorithm (get) | Returns the algorithm used for key exchange.
KeySize (get) | Returns the key size used by the RSA instance.
KeySize (let) | Sets the key size used by the current RSA instance.
LegalKeySizes (get) | Returns an array of KeySizes objects representing all the valid key sizes.
SignatureAlgorithm (get) | Returns the name of the signature algorithm used.

Methods:

Name | Description
Clear | Releases any resources used by the RSA instance.
DecryptValue | Decrypts an array of encrypted data, returning the plain text data.
EncryptValue | Encrypts an array of plain text data, returning the encrypted data.
Equals | Returns if the Value is equal this RSA instance.
ExportParameters | Exports the RSA key in an RSAParameters object.
FromXmlString | Initializes an RSA instance with an Xml representation of an RSA key.
GetHashCode | Returns a hash code identifying this object instance.
ImportParameters | Imports the RSA key from an RSAParameters object.
ToString | Returns a string representation of this object instance.
ToXmlString | Returns an Xml representation of the key for this RSA instance.


RSA: Clear

Clear

Releases any resources used by the RSA instance.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: DecryptValue

DecryptValue

Decrypts an array of encrypted data, returning the plain text data.

 Public Function DecryptValue(
      ByRef Rgb ( ) As Byte ) As Byte ( ) :

Parameters

Rgb
[ByRef] Byte. The encrypted data to be decrypted.

Return Values

Byte() - An array of plain text data.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: EncryptValue

EncryptValue

Encrypts an array of plain text data, returning the encrypted data.

 Public Function EncryptValue(
      ByRef Rgb ( ) As Byte ) As Byte ( ) :

Parameters

Rgb
[ByRef] Byte. The plain text data to be encrypted.

Return Values

Byte() - The encrypted data.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: Equals

Equals

Returns if the Value is equal this RSA instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to be tests for equality.

Return Values

Boolean - Returns True if the value is equal to this instance, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview | IObject


RSA: ExportParameters

ExportParameters

Exports the RSA key in an RSAParameters object.

 Public Function ExportParameters(
      ByVal IncludePrivateParameters As Boolean ) As RSAParameters

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portion of the key should be exported.

Return Values

RSAParameters - An RSAParameters object containing the RSA key.

Remarks

If the private portion is included, then another instance of an RSA implementation can use the key to encrypt values, otherwise, only enough information to decrypt is provided.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: FromXmlString

FromXmlString

Initializes an RSA instance with an Xml representation of an RSA key.

 Public Sub FromXmlString(
      ByVal XmlString As String )

Parameters

XmlString
[ByVal] String. The string to initialize the asymmetric algorithm with.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: GetHashCode

GetHashCode

Returns a hash code identifying this object instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A hash code.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview | IObject


RSA: ImportParameters

ImportParameters

Imports the RSA key from an RSAParameters object.

 Public Sub ImportParameters(
      ByVal Parameters As RSAParameters )

Parameters

Parameters
[ByVal] RSAParameters. The object to import the RSA key from.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: KeyExchangeAlgorithm (get)

KeyExchangeAlgorithm

Returns the algorithm used for key exchange.

 Public Property Get KeyExchangeAlgorithm ( ) As String

Return Values

String - The algorithm used for key exchange.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: KeySize (get)

KeySize

Returns the key size used by the RSA instance.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits used by the current instance.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: KeySize (let)

KeySize

Sets the key size used by the current RSA instance.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: LegalKeySizes (get)

LegalKeySizes

Returns an array of KeySizes objects representing all the valid key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - An array of KeySizes objects.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: SignatureAlgorithm (get)

SignatureAlgorithm

Returns the name of the signature algorithm used.

 Public Property Get SignatureAlgorithm ( ) As String

Return Values

String - The name of the signature algorithm.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RSA Overview


RSA: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - A string representation.

Remarks

See Also

Project VBCorLib Overview | Class RSA Overview | IObject.


RSA: ToXmlString

ToXmlString

Returns an Xml representation of the key for this RSA instance.

 Public Function ToXmlString(
      ByVal IncludePrivateParameters As Boolean ) As String

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portion of the key should be included in the Xml string.

Return Values

String - An Xml string representation of the RSA key.

Remarks

If the private portion is included, then another instance of an RSA implementation can use the key to encrypt values, otherwise, only enough information to decrypt is provided.

See Also

Project VBCorLib Overview | Class RSA Overview


RSACryptoServiceProvider

RSACryptoServiceProvider

Provides RSA encryption services using the Windows Crypto API methods.

See Also

Project VBCorLib Overview

Implements:

AsymmetricAlgorithm
ICspAsymmetricAlgorithm
IObject
RSA

Public:

Properties:

Name | Description
CspKeyContainerInfo (get) | Returns a CspKeyContainerInfo object containing information about this RSACryptoServiceProvider instance.
KeyExchangeAlgorithm (get) | Returns the name of the key exchange algorithm this instance represents.
KeySize (get) | Returns the RSA key size in bits.
KeySize (let) | Sets the key size.
LegalKeySizes (get) | Returns an array of KeySizes objects defining the valid key sizes.
PersistKeyInCsp (get) | Returns if the current key will be stored in the current provider container.
PersistKeyInCsp (let) | Sets if the current key will be stored in the current provider container.
PublicOnly (get) | Returns if the key for this RSA instance is only the public half of the key pair.
SignatureAlgorithm (get) | Returns the signature algorithm.

Methods:

Name | Description
Clear | Releases any resources and disposes the RSA instance.
Decrypt | Decrypts data using the private key in this RSA instance.
DecryptValue | Decrypts the value.
Encrypt | Encrypts data using the public key in this RSA instance.
EncryptValue | Encrypts a value.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
ExportCspBlob | Exports the key information as a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB structure.
ExportParameters | Exports the RSA algorithm parameters.
FromXmlString | Imports RSA parameters from an XML string.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ImportCspBlob | Imports a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB into the RSA provider.
ImportParameters | Imports the RSA key parameters.
SignData | Signs data using the specified hash algorithm.
SignHash | Signs a hash using RSA AT_SIGNATURE.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.
ToXmlString | Exports the RSA key to an Xml string.
VerifyData | Verifies the data using the signature.
VerifyHash | Verifies the hash using the signature.


RSACryptoServiceProvider: AsymmetricAlgorithm

AsymmetricAlgorithm

 Implements AsymmetricAlgorithm

Return Values

AsymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: Clear

Clear

Releases any resources and disposes the RSA instance.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: CspKeyContainerInfo (get)

CspKeyContainerInfo

Returns a CspKeyContainerInfo object containing information about this RSACryptoServiceProvider instance.

 Public Property Get CspKeyContainerInfo ( ) As CspKeyContainerInfo

Return Values

CspKeyContainerInfo - A CspKeyContainerInfo object.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: Decrypt

Decrypt

Decrypts data using the private key in this RSA instance.

 Public Function Decrypt(
      ByRef Rgb ( ) As Byte,
      ByVal fOAEP As Boolean ) As Byte ( )

Parameters

Rgb
[ByRef] Byte. The data to be decrypted.
fOAEP
[ByVal] Boolean. A flag indicating if the data was padded using OAEP padding.

Return Values

Byte() - Returns the decrypted data.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: DecryptValue

DecryptValue

Decrypts the value.

 Public Function DecryptValue(
      ByRef Rgb ( ) As Byte ) As Byte ( )

Parameters

Rgb
[ByRef] Byte. The value to be decrypted.

Return Values

Byte() - The decrypted value.

Remarks

In .NET this would throw a NotSupportedException, however, it is supported in VBCorLib. This is equivalen to calling Decrypt(Data, False).

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: Encrypt

Encrypt

Encrypts data using the public key in this RSA instance.

 Public Function Encrypt(
      ByRef Rgb ( ) As Byte,
      ByVal fOAEP As Boolean ) As Byte ( )

Parameters

Rgb
[ByRef] Byte. The data to be encrypted.
fOAEP
[ByVal] Boolean. A flag indicating if OAEP padding should be used, otherwise PKCS#1 v1.5 padding is used.

Return Values

Byte() -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: EncryptValue

EncryptValue

Encrypts a value.

 Public Function EncryptValue(
      ByRef Rgb ( ) As Byte ) As Byte ( )

Parameters

Rgb
[ByRef] Byte. The value to be encrypted.

Return Values

Byte() - The encrypted value.

Remarks

In .NET this would throw a NotSupportedException, however, it is supported in VBCorLib. This is equivalen to calling Encrypt(Data, False).

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ExportCspBlob

ExportCspBlob

Exports the key information as a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB structure.

 Public Function ExportCspBlob(
      ByVal IncludePrivateParameters As Boolean ) As Byte ( )

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if only the public key should be exported or is both the public and private keys should be exported.

Return Values

Byte() - An exported key blob structure.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ExportParameters

ExportParameters

Exports the RSA algorithm parameters.

 Public Function ExportParameters(
      ByVal IncludePrivateParameters As Boolean ) As RSAParameters

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if only the public key should be exported or is both the public and private keys should be exported.

Return Values

RSAParameters - An RSAParameters object containing the parameters of the RSA algorithms.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: FromXmlString

FromXmlString

Imports RSA parameters from an XML string.

 Public Sub FromXmlString(
      ByVal XmlString As String )

Parameters

XmlString
[ByVal] String. The string containing the XML formatted parameters.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ICspAsymmetricAlgorithm

ICspAsymmetricAlgorithm

 Implements ICspAsymmetricAlgorithm

Return Values

ICspAsymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ImportCspBlob

ImportCspBlob

Imports a CryptoAPI PRIVATEKEYBLOB or PUBLICKEYBLOB into the RSA provider.

 Public Sub ImportCspBlob(
      ByRef KeyBlob ( ) As Byte )

Parameters

KeyBlob
[ByRef] Byte. The blob key to be imported.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ImportParameters

ImportParameters

Imports the RSA key parameters.

 Public Sub ImportParameters(
      ByVal Parameters As RSAParameters )

Parameters

Parameters
[ByVal] RSAParameters. The parameters to be imported as the new key.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: KeyExchangeAlgorithm (get)

KeyExchangeAlgorithm

Returns the name of the key exchange algorithm this instance represents.

 Public Property Get KeyExchangeAlgorithm ( ) As String

Return Values

String - The name of the key exchange algorithm.

Remarks

When an RSACryptoServiceProvider is created as a key exchange instead of a signature service, this returns RSA-PKCS1-KeyEx', otherwise nothing is returned.

Read Only.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: KeySize (get)

KeySize

Returns the RSA key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits being used by this RSA instance.

Remarks

By default, the key size is 1024 for high encryption and 512 for base encryption providers.

Read/Write.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: KeySize (let)

KeySize

Sets the key size.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size.

Remarks

This property has no affect on the key size. To set the key size, use the Cor.NewRSACryptoServiceProvider constructor.

Read/Write.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: LegalKeySizes (get)

LegalKeySizes

Returns an array of KeySizes objects defining the valid key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - An array of KeySizes objects.

Remarks

For high encryption systems, the legal key sizes go from 384 bits to 16384 bits in steps of 8 bits. For base encryption systems, the key sizes go from 384 bits to 512 bits in steps of 8 bits.

Read Only.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: PersistKeyInCsp (get)

PersistKeyInCsp

Returns if the current key will be stored in the current provider container.

 Public Property Get PersistKeyInCsp ( ) As Boolean

Return Values

Boolean - Returns True if the key will be stored, False otherwise.

Remarks

By default this is set to False. If a container is specified using the Cor.NewRSACryptoServiceProvider, then this will be set to True.

A key is stored in the container to allow for each retrieval by any other service that knows where the key is. Only 1 key is stored in a container, therefore, if multiple providers share the same container, then the key may become invalid.

Read/Write.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: PersistKeyInCsp (let)

PersistKeyInCsp

Sets if the current key will be stored in the current provider container.

 Public Property Let PersistKeyInCsp(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Set to True to save the key on exit, False to have the key be deleted.

Remarks

By default this is set to False. If a container is specified using the Cor.NewRSACryptoServiceProvider, then this will be set to True.

A key is stored in the container to allow for each retrieval by any other service that knows where the key is. Only 1 key is stored in a container, therefore, if multiple providers share the same container, then the key may become invalid.

Read/Write.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: PublicOnly (get)

PublicOnly

Returns if the key for this RSA instance is only the public half of the key pair.

 Public Property Get PublicOnly ( ) As Boolean

Return Values

Boolean - Returns True if only the public half of the key is present, False otherwise.

Remarks

RSA uses a private/public key pair to encrypt and decrypt. Only the public part is required to encrypt data. The private key is used to decrypt data.

Read Only.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: RSA

RSA

 Implements RSA

Return Values

RSA -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: SignatureAlgorithm (get)

SignatureAlgorithm

Returns the signature algorithm.

 Public Property Get SignatureAlgorithm ( ) As String

Return Values

String - Always returns http://www.w3.org/2000/09/xmldsig#rsa-sha1'

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: SignData

SignData

Signs data using the specified hash algorithm.

 Public Function SignData(
      ByRef InputStreamOrBuffer As Variant,
      ByVal hAlg As Variant,
      Optional ByRef Offset As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

InputStreamOrBuffer
[ByRef] Variant. The data to be signed. This can be a Stream object or a Byte Array.
hAlg
[ByVal] Variant. The hash algorithm to use for signing. Only SHA1 and MD5 are supported.
Offset
[ByRef] Optional. Variant. The starting index of a Byte array input source. This is ignored for Stream input sources.
Count
[ByRef] Optional. Variant. The number of bytes of a Byte array input source to process. This is ignored for Stream input sources.

Return Values

Byte() - The signature of the data.

Remarks

The hash algorithms can be specified either by the OID string, the hash name, or an actual instance of a hash object that implements either the SHA1 or MD5 interface.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview | CryptoConfig | SHA1 | MD5 | SHA1CryptoServiceProvider | SHA1Manged | MD5CryptoServiceProvider


RSACryptoServiceProvider: SignHash

SignHash

Signs a hash using RSA AT_SIGNATURE.

 Public Function SignHash(
      ByRef RgbHash ( ) As Byte,
      ByVal Str As String ) As Byte ( )

Parameters

RgbHash
[ByRef] Byte. The hash value to be signed.
Str
[ByVal] String. The type of hash value being signed.

Return Values

Byte() - The signature for the hash data.

Remarks

Only SHA1 and MD5 hashes are supported.

The Str parameter can be "SHA", "SHA1", "MD5", or the OID.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview | CryptoConfig


RSACryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: ToXmlString

ToXmlString

Exports the RSA key to an Xml string.

 Public Function ToXmlString(
      ByVal IncludePrivateParameters As Boolean ) As String

Parameters

IncludePrivateParameters
[ByVal] Boolean. A flag indicating if the private portions of the key should be exported.

Return Values

String - An Xml representation of the RSA key.

Remarks

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview


RSACryptoServiceProvider: VerifyData

VerifyData

Verifies the data using the signature.

 Public Function VerifyData(
      ByRef Buffer ( ) As Byte,
      ByRef hAlg As Variant,
      ByRef Signature ( ) As Byte ) As Boolean

Parameters

Buffer
[ByRef] Byte. The data to be verified.
hAlg
[ByRef] Variant. The hash algorithm used to verify to the data. This is the same algorithm used to sign the data. Only SHA1 and MD5 are supported.
Signature
[ByRef] Byte. The signature used to ensure the data is valid.

Return Values

Boolean - Returns True if the data has a valid signature, False otherwise.

Remarks

The hash algorithms can be specified either by the OID string, the hash name, or an actual instance of a hash object that implements either the SHA1 or MD5 interface.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview | CryptoConfig | SHA1 | MD5 | SHA1CryptoServiceProvider | SHA1Manged | MD5CryptoServiceProvider


RSACryptoServiceProvider: VerifyHash

VerifyHash

Verifies the hash using the signature.

 Public Function VerifyHash(
      ByRef RgbHash ( ) As Byte,
      ByVal Str As String,
      ByRef Signature ( ) As Byte ) As Boolean

Parameters

RgbHash
[ByRef] Byte. The hash to be verified.
Str
[ByVal] String. The type of hash value being signed.
Signature
[ByRef] Byte. The signature for the hash data.

Return Values

Boolean - Returns True if the signature is correct, False otherwise.

Remarks

Only SHA1 and MD5 hashes are supported.

The Str parameter can be "SHA", "SHA1", "MD5", or the OID.

See Also

Project VBCorLib Overview | Class RSACryptoServiceProvider Overview | CryptoConfig


RSAParameters

RSAParameters

Represents the Key information for an RSA implementation.

Remarks

To learn more about RSAParameters, please visit this Shawnfa blog entry: http://blogs.msdn.com/shawnfa/archive/2005/11/17/493972.aspx

See Also

Project VBCorLib Overview

Implements:

IObject

Public:

Properties:

Name | Description
d (get) | Returns the D parameter of the RSA key.
d (let) | Sets the D parameter of the RSA key.
DP (get) | Returns the DP parameter of the key.
DP (let) | Sets the DP parameter of the key.
DQ (get) | Returns the DQ parameter of the key.
DQ (let) | Sets the DQ parameter of the key.
Exponent (get) | Returns the public exponent of the key.
Exponent (let) | Sets the public exponent of the key.
InverseQ (get) | Returns InverseQ parameter of the key.
InverseQ (let) | Sets the InverseQ parameter of the key
Modulus (get) | Returns the modulus of the key.
Modulus (let) | Sets the modulus of the key.
p (get) | Returns the P parameter of the key.
p (let) | Sets the P parameter of the key.
q (get) | Returns the Q parameter of the key.
q (let) | Sets the Q parameter of the key.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function. An override might be necessary if the hashcode should be derived from a value contained within the class.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides. A Person class may return the persons name instead.


RSAParameters: d (get)

d

Returns the D parameter of the RSA key.

 Public Property Get d ( ) As Byte ( )

Return Values

Byte() - A byte array of the D parameter.

Remarks

This is the Private Exponent of the RSA key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: d (let)

d

Sets the D parameter of the RSA key.

 Public Property Let d(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new D parameter value.

Remarks

This is the Private Exponent of the RSA key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: DP (get)

DP

Returns the DP parameter of the key.

 Public Property Get DP ( ) As Byte ( )

Return Values

Byte() - A byte array of the DP parameter.

Remarks

This is the Exponent1 value of the key. It has the numeric value "d mod (p - 1)".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: DP (let)

DP

Sets the DP parameter of the key.

 Public Property Let DP(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new DP value.

Remarks

This is the Exponent1 value of the key. It has the numeric value "d mod (p - 1)".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: DQ (get)

DQ

Returns the DQ parameter of the key.

 Public Property Get DQ ( ) As Byte ( )

Return Values

Byte() - A byte array of the DQ paramter

Remarks

This is the Exponent2 value of the key. It has the numeric value "d mod (q - 1)".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: DQ (let)

DQ

Sets the DQ parameter of the key.

 Public Property Let DQ(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new DQ value.

Remarks

This is the Exponent2 value of the key. It has the numeric value "d mod (q - 1)".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean -

Remarks

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: Exponent (get)

Exponent

Returns the public exponent of the key.

 Public Property Get Exponent ( ) As Byte ( )

Return Values

Byte() - A byte array of the public exponent.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: Exponent (let)

Exponent

Sets the public exponent of the key.

 Public Property Let Exponent(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new exponent value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

An override might be necessary if the hashcode should be derived from a value contained within the class.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: InverseQ (get)

InverseQ

Returns InverseQ parameter of the key.

 Public Property Get InverseQ ( ) As Byte ( )

Return Values

Byte() - A byte array of the InverseQ parameter.

Remarks

This is the Coefficient. It has a numeric value "(inverse of q) mod p".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: InverseQ (let)

InverseQ

Sets the InverseQ parameter of the key

 Public Property Let InverseQ(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new InverseQ value.

Remarks

This is the Coefficient. It has a numeric value "(inverse of q) mod p".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: Modulus (get)

Modulus

Returns the modulus of the key.

 Public Property Get Modulus ( ) As Byte ( )

Return Values

Byte() - A byte array of the modulus of the key.

Remarks

This has a value of "prime1 * prime2" and is often known as "n".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: Modulus (let)

Modulus

Sets the modulus of the key.

 Public Property Let Modulus(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new modulus value.

Remarks

This has a value of "prime1 * prime2" and is often known as "n".

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: p (get)

p

Returns the P parameter of the key.

 Public Property Get p ( ) As Byte ( )

Return Values

Byte() - A byte array of the P parameter.

Remarks

This is the Prime1 value of the key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: p (let)

p

Sets the P parameter of the key.

 Public Property Let p(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new P value.

Remarks

This is the Prime1 value of the key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: q (get)

q

Returns the Q parameter of the key.

 Public Property Get q ( ) As Byte ( )

Return Values

Byte() - A byte array of the Q value.

Remarks

This is the Prime2 value of the key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: q (let)

q

Sets the Q parameter of the key.

 Public Property Let q(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new Q value.

Remarks

This is the Prime2 value of the key.

Read/Write.

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAParameters: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

A Person class may return the persons name instead.

 Public Function ToString ( ) As String

Return Values

String -

Remarks

See Also

Project VBCorLib Overview | Class RSAParameters Overview


RSAStatic

RSAStatic

Represents methods associated with the RSA class.

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
KeyNumber |

Methods:

Name | Description
Create | Creates an implementation of an RSA class.


RSAStatic: Create

Create

Creates an implementation of an RSA class.

 Public Function Create(
      Optional ByVal AlgName As String = "RSA" ) As RSA

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to be created.

Default: "RSA"

Return Values

RSA - An implementation of an RSA algorithm.

Remarks

If a custom implementation is desired, then the stand method of . can be used to create it.

See Also

Project VBCorLib Overview | Class RSAStatic Overview | CryptoConfig. | RSA | RSACryptoServiceProvider


SecurityElement

SecurityElement

Provides simple XML text management capabilities.

Remarks

This class is primarily used to assist with the RSACryptoServiceProvider and DSACryptoServiceProvider classes when dealing with the keys as xml parameters. It is not meant for serious xml text manipulation.

See Also

Project VBCorLib Overview | SecurityElementStatic

Implements:

IObject

Public:

Properties:

Name | Description
Attributes (get) | Returns any attributes contained within the xml element.
Attributes (set) | Sets the attributes for this xml element.
Children (get) | Returns a list of child SecurityElement objects.
Children (set) | Sets the list of children SecurityElements for this element.
Tag (get) | Returns the tag name for this SecurityElement.
Tag (let) | Sets the tag name for this SecurityElement.
Text (get) | Returns the text between the opening and closing element tags.
Text (let) | Sets the text between the opening and closing element tags.

Methods:

Name | Description
AddAttribute | Adds an attribute to the set of attributes for this SecurityElement.
AddChild | Adds a new child to the SecurityElement.
Copy | Returns a copy of the SecurityElement object.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetAttribute | Searches for the specified attribute and returns the value or an empty string.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
SearchForChildByTag | Searches for a child element by tag name.
SearchForTextOfTag | Searches for the text of a child with the specified tag name.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.


SecurityElement: AddAttribute

AddAttribute

Adds an attribute to the set of attributes for this SecurityElement.

 Public Sub AddAttribute(
      ByVal Name As String,
      ByVal Value As String )

Parameters

Name
[ByVal] String. The name of the new attribute. This is case sensitive.
Value
[ByVal] String. The value of the new attribute.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: AddChild

AddChild

Adds a new child to the SecurityElement.

 Public Sub AddChild(
      ByVal Child As SecurityElement )

Parameters

Child
[ByVal] SecurityElement. The child to be added.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Attributes (get)

Attributes

Returns any attributes contained within the xml element.

 Public Property Get Attributes ( ) As Hashtable

Return Values

Hashtable - A IDictionary object containing key/value pairs of attributes or Nothing.

Remarks

The attribute names are case sensitive.

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Attributes (set)

Attributes

Sets the attributes for this xml element.

 Public Property Set Attributes(
      ByVal RHS As Hashtable )

Parameters

RHS
[ByVal] Hashtable. An IDictionary of key/value pairs as attributes.

Remarks

The attribute names and values are validated before the list is accepted.

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Children (get)

Children

Returns a list of child SecurityElement objects.

 Public Property Get Children ( ) As ArrayList

Return Values

ArrayList - A list of children objects or Nothing.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Children (set)

Children

Sets the list of children SecurityElements for this element.

 Public Property Set Children(
      ByVal RHS As ArrayList )

Parameters

RHS
[ByVal] ArrayList. The list of children to be set to this SecurityElement.

Remarks

DotNET doesnt seem to validate this list prior to setting it, so we wont bother to check either.

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Copy

Copy

Returns a copy of the SecurityElement object.

 Public Function Copy ( ) As SecurityElement

Return Values

SecurityElement - A copy of the object.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality.

Return Values

Boolean - Returns True if they are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: GetAttribute

GetAttribute

Searches for the specified attribute and returns the value or an empty string.

 Public Function GetAttribute(
      ByVal Name As String ) As String

Parameters

Name
[ByVal] String. The name of the attribute to retrieve.

Return Values

String - Returns the attribute value or an empty string if not found.

Remarks

I so detest the underscore. It was either that or use an abbreviated version of the word such as Attr.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns an integer.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: SearchForChildByTag

SearchForChildByTag

Searches for a child element by tag name.

 Public Function SearchForChildByTag(
      ByVal Tag As String ) As SecurityElement

Parameters

Tag
[ByVal] String. The tag name of the child element.

Return Values

SecurityElement - Returns the child element if found, or Nothing if not.

Remarks

Only the first level of children for this instance are searched, no grandchildren are searched.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: SearchForTextOfTag

SearchForTextOfTag

Searches for the text of a child with the specified tag name.

 Public Function SearchForTextOfTag(
      ByVal Tag As String ) As String

Parameters

Tag
[ByVal] String. The tag name of the child being searched for.

Return Values

String - Returns the text for the found child, or an empty string if not found.

Remarks

Only the first level of children for this instance are searched, no grandchildren are searched.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Tag (get)

Tag

Returns the tag name for this SecurityElement.

 Public Property Get Tag ( ) As String

Return Values

String - The tag name for this SecurityElement.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Tag (let)

Tag

Sets the tag name for this SecurityElement.

 Public Property Let Tag(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new tag name.

Remarks

The tag is validated prior to setting.

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Text (get)

Text

Returns the text between the opening and closing element tags.

 Public Property Get Text ( ) As String

Return Values

String - The element text.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: Text (let)

Text

Sets the text between the opening and closing element tags.

 Public Property Let Text(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new element text.

Remarks

The text is validated prior to being set.

Read/Write.

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElement: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElement Overview


SecurityElementStatic

SecurityElementStatic

Provides static functions associated to the SecurityElement class.

See Also

Project VBCorLib Overview SecurityElement

Public:

Methods:

Name | Description
Escape | Replaces the set of invalid XML characters in a string to their xml representations.
FromString | Creates a SecurityElement from an XML string.
IsValidAttributeName | Determines if an attribute name if valid.
IsValidAttributeValue | Determines if an attribute value is valid.
IsValidTag | Determines if a tag name is valid.
IsValidText | Determines if an XML text is valid.


SecurityElementStatic: Escape

Escape

Replaces the set of invalid XML characters in a string to their xml representations.

 Public Function Escape(
      ByVal Text As String ) As String

Parameters

Text
[ByVal] String. The text containing the invalid XML characters.

Return Values

String - The text with the valid XML representation.

Remarks

This replaces the following characters:

 "&" = &
 "<" = <
 ">" = >
 Double Quote = "
 Single Quote = '

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SecurityElementStatic: FromString

FromString

Creates a SecurityElement from an XML string.

 Public Function FromString(
      ByVal Xml As String ) As SecurityElement

Parameters

Xml
[ByVal] String. The string to parse into a SecurityElement.

Return Values

SecurityElement - A SecurityElement representation of the XML string.

Remarks

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SecurityElementStatic: IsValidAttributeName

IsValidAttributeName

Determines if an attribute name if valid.

 Public Function IsValidAttributeName(
      ByVal Name As String ) As Boolean

Parameters

Name
[ByVal] String. The name of the attribute to test.

Return Values

Boolean - Returns True if the attribute name is valid, False otherwise.

Remarks

The name if not valid if it contains any of the following: "<", ">", or a space.

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SecurityElementStatic: IsValidAttributeValue

IsValidAttributeValue

Determines if an attribute value is valid.

 Public Function IsValidAttributeValue(
      ByVal Value As String ) As Boolean

Parameters

Value
[ByVal] String. The attribute value to test.

Return Values

Boolean - Returns True if the value is valid, False otherwise.

Remarks

The value is not valid if it contains any of the following: "<", ">".

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SecurityElementStatic: IsValidTag

IsValidTag

Determines if a tag name is valid.

 Public Function IsValidTag(
      ByVal Tag As String ) As Boolean

Parameters

Tag
[ByVal] String. The tag to be tested.

Return Values

Boolean - Returns True if the tag is valid, False otherwise.

Remarks

A tag is not valid if it contains any of the following: "<", ">", or a space.

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SecurityElementStatic: IsValidText

IsValidText

Determines if an XML text is valid.

 Public Function IsValidText(
      ByVal Text As String ) As Boolean

Parameters

Text
[ByVal] String. The text to be tested.

Return Values

Boolean - Returns True if the text is valid, False otherwise.

Remarks

The text is not valid if it contains any of the following: "<", ">".

See Also

Project VBCorLib Overview | Class SecurityElementStatic Overview


SerializationException

SerializationException

This exception is thrown when an error occurs reading or writing a propertybag and a value cannot be serialized.

See Also

Project VBCorLib Overview

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


SerializationException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview | Exception


SerializationException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview | Exception


SerializationException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class SerializationException Overview


SerializationException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class SerializationException Overview


SHA1

SHA1

Represents a standard interface for SHA-1 class implementations.

See Also

Project VBCorLib Overview SHA1CryptoServiceProvider | SHA1Managed

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the SHA-1 implementation can be reused after a final transformation.
CanTransformMultipleBlocks (get) | Returns if an SHA-1 implementation can transform multiple blocks at a time.
Hash (get) | Returns the final hash value generated after performing the hashing algorithm.
HashSize (get) | Returns the size of the hash in bits.
InputBlockSize (get) | Returns the input block size used by the SHA-1 hash implementation.
OutputBlockSize (get) | Returns the output block size created by the SHA-1 hash implementation.

Methods:

Name | Description
Clear | Releases any resources used by the hash implementation.
ComputeHash | Computes the hash for a give source.
Equals | Returns if the value is equal to this object instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA1: CanReuseTransform (get)

CanReuseTransform

Returns if the SHA-1 implementation can be reused after a final transformation.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if an instance can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if an SHA-1 implementation can transform multiple blocks at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if an instance can transform multiple blocks at once, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: Clear

Clear

Releases any resources used by the hash implementation.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: ComputeHash

ComputeHash

Computes the hash for a give source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source to compute the hash for.
Index
[ByRef] Optional. Variant. The starting index in a byte array to begin computing the hash.
Count
[ByRef] Optional. Variant. The number of bytes to use to compute the hash.

Return Values

Byte() - A 20-byte array containing the computed hash.

Remarks

The Source can be either a byte-array or a Stream object.

If the source is a Stream object, then the hash continues to read the stream until no more data is can be read. The hash is computed from all data read from the stream.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: Equals

Equals

Returns if the value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the value and this instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: Hash (get)

Hash

Returns the final hash value generated after performing the hashing algorithm.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A 20 byte array representing the final hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: HashSize (get)

HashSize

Returns the size of the hash in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Returns 160 for SHA-1 hashes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: InputBlockSize (get)

InputBlockSize

Returns the input block size used by the SHA-1 hash implementation.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: OutputBlockSize (get)

OutputBlockSize

Returns the output block size created by the SHA-1 hash implementation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA1 Overview


SHA1CryptoServiceProvider

SHA1CryptoServiceProvider

Provides services to compute the SHA-1 hash values of data.

Remarks

This uses the CryptoAPI version of the algorithm.

See Also

Project VBCorLib Overview | SHA1 | SHA1Managed | SHA1Static | HashAlgorithm

Implements:

HashAlgorithm
ICryptoTransform
IObject
SHA1

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the input block size this transform can work on.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA1CryptoServiceProvider: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 20-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 20-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 160 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: InputBlockSize (get)

InputBlockSize

Returns the input block size this transform can work on.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: SHA1

SHA1

 Implements SHA1

Return Values

SHA1 -

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1CryptoServiceProvider: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA1CryptoServiceProvider Overview


SHA1Managed

SHA1Managed

Provides services to compute the SHA-1 hash value.

Remarks

The SHA-1 algorithm is implemented in Visual Basic.

Details can be found at http://csrc.nist.gov/CryptoToolkit/tkhash.html

See Also

Project VBCorLib Overview | SHA1CryptoServiceProvider | SHA1 | SHA1Static | HashAlgorithm

Implements:

HashAlgorithm
ICryptoTransform
IHashAlgorithm
IObject
SHA1

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the size of the input block size allowed.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA1Managed: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 20-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 20-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 160 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: IHashAlgorithm

IHashAlgorithm

 Implements IHashAlgorithm

Return Values

IHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: InputBlockSize (get)

InputBlockSize

Returns the size of the input block size allowed.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: SHA1

SHA1

 Implements SHA1

Return Values

SHA1 -

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Managed: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA1Managed Overview


SHA1Static

SHA1Static

Provides methods specific to the SHA-1 class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates a new instance of the SHA-1 algorithm using the specified implementation.


SHA1Static: Create

Create

Creates a new instance of the SHA-1 algorithm using the specified implementation.

 Public Function Create(
      Optional ByVal AlgName As String = "SHA1" ) As SHA1

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to create.

Default: "SHA1"

Return Values

SHA1 - A new implementation of the SHA-1 algorithm.

Remarks

If no name is specified, then a new SHA1CryptoServiceProvider instance will be created.

See Also

Project VBCorLib Overview | Class SHA1Static Overview


SHA256

SHA256

Represents a standard interface for SHA-256 class implementations.

See Also

Project VBCorLib Overview SHA256Managed

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the SHA-256 implementation can be reused after a final transformation.
CanTransformMultipleBlocks (get) | Returns if an SHA-256 implementation can transform multiple blocks at a time.
Hash (get) | Returns the final hash value generated after performing the hashing algorithm.
HashSize (get) | Returns the size of the hash in bits.
InputBlockSize (get) | Returns the input block size used by the SHA-1 hash implementation.
OutputBlockSize (get) | Returns the output block size created by the SHA-1 hash implementation.

Methods:

Name | Description
Clear | Releases any resources used by the hash implementation.
ComputeHash | Computes the hash for a give source.
Equals | Returns if the value is equal to this object instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA256: CanReuseTransform (get)

CanReuseTransform

Returns if the SHA-256 implementation can be reused after a final transformation.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if an instance can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if an SHA-256 implementation can transform multiple blocks at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if an instance can transform multiple blocks at once, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: Clear

Clear

Releases any resources used by the hash implementation.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: ComputeHash

ComputeHash

Computes the hash for a give source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source to compute the hash for.
Index
[ByRef] Optional. Variant. The starting index in a byte array to begin computing the hash.
Count
[ByRef] Optional. Variant. The number of bytes to use to compute the hash.

Return Values

Byte() - A 32-byte array containing the computed hash.

Remarks

The Source can be either a byte-array or a Stream object.

If the source is a Stream object, then the hash continues to read the stream until no more data is can be read. The hash is computed from all data read from the stream.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: Equals

Equals

Returns if the value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the value and this instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: Hash (get)

Hash

Returns the final hash value generated after performing the hashing algorithm.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A 32 byte array representing the final hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: HashSize (get)

HashSize

Returns the size of the hash in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Returns 256 for SHA-256 hashes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: InputBlockSize (get)

InputBlockSize

Returns the input block size used by the SHA-1 hash implementation.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: OutputBlockSize (get)

OutputBlockSize

Returns the output block size created by the SHA-1 hash implementation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA256 Overview


SHA256Managed

SHA256Managed

Provides services to compute the SHA-256 hash value.

Remarks

The SHA-256 algorithm is implemented in Visual Basic.

Details can be found at http://csrc.nist.gov/CryptoToolkit/tkhash.html

See Also

Project VBCorLib Overview | HashAlgorithm

Implements:

HashAlgorithm
ICryptoTransform
IHashAlgorithm
IObject
SHA256

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the input block size this transform can work on.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA256Managed: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 32-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 32-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 256 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: IHashAlgorithm

IHashAlgorithm

 Implements IHashAlgorithm

Return Values

IHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: InputBlockSize (get)

InputBlockSize

Returns the input block size this transform can work on.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: SHA256

SHA256

 Implements SHA256

Return Values

SHA256 -

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Managed: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA256Managed Overview


SHA256Static

SHA256Static

Provides methods associated with the SHA-256 class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates a new instance of an SHA-256 implementation.


SHA256Static: Create

Create

Creates a new instance of an SHA-256 implementation.

 Public Function Create(
      Optional ByVal AlgName As String = "SHA256" ) As SHA256

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to create an instance of.

Default: "SHA256"

Return Values

SHA256 - A new SHA-256 compatible implementation.

Remarks

If not name is given, then a new SHA256Managed is returned.

See Also

Project VBCorLib Overview | Class SHA256Static Overview


SHA384

SHA384

Represents a standard interface for SHA-384 class implementations.

See Also

Project VBCorLib Overview SHA384Managed

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the SHA-384 implementation can be reused after a final transformation.
CanTransformMultipleBlocks (get) | Returns if an SHA-384 implementation can transform multiple blocks at a time.
Hash (get) | Returns the final hash value generated after performing the hashing algorithm.
HashSize (get) | Returns the size of the hash in bits.
InputBlockSize (get) | Returns the input block size used by the SHA-1 hash implementation.
OutputBlockSize (get) | Returns the output block size created by the SHA-1 hash implementation.

Methods:

Name | Description
Clear | Releases any resources used by the hash implementation.
ComputeHash | Computes the hash for a give source.
Equals | Returns if the value is equal to this object instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA384: CanReuseTransform (get)

CanReuseTransform

Returns if the SHA-384 implementation can be reused after a final transformation.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if an instance can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if an SHA-384 implementation can transform multiple blocks at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if an instance can transform multiple blocks at once, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: Clear

Clear

Releases any resources used by the hash implementation.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: ComputeHash

ComputeHash

Computes the hash for a give source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source to compute the hash for.
Index
[ByRef] Optional. Variant. The starting index in a byte array to begin computing the hash.
Count
[ByRef] Optional. Variant. The number of bytes to use to compute the hash.

Return Values

Byte() - A 48-byte array containing the computed hash.

Remarks

The Source can be either a byte-array or a Stream object.

If the source is a Stream object, then the hash continues to read the stream until no more data is can be read. The hash is computed from all data read from the stream.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: Equals

Equals

Returns if the value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the value and this instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: Hash (get)

Hash

Returns the final hash value generated after performing the hashing algorithm.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A 48 byte array representing the final hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: HashSize (get)

HashSize

Returns the size of the hash in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Returns 384 for SHA-384 hashes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: InputBlockSize (get)

InputBlockSize

Returns the input block size used by the SHA-1 hash implementation.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: OutputBlockSize (get)

OutputBlockSize

Returns the output block size created by the SHA-1 hash implementation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA384 Overview


SHA384Managed

SHA384Managed

Provides services to compute the SHA-384 hash value.

Remarks

The SHA-384 algorithm is implemented in Visual Basic.

Details can be found at http://csrc.nist.gov/CryptoToolkit/tkhash.html

See Also

Project VBCorLib Overview | HashAlgorithm

Implements:

HashAlgorithm
ICryptoTransform
IObject
SHA384

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the input block size this transform can work on.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA384Managed: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 48-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 48-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 384 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: InputBlockSize (get)

InputBlockSize

Returns the input block size this transform can work on.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: SHA384

SHA384

 Implements SHA384

Return Values

SHA384 -

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Managed: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA384Managed Overview


SHA384Static

SHA384Static

Provides methods associated with the SHA-384 class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates a new instance of an SHA-384 implementation.


SHA384Static: Create

Create

Creates a new instance of an SHA-384 implementation.

 Public Function Create(
      Optional ByVal AlgName As String = "SHA384" ) As SHA384

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to create an instance of.

Default: "SHA384"

Return Values

SHA384 - A new SHA-384 compatible implementation.

Remarks

If not name is given, then a new SHA384Managed is returned.

See Also

Project VBCorLib Overview | Class SHA384Static Overview


SHA512

SHA512

Represents a standard interface for SHA-512 class implementations.

See Also

Project VBCorLib Overview SHA512Managed

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if the SHA-512 implementation can be reused after a final transformation.
CanTransformMultipleBlocks (get) | Returns if an SHA-512 implementation can transform multiple blocks at a time.
Hash (get) | Returns the final hash value generated after performing the hashing algorithm.
HashSize (get) | Returns the size of the hash in bits.
InputBlockSize (get) | Returns the input block size used by the SHA-1 hash implementation.
OutputBlockSize (get) | Returns the output block size created by the SHA-1 hash implementation.

Methods:

Name | Description
Clear | Releases any resources used by the hash implementation.
ComputeHash | Computes the hash for a give source.
Equals | Returns if the value is equal to this object instance.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA512: CanReuseTransform (get)

CanReuseTransform

Returns if the SHA-512 implementation can be reused after a final transformation.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if an instance can be reused, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if an SHA-512 implementation can transform multiple blocks at a time.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if an instance can transform multiple blocks at once, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: Clear

Clear

Releases any resources used by the hash implementation.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: ComputeHash

ComputeHash

Computes the hash for a give source.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( ) :

Parameters

Source
[ByRef] Variant. The source to compute the hash for.
Index
[ByRef] Optional. Variant. The starting index in a byte array to begin computing the hash.
Count
[ByRef] Optional. Variant. The number of bytes to use to compute the hash.

Return Values

Byte() - A 64-byte array containing the computed hash.

Remarks

The Source can be either a byte-array or a Stream object.

If the source is a Stream object, then the hash continues to read the stream until no more data is can be read. The hash is computed from all data read from the stream.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: Equals

Equals

Returns if the value is equal to this object instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the value and this instance are equal, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: Hash (get)

Hash

Returns the final hash value generated after performing the hashing algorithm.

 Public Property Get Hash ( ) As Byte ( ) :

Return Values

Byte() - A 64 byte array representing the final hash.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: HashSize (get)

HashSize

Returns the size of the hash in bits.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Returns 512 for SHA-512 hashes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: InputBlockSize (get)

InputBlockSize

Returns the input block size used by the SHA-1 hash implementation.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: OutputBlockSize (get)

OutputBlockSize

Returns the output block size created by the SHA-1 hash implementation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Returns the block size in bytes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( ) :

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA512 Overview


SHA512Managed

SHA512Managed

Provides services to compute the SHA-512 hash value.

Remarks

The SHA-512 algorithm is implemented in Visual Basic.

Details can be found at http://csrc.nist.gov/CryptoToolkit/tkhash.html

See Also

Project VBCorLib Overview | HashAlgorithm

Implements:

HashAlgorithm
ICryptoTransform
IHashAlgorithm
IObject
SHA512

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this service provider can be reused to transfrom more data.
CanTransformMultipleBlocks (get) | Returns if this transform can operate on multiple blocks at once.
Hash (get) | Returns the computed hash.
HashSize (get) | Returns the size of the computed hash.
InputBlockSize (get) | Returns the input block size this transform can work on.
OutputBlockSize (get) | Returns the output block size this transform can produce.

Methods:

Name | Description
Clear | Releases any resources.
ComputeHash | Computes a hash value for a source in a single pass.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
Initialize | Resets the hashing algorithm to start again.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Computes the hash for the specified block of data.
TransformFinalBlock | Computes the final hash value.


SHA512Managed: CanReuseTransform (get)

CanReuseTransform

Returns if this service provider can be reused to transfrom more data.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can operate on multiple blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Always returns True.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: Clear

Clear

Releases any resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: ComputeHash

ComputeHash

Computes a hash value for a source in a single pass.

 Public Function ComputeHash(
      ByRef Source As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Source
[ByRef] Variant. This can be either a Byte array or any Stream compatible object.
Index
[ByRef] Optional. Variant. The starting index in the Byte array. This is ignored for Stream objects.
Count
[ByRef] Optional. Variant. The number of bytes in the array to be computed. This is ignored for Stream objects.

Return Values

Byte() - A 64-byte hash value.

Remarks

If a Stream object is passed in, then the stream is continuously read and the hash calculated until there is no more data left to read from the stream.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: Hash (get)

Hash

Returns the computed hash.

 Public Property Get Hash ( ) As Byte ( )

Return Values

Byte() - A 64-byte array containing the hash value.

Remarks

The TransformFinalBlock must be called before accessing this property or an InvalidOperationException will be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: HashAlgorithm

HashAlgorithm

 Implements HashAlgorithm

Return Values

HashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: HashSize (get)

HashSize

Returns the size of the computed hash.

 Public Property Get HashSize ( ) As Long

Return Values

Long - Always returns 512 bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: IHashAlgorithm

IHashAlgorithm

 Implements IHashAlgorithm

Return Values

IHashAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: Initialize

Initialize

Resets the hashing algorithm to start again.

 Public Sub Initialize ( )

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: InputBlockSize (get)

InputBlockSize

Returns the input block size this transform can work on.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: OutputBlockSize (get)

OutputBlockSize

Returns the output block size this transform can produce.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - Always returns 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: SHA512

SHA512

 Implements SHA512

Return Values

SHA512 -

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: TransformBlock

TransformBlock

Computes the hash for the specified block of data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. The data to compute the hash from.
InputOffset
[ByVal] Long. The starting index in the input data to compute the hash.
InputCount
[ByVal] Long. The number of bytes to compute the hash from.
OutputBuffer
[ByRef] Byte. The array to place the input buffer bytes in.
OutputOffset
[ByVal] Long. The starting index to beging copying the bytes to.

Return Values

Long - The number of bytes processed.

Remarks

The OutputBuffer will contain the same data as the InputBuffer. No hash values are placed in the OutputBuffer.

If the OutputBuffer is a Null Array, or is the same array as the InputBuffer and the OutputOffset equals the InputOffset, then nothing is copied, however, the hash is still computed on the InputBuffer data.

The TransformFinalBlock needs to be called to finish computing the hash, this method alone cannot compute the entire hash.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Managed: TransformFinalBlock

TransformFinalBlock

Computes the final hash value.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. The final block of data to compute the hash for.
InputOffset
[ByVal] Long. The index in the InputBuffer to begin computing data.
InputCount
[ByVal] Long. The number of bytes to be processed.

Return Values

Byte() - Returns the section of the InputBuffer that was processed.

Remarks

This does not return the computed hash value. A copy of the data that was process is returned. To retrieve the hash value, call the Hash property.

See Also

Project VBCorLib Overview | Class SHA512Managed Overview


SHA512Static

SHA512Static

Provides methods associated with the SHA-512 class.

See Also

Project VBCorLib Overview

Public:

Methods:

Name | Description
Create | Creates a new instance of an SHA-512 implementation.


SHA512Static: Create

Create

Creates a new instance of an SHA-512 implementation.

 Public Function Create(
      Optional ByVal AlgName As String = "SHA512" ) As SHA512

Parameters

AlgName
[ByVal] Optional. String. The name of the implementation to create an instance of.

Default: "SHA512"

Return Values

SHA512 - A new SHA-512 compatible implementation.

Remarks

If not name is given, then a new SHA512Managed is returned.

See Also

Project VBCorLib Overview | Class SHA512Static Overview


SortedList

SortedList

Provides a means to maintain a list of sorted items based on an associated key.

Remarks

The SortedList maintains sort order for every key/value pair added to the list. The list is expanded as needed with the addition of new items. If a key already exists in the list, an exception is thrown.

See Also

Project VBCorLib Overview | Constructors | IDictionary | ICollection | IEnumerable

Implements:

ICollection
IDictionary
IEnumerable
IObject

Public:

Properties:

Name | Description
Capacity (get) | Returns the size of the underlying array.
Capacity (let) | Sets the size of the underlying array.
Count (get) | Returns the number of items in the list.
IsFixedSize (get) | Returns if the list can change in size or not.
IsReadOnly (get) | Returns if the list can be modified in any way.
Item (get) | Returns the value associated with the given key.
Item (let) | Sets a value to a key.
Item (set) | Sets a value to a key.
Keys (get) | Returns the keys in the sorted list.
Values (get) | Returns a list of the values in the list.

Methods:

Name | Description
Add | Adds a key/value pair to the list.
Clear | Removes all of the items from the list.
Clone | Returns a cloned version of this instance.
Contains | Searches the list to determine if the key is contained in the list.
ContainsKey | Searches the list to determine if the key is contained in the list.
ContainsValue | Searches the list to determine if the value is contained in the list.
CopyTo | Creates a DictionaryEntry for each Key/Value pair and places it in the array.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByIndex | Retrieves a value in the list by an index.
GetEnumerator | Returns an enumerator that can be used to iterate through the key/value pairs.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetKey | Returns the key at the specified index in the list.
GetKeyList | Returns a ReadOnly IList object that is used to access the keys in the list.
GetValueList | Returns a ReadOnly IList object that is used to access the values in the list.
IndexOfKey | Searches for a key in the list and returns the index it was found.
IndexOfValue | Searches for a value in the list and returns the index it was found.
Remove | Removes a key/value pair based on the key.
RemoveAt | Removes a key/value pair at a specific index in the list.
SetByIndex | Sets the value at a specific index in the list.
ToString | Returns a string representation of this object instance.
TrimToSize | Sets the capacity to the number of items in the list.


SortedList: Add

Add

Adds a key/value pair to the list.

 Public Sub Add(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The value to used to maintain a sorted order.
Value
[ByRef] Variant. The value associated with the key.

Remarks

key must be unique.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Capacity (get)

Capacity

Returns the size of the underlying array.

 Public Property Get Capacity ( ) As Long

Return Values

Long - The number of elements the underlying array can hold before needing to be resized.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Capacity (let)

Capacity

Sets the size of the underlying array.

 Public Property Let Capacity(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of elements the underlying array can contain before it needs to be resized.

Remarks

If the capacity is set less than the number of items in the array, an ArgumentOutOfRangeException exception will be thrown.

Read/Write.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Clear

Clear

Removes all of the items from the list.

 Public Sub Clear ( )

Remarks

The Count is set to 0, but the capacity remains unchanged.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Clone

Clone

Returns a cloned version of this instance.

 Public Function Clone ( ) As SortedList

Return Values

SortedList -

Remarks

Reference types are not cloned. If there are object types in the list, then a new reference to the object is created, but the object itself is not cloned.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Contains

Contains

Searches the list to determine if the key is contained in the list.

 Public Function Contains(
      ByRef Key As Variant ) As Boolean

Parameters

Key
[ByRef] Variant. The key to check if exists in the list.

Return Values

Boolean - Indication of the key existing in the list.

Remarks

Internally this function calls ContainsKey.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: ContainsKey

ContainsKey

Searches the list to determine if the key is contained in the list.

 Public Function ContainsKey(
      ByRef Key As Variant ) As Boolean

Parameters

Key
[ByRef] Variant. The key to check if exists in the list.

Return Values

Boolean - Indication of the key existing in the list.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: ContainsValue

ContainsValue

Searches the list to determine if the value is contained in the list.

 Public Function ContainsValue(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer ) As Boolean

Parameters

Value
[ByRef] Variant. The value to search for in the list.
Comparer
[ByVal] Optional. IComparer. A user-supplied IComparer object to perform special comparisons as necessary.

Return Values

Boolean - Indication of the value being found in the list.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: CopyTo

CopyTo

Creates a DictionaryEntry for each Key/Value pair and places it in the array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      ByVal Index As Long )

Parameters

DstArray
[ByRef] Variant. The array to copy the DictionaryEntry objects to.
Index
[ByVal] Long. The starting index in dstArray to begin copying to.

Remarks

Since DictionaryEntry objects are being stored in the array, the array must be able to accept that type of object.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Count (get)

Count

Returns the number of items in the list.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of items in the list.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetByIndex

GetByIndex

Retrieves a value in the list by an index.

 Public Function GetByIndex(
      ByVal Index As Long ) As Variant

Parameters

Index
[ByVal] Long. The index into the list from which to retrieve the value.

Return Values

Variant - The value at the specified index in the list.

Remarks

Since the list maintains sort order with each addition and removal of a key/value pair, there is no garauntee the same value will be returned by the same index in future calls.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetEnumerator

GetEnumerator

Returns an enumerator that can be used to iterate through the key/value pairs.

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - An IEnumerator object to be use for iterating the key/value pairs.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetKey

GetKey

Returns the key at the specified index in the list.

 Public Function GetKey(
      ByVal Index As Long ) As Variant

Parameters

Index
[ByVal] Long. The index into the list from which to retrieve the key.

Return Values

Variant - The key at the specified index.

Remarks

Since the list maintains sort order, when an item is added or removed, there is no garauntee that the same key will be found at the same index in future calls.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetKeyList

GetKeyList

Returns a ReadOnly IList object that is used to access the keys in the list.

 Public Function GetKeyList ( ) As IList

Return Values

IList - An IList object containing the keys in the list.

Remarks

The IList object maintains a reference to the original sorted list. It will reflect any changes in the sorted list.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: GetValueList

GetValueList

Returns a ReadOnly IList object that is used to access the values in the list.

 Public Function GetValueList ( ) As IList

Return Values

IList - An IList object used to access the values in the list.

Remarks

The IList object maintains a reference to the original sorted list. Any changes in the sorted list will be reflected in the IList object.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IDictionary

IDictionary

 Implements IDictionary

Return Values

IDictionary -

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IndexOfKey

IndexOfKey

Searches for a key in the list and returns the index it was found.

 Public Function IndexOfKey(
      ByRef Key As Variant ) As Long

Parameters

Key
[ByRef] Variant. The key to find the index of.

Return Values

Long - The index for the specified key. If a -1 is returned, then the key was not found in the list.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IndexOfValue

IndexOfValue

Searches for a value in the list and returns the index it was found.

 Public Function IndexOfValue(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer ) As Long

Parameters

Value
[ByRef] Variant. The value to search for.
Comparer
[ByVal] Optional. IComparer. A user-supplied comparer for special comparison, especially for user-defined types.

Return Values

Long - The index the value was found, or a -1 if the value was not found.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IsFixedSize (get)

IsFixedSize

Returns if the list can change in size or not.

 Public Property Get IsFixedSize ( ) As Boolean

Return Values

Boolean - Indication if the list is fixed or not.

Remarks

Fixed size means items cannot be added or removed from the list. It does not prevent the existing items from being modified.

Read Only.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: IsReadOnly (get)

IsReadOnly

Returns if the list can be modified in any way.

 Public Property Get IsReadOnly ( ) As Boolean

Return Values

Boolean - Indication if the list can be modified.

Remarks

A ReadOnly list cannot have items added or removed, nor can the existing items be altered. This does not mean properties on objects in the list are prohibited.

Read Only.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Item (get)

Item

Returns the value associated with the given key.

 Public Property Get Item(
      ByRef Key As Variant ) As Variant

Parameters

Key
[ByRef] Variant. The key of the value to be returned.

Return Values

Variant - The value associated with the key.

Remarks

If the key was not found, then Empty is returned.

Read/Write.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Item (let)

Item

Sets a value to a key.

 Public Property Let Item(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The key to associate the value with.
Value
[ByRef] Variant. The value to be associated to the key.

Remarks

If the key already exists in the list, then that value is replaced with the new value. If the key does not exist, then it is added with the associated value.

Read/Write.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Item (set)

Item

Sets a value to a key.

 Public Property Set Item(
      ByRef Key As Variant,
      ByRef Value As Variant )

Parameters

Key
[ByRef] Variant. The key to associate the value with.
Value
[ByRef] Variant. The value to be associated to the key.

Remarks

If the key already exists in the list, then that value is replaced with the new value. If the key does not exist, then it is added with the associated value.

Read/Write.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Keys (get)

Keys

Returns the keys in the sorted list.

 Public Property Get Keys ( ) As ICollection

Return Values

ICollection - An ICollection object containing the keys.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Remove

Remove

Removes a key/value pair based on the key.

 Public Sub Remove(
      ByRef Key As Variant )

Parameters

Key
[ByRef] Variant. The key used to find the value to be removed.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: RemoveAt

RemoveAt

Removes a key/value pair at a specific index in the list.

 Public Sub RemoveAt(
      ByVal Index As Long )

Parameters

Index
[ByVal] Long. The index of the key/value pair to be removed.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: SetByIndex

SetByIndex

Sets the value at a specific index in the list.

 Public Sub SetByIndex(
      ByVal Index As Long,
      ByRef Value As Variant )

Parameters

Index
[ByVal] Long. The index at which to set the value.
Value
[ByRef] Variant. The value to set at the specified index.

Remarks

The key at the index will be associated with the new value.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: TrimToSize

TrimToSize

Sets the capacity to the number of items in the list.

 Public Sub TrimToSize ( )

Remarks

This is used to release extra space being used by the internal array. The capacity is set to the number of items already in the list.

See Also

Project VBCorLib Overview | Class SortedList Overview


SortedList: Values (get)

Values

Returns a list of the values in the list.

 Public Property Get Values ( ) As ICollection

Return Values

ICollection - An ICollection object used to access the values.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SortedList Overview


Stack

Stack

Represents a first-in-last-out collection of values.

See Also

Project VBCorLib Overview Constructors | ICollection | IEnumerable | ICloneable

Implements:

ICloneable
ICollection
IEnumerable
IObject

Public:

Properties:

Name | Description
Count (get) | Returns the number of items on the stack.

Methods:

Name | Description
Clear | Removes all values from the collection.
Clone | Returns a copy of this instance.
Contains | Returns whether the collection contains a value.
CopyTo | Copies the values to an array.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an enumerator to enumerate the colleciton
GetHashCode | Returns a pseudo-unique number identifying this instance.
Peek | Returns the next to be removed value from the stack without removing the value.
Pop | Returns the next value from the stack, removing the item from the collection.
Push | Places a value into the collection and becomes the next to be removed value from the collection.
ToArray | Returns a Variant array copy of the stack.
ToString | Returns a string representation of this object instance.


Stack: Clear

Clear

Removes all values from the collection.

 Public Sub Clear ( )

Remarks

The count is reset to zero, but the capacity remains unchanged.

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Clone

Clone

Returns a copy of this instance.

 Public Function Clone ( ) As Stack

Return Values

Stack - The copy of this instance.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Contains

Contains

Returns whether the collection contains a value.

 Public Function Contains(
      ByRef Value As Variant,
      Optional ByVal Comparer As IComparer ) As Boolean

Parameters

Value
[ByRef] Variant. The value to search for.
Comparer
[ByVal] Optional. IComparer. A user supplied comparer for the values.

Return Values

Boolean - Boolean indicating if the value was found in the collection.

Remarks

The user can use a custom IComparer object for special comparison rules, such as finding user-defined types.

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: CopyTo

CopyTo

Copies the values to an array.

 Public Sub CopyTo(
      ByRef DstArray As Variant,
      ByVal Index As Long )

Parameters

DstArray
[ByRef] Variant. The array to receive the values.
Index
[ByVal] Long. The starting position in dstArray to start placing the values.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Count (get)

Count

Returns the number of items on the stack.

 Public Property Get Count ( ) As Long

Return Values

Long - The number of items.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare this object to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: GetEnumerator

GetEnumerator

Returns an enumerator to enumerate the colleciton

 Public Function GetEnumerator ( ) As IEnumerator

Return Values

IEnumerator - An enumerator.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: ICollection

ICollection

 Implements ICollection

Return Values

ICollection -

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Peek

Peek

Returns the next to be removed value from the stack without removing the value.

 Public Function Peek ( ) As Variant

Return Values

Variant - The next value to be removed from the stack.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Pop

Pop

Returns the next value from the stack, removing the item from the collection.

 Public Function Pop ( ) As Variant

Return Values

Variant - The value just removed from the collection.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: Push

Push

Places a value into the collection and becomes the next to be removed value from the collection.

 Public Sub Push(
      ByRef Value As Variant )

Parameters

Value
[ByRef] Variant. The value to add to the collection

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: ToArray

ToArray

Returns a Variant array copy of the stack.

 Public Function ToArray ( ) As Variant ( )

Return Values

Variant() - A Variant type array containing all of the values in the collection.

Remarks

The order of the returned array is the first element corrisponds to the next value to be Popped off the stack.

See Also

Project VBCorLib Overview | Class Stack Overview


Stack: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Stack Overview


StaticClasses

StaticClasses

Provides direct access to static class methods.

Remarks

VB6 does not support static class methods. To replicate the syntax of accessing static methods, a function of the same name as the class that is supposed to contain the static methods is defined in this class. This class has instancing of GlobalMultiUse. This means that just the name of these functions can be typed directly without having to instantiate the PublicFunctions class. By just typing in any of these function names, the underlying class which contains the static methods is returned, and those methods are then available for calling. This gives the illusion of static methods being called on a class.

When typing in one of these function names, it should be followed immediately by a period to allow access to the static methods of that class.

 ' Print the name of the current user
 Debug.Print Environment.UserName
This small example simply refers to the Environment function in this class, then directly calls a method on the returned object from the Environment function.

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
Sign | Represents the sign values of BigInteger values.

Methods:

Name | Description
ArrayList | Returns a reference used to access static methods of the ArrayList class.
BigInteger | Provides a method to access the BigInteger static methods.
BitArray | Returns a reference used to access static methods of the BitArray class.
BitConverter | Returns a reference used to access static methods of the BitConverter class.
Buffer | Returns a reference used to access static methods of the Buffer class.
Calendar | Returns a reference used to access static methods of the Calendar class.
cArray | Returns an object used to access the cArray methods without instantiating the cArray class.
cDateTime | Returns a reference used to access static methods of the cDateTime class.
Comparer | Returns an object used to access the Comparer static functions.
Console | Returns a reference used to access static methods of the Console class.
Convert | Provides methods for converting values.
Cor | Returns a object containing all of the parameterized constructors available within the VBCorLib library.
CryptoConfig | Returns a reference used to access the CryptoConfig static methods.
cString | Returns an object used to access the cString methods without instantiating the cString class.
CultureInfo | Returns a reference used to access static methods of the CultureInfo class.
DateTimeFormatInfo | Returns a reference used to access static methods of the DateTimeFormatInfo class.
DES | Returns a reference used to access the DES static methods.
Directory | Returns a reference used to access static methods of the Directory class.
DriveInfo | Provides methods for retrieve information about all drives on the local machine.
Encoding | Returns a reference used to access static methods of the Encoding class.
Environment | Returns a reference used to access the methods of the Environment functions.
File | Returns a reference used to access static methods of the File class.
GregorianCalendar | Returns a reference used to access static methods of the GregorianCalendar class.
Guid | Provides static methods for creating new Guid objects.
HebrewCalendar | Returns a reference used to access static methods of the HebrewCalendar class.
HijriCalendar | Returns a reference used to access static methods of the HijriCalendar class.
HMAC | Returns a reference used to access the HMAC static methods.
JulianCalendar | Returns a reference used to access static methods of the JulianCalendar class.
KoreanCalendar | Returns a reference used to access static methods of the KoreanCalendar class.
MACTripleDES | Returns a reference used to access the MACTripleDES static methods.
NumberFormatInfo | Returns a reference used to access static methods of the NumberFormatInfo class.
Object | Provides default methods for classes that implement the IObject interface.
Path | Returns a reference used to access static methods of the Path class.
RC2 | Returns a reference used to access the RC2 static methods.
Registry | Returns a reference used to access static methods of the Registry class.
RegistryKey | Returns a reference used to access static methods of the RegistryKey class.
ResourceManager | Provides methods for creating custom resoure managers.
Rijndael | Returns a reference used to access the Rijndael static methods.
RSA | Returns a reference used to access the RSA static methods.
SecurityElement | Returns a reference used to access the SecurityElement static methods.
SHA1 | Returns a reference used to access the SHA1 static methods.
SHA256 | Returns a reference used to access the SHA256 static methods.
SHA384 | Returns a reference used to access the SHA384 static methods.
SHA512 | Returns a reference used to access the SHA512 static methods.
StopWatch | Returns a reference used to access the StopWatch static methods.
Stream | Returns a reference used to access static methods of the Stream class.
TextReader | Returns a reference used to access static methods of the TextReader class.
TimeSpan | Returns a reference used to access static methods of the TimeSpan class.
TimeZone | Returns a reference used to access static methods of the TimeZone class.
TripleDES | Returns a reference used to access the TripleDES static methods.
Version | Returns a reference used to access static methods of the Version class.


StaticClasses: ArrayList

ArrayList

Returns a reference used to access static methods of the ArrayList class.

 Public Function ArrayList ( ) As ArrayListStatic

Return Values

ArrayListStatic - A reference that can be used to access static methods of the ArrayList class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | ArrayList | ArrayListStatic


StaticClasses: BigInteger

BigInteger

Provides a method to access the BigInteger static methods.

 Public Function BigInteger ( ) As BigIntegerStatic

Return Values

BigIntegerStatic - The BigInteger static methods.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: BitArray

BitArray

Returns a reference used to access static methods of the BitArray class.

 Public Function BitArray ( ) As BitArrayStatic

Return Values

BitArrayStatic - A reference that can be used to access static methods of the BitArray class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | BitArray | BitArrayStatic


StaticClasses: BitConverter

BitConverter

Returns a reference used to access static methods of the BitConverter class.

 Public Function BitConverter ( ) As BitConverter

Return Values

BitConverter - A reference that can be used to access static methods of the BitConverter class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | BitConverter


StaticClasses: Buffer

Buffer

Returns a reference used to access static methods of the Buffer class.

 Public Function Buffer ( ) As Buffer

Return Values

Buffer - A reference that can be used to access static methods of the Buffer class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Buffer


StaticClasses: Calendar

Calendar

Returns a reference used to access static methods of the Calendar class.

 Public Function Calendar ( ) As CalendarStatic

Return Values

CalendarStatic - A reference that can be used to access static methods of the Calendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Calendar | CalendarStatic


StaticClasses: cArray

cArray

Returns an object used to access the cArray methods without instantiating the cArray class.

 Public Function cArray ( ) As cArray

Return Values

cArray - A reference to the cArray object used to perform functions on arrays.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | cArray


StaticClasses: cDateTime

cDateTime

Returns a reference used to access static methods of the cDateTime class.

 Public Function cDateTime ( ) As cDateTimeStatic

Return Values

cDateTimeStatic - A reference that can be used to access static methods of the cDateTime class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | cDateTime | cDateTimeStatic


StaticClasses: Comparer

Comparer

Returns an object used to access the Comparer static functions.

 Public Function Comparer ( ) As ComparerStatic

Return Values

ComparerStatic - A reference to the object used to access the Comparer static functions.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Comparer | ComparerStatic


StaticClasses: Console

Console

Returns a reference used to access static methods of the Console class.

 Public Function Console ( ) As Console

Return Values

Console - A reference that can be used to access static methods of the Console class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Console


StaticClasses: Convert

Convert

Provides methods for converting values.

 Public Function Convert ( ) As Convert

Return Values

Convert - A reference to the method provider.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Convert


StaticClasses: Cor

Cor

Returns a object containing all of the parameterized constructors available within the VBCorLib library.

 Public Function Cor ( ) As Constructors

Return Values

Constructors - A object containing all of the constructors in VBCorLib.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Constructors


StaticClasses: CryptoConfig

CryptoConfig

Returns a reference used to access the CryptoConfig static methods.

 Public Function CryptoConfig ( ) As CryptoConfig

Return Values

CryptoConfig - A reference to the single CryptoConfig instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: cString

cString

Returns an object used to access the cString methods without instantiating the cString class.

 Public Function cString ( ) As cString

Return Values

cString - A reference to the cString object used to perform functions on Strings.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | cString


StaticClasses: CultureInfo

CultureInfo

Returns a reference used to access static methods of the CultureInfo class.

 Public Function CultureInfo ( ) As CultureInfoStatic

Return Values

CultureInfoStatic - A reference that can be used to access static methods of the CultureInfo class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | CultureInfo | CultureInfoStatic


StaticClasses: DateTimeFormatInfo

DateTimeFormatInfo

Returns a reference used to access static methods of the DateTimeFormatInfo class.

 Public Function DateTimeFormatInfo ( ) As DateTimeFormatInfoStatic

Return Values

DateTimeFormatInfoStatic - A reference that can be used to access static methods of the DateTimeFormatInfo class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | DateTimeFormatInfo | DateTimeFormatInfoStatic


StaticClasses: DES

DES

Returns a reference used to access the DES static methods.

 Public Function DES ( ) As DESStatic

Return Values

DESStatic - A reference to the single DESStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Directory

Directory

Returns a reference used to access static methods of the Directory class.

 Public Function Directory ( ) As Directory

Return Values

Directory - A reference that can be used to access static methods of the Directory class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Directory | DirectoryInfo | File | FileInfo | DriveInfo | DriveInfoStatic


StaticClasses: DriveInfo

DriveInfo

Provides methods for retrieve information about all drives on the local machine.

 Public Function DriveInfo ( ) As DriveInfoStatic

Return Values

DriveInfoStatic - A reference to the method provider

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | DriveInfo | DirectoryInfo | Directory | FileInfo | File


StaticClasses: Encoding

Encoding

Returns a reference used to access static methods of the Encoding class.

 Public Function Encoding ( ) As EncodingStatic

Return Values

EncodingStatic - A reference that can be used to access static methods of the Encoding class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Encoding | EncodingStatic


StaticClasses: Environment

Environment

Returns a reference used to access the methods of the Environment functions.

 Public Function Environment ( ) As Environment

Return Values

Environment - A reference that can be used to access methods of the Environment class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Environment


StaticClasses: File

File

Returns a reference used to access static methods of the File class.

 Public Function File ( ) As File

Return Values

File - A reference that can be used to access static methods of the File class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | File | FileInfo | Directory | DirectoryInfo | DriveInfo | DriveInfoStatic


StaticClasses: GregorianCalendar

GregorianCalendar

Returns a reference used to access static methods of the GregorianCalendar class.

 Public Function GregorianCalendar ( ) As GregorianCalendarStatic

Return Values

GregorianCalendarStatic - A reference that can be used to access static methods of the GregorianCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | GregorianCalendar | GregorianCalendarStatic


StaticClasses: Guid

Guid

Provides static methods for creating new Guid objects.

 Public Function Guid ( ) As GuidStatic

Return Values

GuidStatic - A reference that can be used to access the static methods of the Guid class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | GuidStatic | Guid


StaticClasses: HebrewCalendar

HebrewCalendar

Returns a reference used to access static methods of the HebrewCalendar class.

 Public Function HebrewCalendar ( ) As HebrewCalendarStatic

Return Values

HebrewCalendarStatic - A reference that can be used to access static methods of the HebrewCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | HebrewCalendar | HebrewCalendarStatic


StaticClasses: HijriCalendar

HijriCalendar

Returns a reference used to access static methods of the HijriCalendar class.

 Public Function HijriCalendar ( ) As HijriCalendarStatic

Return Values

HijriCalendarStatic - A reference that can be used to access static methods of the HijriCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | HijriCalendar | HijriCalendarStatic


StaticClasses: HMAC

HMAC

Returns a reference used to access the HMAC static methods.

 Public Function HMAC ( ) As HMACStatic

Return Values

HMACStatic - A reference to the single HMACStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: JulianCalendar

JulianCalendar

Returns a reference used to access static methods of the JulianCalendar class.

 Public Function JulianCalendar ( ) As JulianCalendarStatic

Return Values

JulianCalendarStatic - A reference that can be used to access static methods of the JulianCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | JulianCalendar | JulianCalendarStatic


StaticClasses: KoreanCalendar

KoreanCalendar

Returns a reference used to access static methods of the KoreanCalendar class.

 Public Function KoreanCalendar ( ) As KoreanCalendarStatic

Return Values

KoreanCalendarStatic - A reference that can be used to access static methods of the KoreanCalendar class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | KoreanCalendar | KoreanCalendarStatic


StaticClasses: MACTripleDES

MACTripleDES

Returns a reference used to access the MACTripleDES static methods.

 Public Function MACTripleDES ( ) As MACTripleDESStatic

Return Values

MACTripleDESStatic - A reference to the single MACTripleDESStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: NumberFormatInfo

NumberFormatInfo

Returns a reference used to access static methods of the NumberFormatInfo class.

 Public Function NumberFormatInfo ( ) As NumberFormatInfoStatic

Return Values

NumberFormatInfoStatic - A reference that can be used to access static methods of the NumberFormatInfo class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | NumberFormatInfo | NumberFormatInfoStatic


StaticClasses: Object

Object

Provides default methods for classes that implement the IObject interface.

 Public Function Object ( ) As ObjectStatic

Return Values

ObjectStatic - A reference to default implementations of the IObject interface.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Path

Path

Returns a reference used to access static methods of the Path class.

 Public Function Path ( ) As Path

Return Values

Path - A reference that can be used to access static methods of the Path class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Path


StaticClasses: RC2

RC2

Returns a reference used to access the RC2 static methods.

 Public Function RC2 ( ) As RC2Static

Return Values

RC2Static - A reference to the single RC2Static instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Registry

Registry

Returns a reference used to access static methods of the Registry class.

 Public Function Registry ( ) As Registry

Return Values

Registry - A reference that can be used to access static methods of the Registry class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Registry | RegistryKey


StaticClasses: RegistryKey

RegistryKey

Returns a reference used to access static methods of the RegistryKey class.

 Public Function RegistryKey ( ) As RegistryKeyStatic

Return Values

RegistryKeyStatic - A reference that can be used to access static methods of the RegistryKey class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | RegistryKey | RegistryKeyStatic | Registry


StaticClasses: ResourceManager

ResourceManager

Provides methods for creating custom resoure managers.

 Public Function ResourceManager ( ) As ResourceManagerStatic

Return Values

ResourceManagerStatic - A reference to the method provider.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | ResourceManagerStatic | ResourceManager | ResourceSet | ResourceReader


StaticClasses: Rijndael

Rijndael

Returns a reference used to access the Rijndael static methods.

 Public Function Rijndael ( ) As RijndaelStatic

Return Values

RijndaelStatic - A reference to the single RijndaelStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: RSA

RSA

Returns a reference used to access the RSA static methods.

 Public Function RSA ( ) As RSAStatic

Return Values

RSAStatic - A reference to the single RSAStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: SecurityElement

SecurityElement

Returns a reference used to access the SecurityElement static methods.

 Public Function SecurityElement ( ) As SecurityElementStatic

Return Values

SecurityElementStatic - A reference to the single SecurityElementStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: SHA1

SHA1

Returns a reference used to access the SHA1 static methods.

 Public Function SHA1 ( ) As SHA1Static

Return Values

SHA1Static - A reference to the single SHA1Static instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: SHA256

SHA256

Returns a reference used to access the SHA256 static methods.

 Public Function SHA256 ( ) As SHA256Static

Return Values

SHA256Static - A reference to the single SHA256Static instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: SHA384

SHA384

Returns a reference used to access the SHA384 static methods.

 Public Function SHA384 ( ) As SHA384Static

Return Values

SHA384Static - A reference to the single SHA384Static instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: SHA512

SHA512

Returns a reference used to access the SHA512 static methods.

 Public Function SHA512 ( ) As SHA512Static

Return Values

SHA512Static - A reference to the single SHA512Static instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Sign

Sign

Represents the sign values of BigInteger values.

 Public Enum Sign

Values

Negative = - 1
The value is a negative number.
Zero = 0
The value is zero.
Positive = 1
The value is a positive number.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: StopWatch

StopWatch

Returns a reference used to access the StopWatch static methods.

 Public Function StopWatch ( ) As StopWatchStatic

Return Values

StopWatchStatic - A reference to the single StopWatchStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Stream

Stream

Returns a reference used to access static methods of the Stream class.

 Public Function Stream ( ) As StreamStatic

Return Values

StreamStatic - A reference that can be used to access static methods of the Stream class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Stream | StreamStatic


StaticClasses: TextReader

TextReader

Returns a reference used to access static methods of the TextReader class.

 Public Function TextReader ( ) As TextReaderStatic

Return Values

TextReaderStatic - A reference that can be used to access static methods of the TextReader class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | TextReader | TextReaderStatic | StreamReader


StaticClasses: TimeSpan

TimeSpan

Returns a reference used to access static methods of the TimeSpan class.

 Public Function TimeSpan ( ) As TimeSpanStatic

Return Values

TimeSpanStatic - A reference that can be used to access static methods of the TimeSpan class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | TimeSpan | TimeSpanStatic


StaticClasses: TimeZone

TimeZone

Returns a reference used to access static methods of the TimeZone class.

 Public Function TimeZone ( ) As TimeZoneStatic

Return Values

TimeZoneStatic - A reference that can be used to access static methods of the TimeZone class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | TimeZone | TimeZoneStatic


StaticClasses: TripleDES

TripleDES

Returns a reference used to access the TripleDES static methods.

 Public Function TripleDES ( ) As TripleDESStatic

Return Values

TripleDESStatic - A reference to the single TripleDESStatic instance.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview


StaticClasses: Version

Version

Returns a reference used to access static methods of the Version class.

 Public Function Version ( ) As VersionStatic

Return Values

VersionStatic - A reference that can be used to access static methods of the Version class.

Remarks

See Also

Project VBCorLib Overview | Class StaticClasses Overview | Version | VersionStatic


StopWatch

StopWatch

Provides a timing mechanism using QueryPerformanceCounter if available, otherwise the system time is used.

See Also

Project VBCorLib Overview StopWatchStatic

Implements:

IObject

Public:

Properties:

Name | Description
Elapsed (get) | Returns the elapsed time as a TimeSpan object.
ElapsedMilliseconds (get) | Returns the time elapsed in milliseconds.
ElapsedTicks (get) | Returns the elapsed time in Ticks.
IsRunning (get) | Returns if the StopWatch is currently running.

Methods:

Name | Description
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr.
Reset | Stops the StopWatch object and resets the elapsed time to zero.
StartCount | Starts the StopWatch object.
StopCount | Halts the StopWatch if it is running, storing the elapsed time so far.
ToString | Returns a string representation of this object.


StopWatch: Elapsed (get)

Elapsed

Returns the elapsed time as a TimeSpan object.

 Public Property Get Elapsed ( ) As TimeSpan

Return Values

TimeSpan - A TimeSpan object.

Remarks

The elapsed time reflects the sum total of all durations timed when calling the StartCount and StopCount. Each time the StopWatch is started, the elapsed time will accumulate, but it will not reset to zero when the StopWatch is stopped. Calling the Reset method will stop the StopWatch and reset the elapsed time to zero.

If the StopWatch is running when the elapsed time is checked, the current accumulated amount of time will be returned. The StopWatch will not be stopped.

Read Only.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: ElapsedMilliseconds (get)

ElapsedMilliseconds

Returns the time elapsed in milliseconds.

 Public Property Get ElapsedMilliseconds ( ) As Currency

Return Values

Currency - The time elapsed in milliseconds.

Remarks

The elapsed time reflects the sum total of all durations timed when calling the StartCount and StopCount. Each time the StopWatch is started, the elapsed time will accumulate, but it will not reset to zero when the StopWatch is stopped. Calling the Reset method will stop the StopWatch and reset the elapsed time to zero.

If the StopWatch is running when the elapsed time is checked, the current accumulated amount of time will be returned. The StopWatch will not be stopped.

Read Only.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: ElapsedTicks (get)

ElapsedTicks

Returns the elapsed time in Ticks.

 Public Property Get ElapsedTicks ( ) As Variant

Return Values

Variant - The elapsed Ticks is returned.

Remarks

The elapsed time reflects the sum total of all durations timed when calling the StartCount and StopCount. Each time the StopWatch is started, the elapsed time will accumulate, but it will not reset to zero when the StopWatch is stopped. Calling the Reset method will stop the StopWatch and reset the elapsed time to zero.

If the StopWatch is running when the elapsed time is checked, the current accumulated amount of time will be returned. The StopWatch will not be stopped.

Read Only.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test for equality against this object instance.

Return Values

Boolean - The result of the equality comparison.

Remarks

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr.

 Public Function GetHashCode ( ) As Long

Return Values

Long - The hashcode for this object instance.

Remarks

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: IsRunning (get)

IsRunning

Returns if the StopWatch is currently running.

 Public Property Get IsRunning ( ) As Boolean

Return Values

Boolean -

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: Reset

Reset

Stops the StopWatch object and resets the elapsed time to zero.

 Public Sub Reset ( )

Remarks

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: StartCount

StartCount

Starts the StopWatch object.

 Public Sub StartCount ( )

Remarks

If StartCount is called again, the elapsed time is not reset. The elapsed time is increased as normal, but does not reflect the time spent while the StopWatch was not running.

Using the StartCount and StopCount allows for timing of only portions that are prefered and accumulates only those portions. The elapsed time properties will reflect the sum total of those timed portions. Calling Reset will set the elapsed time to zero.

If the StopWatch is already running, then nothing is changed.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: StopCount

StopCount

Halts the StopWatch if it is running, storing the elapsed time so far.

 Public Sub StopCount ( )

Remarks

If StartCount is called again, the elapsed time is not reset. The elapsed time is increased as normal, but does not reflect the time spent while the StopWatch was not running.

Using the StartCount and StopCount allows for timing of only portions that are prefered and accumulates only those portions. The elapsed time properties will reflect the sum total of those timed portions. Calling Reset will set the elapsed time to zero.

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatch: ToString

ToString

Returns a string representation of this object.

 Public Function ToString ( ) As String

Return Values

String - A string representation.

Remarks

See Also

Project VBCorLib Overview | Class StopWatch Overview


StopWatchStatic

StopWatchStatic

Provides methods that are related to the StopWatch class.

See Also

Project VBCorLib Overview StopWatch

Public:

Properties:

Name | Description
Frequency (get) | Returns the frequency of the high resolution timer.
IsHighResolution (get) | Returns if the StopWatch class will be using the high resolution timer.

Methods:

Name | Description
GetTimeStamp | Returns the current time of the timer.
StartNew | Returns a new StopWatch object that is then started upon return.


StopWatchStatic: Frequency (get)

Frequency

Returns the frequency of the high resolution timer.

 Public Property Get Frequency ( ) As Currency

Return Values

Currency - The frequency used by the high resolution timer.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StopWatchStatic Overview


StopWatchStatic: GetTimeStamp

GetTimeStamp

Returns the current time of the timer.

 Public Function GetTimeStamp ( ) As Currency

Return Values

Currency - The current time from the timer.

Remarks

If the timer is high resolution, then the result from QueryPerformanceCounter is returned, otherwise, the result from timeGetTime is used.

See Also

Project VBCorLib Overview | Class StopWatchStatic Overview


StopWatchStatic: IsHighResolution (get)

IsHighResolution

Returns if the StopWatch class will be using the high resolution timer.

 Public Property Get IsHighResolution ( ) As Boolean

Return Values

Boolean - Returns True if there is high resolution, False otherwise.

Remarks

High resolution timers are hardward dependant.

Read Only.

See Also

Project VBCorLib Overview | Class StopWatchStatic Overview


StopWatchStatic: StartNew

StartNew

Returns a new StopWatch object that is then started upon return.

 Public Function StartNew ( ) As StopWatch

Return Values

StopWatch - A new StopWatch object.

Remarks

See Also

Project VBCorLib Overview | Class StopWatchStatic Overview


Stream

Stream

Provides a set of standard methods for using a Stream object.

Remarks

This interface should be implements on classes that wish to be used as a Stream type object.

See Also

Project VBCorLib Overview | StreamStatic | FileStream | MemoryStream | CryptoStream

Public:

Types:

Name | Description
SeekOrigin | The reference point in which to begin seeking from.

Properties:

Name | Description
CanRead (get) | Returns if the stream supports reading.
CanSeek (get) | Returns if the stream supports seeking.
CanTimeout (get) | Returns if the Stream object can timeout during a read or write operation.
CanWrite (get) | Returns if the stream supports being written to.
Length (get) | Returns the length of the stream in bytes.
Position (get) | Returns the current position within the stream.
Position (let) | Sets the position in the stream where the next read or write will take place.
ReadTimeout (get) | Returns the duration allowed before a timeout will occur.
ReadTimeout (let) | Sets the duration allowed before a timeout will occur.
WriteTimeout (get) | Returns the duration allowed before a timeout will occur.
WriteTimeout (let) | Sets the duration allowed before a timeout will occur.

Methods:

Name | Description
BeginRead | Begins an Asynchronous reading process.
BeginWrite | Begins an Asynchronous writing process.
CloseStream | Closes the current stream.
EndRead | Ends an asynchronous read operation returning the total number of bytes read.
EndWrite | Used to end an asynchronous write operation.
Equals | Determines if this instance is equal to the value.
Flush | Flushes any buffers in the object to the underlying stream.
GetHashCode | Returns a semi-unique number representing this instance.
ReadBlock | Reads a block of bytes from the stream.
ReadByte | Reads a single byte from the stream.
SeekPosition | Moves the current stream pointer to a new position.
SetLength | Sets the length of the current stream.
ToString | Returns a string representation of the this instance.
WriteBlock | Writes an array of bytes to the stream.
WriteByte | Writes a single byte to the stream.


Stream: BeginRead

BeginRead

Begins an Asynchronous reading process.

 Public Function BeginRead(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The buffer to read into.
Offset
[ByVal] Long. The starting index in Buffer to begin reading into.
Count
[ByVal] Long. The number of bytes to be read into the buffer.
Callback
[ByVal] Optional. AsyncCallback. Object used to receive notification of the finish of the read.
State
[ByVal] Optional. Variant. Information the caller can use to distinguish from other reads.

Return Values

IAsyncResult - Represents the current read state.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: BeginWrite

BeginWrite

Begins an Asynchronous writing process.

 Public Function BeginWrite(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long,
      Optional ByVal Callback As AsyncCallback,
      Optional ByVal State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The source of the data to write to the stream.
Offset
[ByVal] Long. The position in the buffer to begin writing from.
Count
[ByVal] Long. The number of bytes to be written to the stream.
Callback
[ByVal] Optional. AsyncCallback. An object used to receive notification of the completion for the writing.
State
[ByVal] Optional. Variant. A user-supplied information used to distinguish this from other writings.

Return Values

IAsyncResult - Represents the current write state.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: CanRead (get)

CanRead

Returns if the stream supports reading.

 Public Property Get CanRead ( ) As Boolean

Return Values

Boolean - The indication for the support of reading.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: CanSeek (get)

CanSeek

Returns if the stream supports seeking.

 Public Property Get CanSeek ( ) As Boolean

Return Values

Boolean - The indication for the support to seek.

Remarks

Seeking is the ability to change position within the stream from a specified reference point.

Read Only.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: CanTimeout (get)

CanTimeout

Returns if the Stream object can timeout during a read or write operation.

 Public Property Get CanTimeout ( ) As Boolean

Return Values

Boolean - Returns True if the Stream can timeout, False otherwise.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: CanWrite (get)

CanWrite

Returns if the stream supports being written to.

 Public Property Get CanWrite ( ) As Boolean

Return Values

Boolean - The indication for the support of being written to.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: CloseStream

CloseStream

Closes the current stream.

 Public Sub CloseStream ( )

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: EndRead

EndRead

Ends an asynchronous read operation returning the total number of bytes read.

 Public Function EndRead(
      ByVal AsyncResult As IAsyncResult ) As Long

Parameters

AsyncResult
[ByVal] IAsyncResult. The object that represents the read process.

Return Values

Long - The number of bytes actuall read from the stream.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: EndWrite

EndWrite

Used to end an asynchronous write operation.

 Public Sub EndWrite(
      ByVal AsyncResult As IAsyncResult )

Parameters

AsyncResult
[ByVal] IAsyncResult. The object that represents the write process.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: Equals

Equals

Determines if this instance is equal to the value.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to check this instance against for equality.

Return Values

Boolean - Indication of equality.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: Flush

Flush

Flushes any buffers in the object to the underlying stream.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: GetHashCode

GetHashCode

Returns a semi-unique number representing this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long -

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: Length (get)

Length

Returns the length of the stream in bytes.

 Public Property Get Length ( ) As Currency

Return Values

Currency - The length of the stream.

Remarks

A currency datatype is used to support stream greater than 2gig.
The stream generally needs to support seeking to be able to return the length.

Read Only.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: Position (get)

Position

Returns the current position within the stream.

 Public Property Get Position ( ) As Currency

Return Values

Currency - The current position within the stream.

Remarks

A currency datatype is used to support stream greater than 2gig.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: Position (let)

Position

Sets the position in the stream where the next read or write will take place.

 Public Property Let Position(
      ByVal RHS As Currency ) :

Parameters

RHS
[ByVal] Currency. The position within the stream offset from the beginning of the stream.

Remarks

A currency datatype is used to support stream greater than 2gig.
The stream generally needs to support seeking to be able to return the length.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: ReadBlock

ReadBlock

Reads a block of bytes from the stream.

 Public Function ReadBlock(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long ) As Long

Parameters

Buffer
[ByRef] Byte. The array to read the bytes into.
Offset
[ByVal] Long. The starting index in Buffer to begin reading to.
Count
[ByVal] Long. The number of bytes to read from the stream.

Return Values

Long - The number of bytes actually read from the stream.

Remarks

The .NET version of this will block the thread until the requested number of bytes are actually read. This is not supported in this version.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: ReadByte

ReadByte

Reads a single byte from the stream.

 Public Function ReadByte ( ) As Long

Return Values

Long - A byte value or -1 if passed the end of the stream.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: ReadTimeout (get)

ReadTimeout

Returns the duration allowed before a timeout will occur.

 Public Property Get ReadTimeout ( ) As Long

Return Values

Long - The timeout period in milliseconds.

Remarks

Note to Implementor: If the class does not support timeout capabilities, then this method should return a InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: ReadTimeout (let)

ReadTimeout

Sets the duration allowed before a timeout will occur.

 Public Property Let ReadTimeout(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The timeout period in milliseconds.

Remarks

Note to Implementor: If the class does not support timeout capabilities, then this method should return a InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: SeekOrigin

SeekOrigin

The reference point in which to begin seeking from.

 Public Enum SeekOrigin

Values

FromBeginning = FILE_BEGIN
The new position will be offset from the beginning of the file. A negative value will cause an exception.
FromCurrent = FILE_CURRENT
The position will be offset from the current file pointer location. The value can be negative to seek backwards from the current position.
FromEnd = FILE_END
The new position will be offset from the end of the file. A positive number will cause an exception. The offset should be 0 or negative.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: SeekPosition

SeekPosition

Moves the current stream pointer to a new position.

 Public Function SeekPosition(
      ByVal Offset As Currency,
      ByVal Origin As SeekOrigin ) As Currency

Parameters

Offset
[ByVal] Currency. The number of bytes to move the pointer (can be negative.)
Origin
[ByVal] SeekOrigin. The reference to begin moving from.

Return Values

Currency - The final position the pointer moved to.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: SetLength

SetLength

Sets the length of the current stream.

 Public Sub SetLength(
      ByVal Value As Currency )

Parameters

Value
[ByVal] Currency. The new length to set the stream to.

Remarks

Generally the stream must support seeking to set the length.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: ToString

ToString

Returns a string representation of the this instance.

 Public Function ToString ( ) As String

Return Values

String - A string representation of the this instance.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: WriteBlock

WriteBlock

Writes an array of bytes to the stream.

 Public Sub WriteBlock(
      ByRef Buffer ( ) As Byte,
      ByVal Offset As Long,
      ByVal Count As Long )

Parameters

Buffer
[ByRef] Byte. The array of bytes to be written.
Offset
[ByVal] Long. The starting index in Buffer to begin writing from.
Count
[ByVal] Long. The number of bytes to be written.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: WriteByte

WriteByte

Writes a single byte to the stream.

 Public Sub WriteByte(
      ByVal Value As Byte )

Parameters

Value
[ByVal] Byte. The byte to be written.

Remarks

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: WriteTimeout (get)

WriteTimeout

Returns the duration allowed before a timeout will occur.

 Public Property Get WriteTimeout ( ) As Long

Return Values

Long - The timeout period in milliseconds.

Remarks

Note to Implementor: If the class does not support timeout capabilities, then this method should return a InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


Stream: WriteTimeout (let)

WriteTimeout

Sets the duration allowed before a timeout will occur.

 Public Property Let WriteTimeout(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. the timeout period in milliseconds.

Remarks

Note to Implementor: If the class does not support timeout capabilities, then this method should return a InvalidOperationException.

Read/Write.

See Also

Project VBCorLib Overview | Class Stream Overview


StreamReader

StreamReader

Reads characters from a byte array in a particular encoding.

Remarks

The StreamReader object cannot be created directly. In order to create a new StreamReader, use the Cor.NewStreamReader method.

Unlike the FileStream and MemoryStream classes, the StreamReader reads bytes that are of a particular encoding to be decoded. Instead of reading bytes, the StreamReader returns characters or strings of the decoded bytes.

The default encoding is UTF8Encoding.

Example

' This example attempts to open a text file and
' read the lines and display them.
Private Sub Main()
    Dim sr As StreamReader
    Dim line As String

    On Error GoTo errTrap

    ' Create a StreamReader to read in a file.
    Set sr = NewStreamReader("TestFile.txt")

    ' Read in each line and display it until
    ' the end of the file is reached.
    Do
        ' Read in characters until a carriage-return is reached.
        line = sr.ReadLine
        Console.WriteLine line

    ' A null string is equal to StrPtr(line) = 0
    Loop While Not cString.IsNull(line)
    sr.CloseReader

errTrap:
    Dim ex As Exception
    ' Check if an exception was thrown.
    If Catch(ex) Then
        Console.WriteLine "The file could not be opened."
        Console.WriteLine ex.Message
    End If

    ' Wait for the user to press enter.
    Console.ReadLine
End Sub

See Also

Project VBCorLib Overview | Constructors | StreamWriter | TextReader

Implements:

IObject
TextReader

Public:

Properties:

Name | Description
BaseStream (get) | Returns the base stream this reader is reading from.
CurrentEncoding (get) | Returns the current encoding used by the reader.

Methods:

Name | Description
CloseReader | Closes the reader.
DiscardBufferedData | Discards the currently buffered data to allow reading from a new position in the underlying stream.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Peek | Returns the the next char from the reader without consuming it.
Read | Returns the next char from the reader.
ReadBlock | Reads a block of characters from the the stream.
ReadLine | Returns a string of characters to the next new-line character.
ReadToEnd | Returns a string of all remaining characters in the stream.
ToString | Returns a string representation of this object instance.


StreamReader: BaseStream (get)

BaseStream

Returns the base stream this reader is reading from.

 Public Property Get BaseStream ( ) As Stream

Return Values

Stream - The base stream.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: CloseReader

CloseReader

Closes the reader.

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: CurrentEncoding (get)

CurrentEncoding

Returns the current encoding used by the reader.

 Public Property Get CurrentEncoding ( ) As Encoding

Return Values

Encoding - The encoding being used by the reader currently.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: DiscardBufferedData

DiscardBufferedData

Discards the currently buffered data to allow reading from a new position in the underlying stream.

 Public Sub DiscardBufferedData ( )

Remarks

The StreamReader buffers more data than is usually read at a single time. If the position of the underlying stream is moved, then the data buffered in the StreamReader needs to be discarded so the reading can begin at the new Stream position.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: Peek

Peek

Returns the the next char from the reader without consuming it.

 Public Function Peek ( ) As Long

Return Values

Long - The next character to be read, or -1 if the end of the stream has been reached.

Remarks

The character that is returned is not removed from the stream. Any characters above &H7FFF will be returned as a positive value.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: Read

Read

Returns the next char from the reader.

 Public Function Read ( ) As Long

Return Values

Long - The next character to be read, or -1 if the end of the stream was reached.

Remarks

Any characters above &H7FFF will be returned as a positive value.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: ReadBlock

ReadBlock

Reads a block of characters from the the stream.

 Public Function ReadBlock(
      ByRef Buffer ( ) As Integer,
      ByVal Index As Long,
      ByVal Count As Long ) As Long

Parameters

Buffer
[ByRef] Integer. The array to read the characters in to.
Index
[ByVal] Long. The starting index in Buffer to begin reading to.
Count
[ByVal] Long. The number of characters to be read.

Return Values

Long - The actual number of characters read.

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: ReadLine

ReadLine

Returns a string of characters to the next new-line character.

 Public Function ReadLine ( ) As String

Return Values

String - A string containing the characters up to the next new-line character.

Remarks

If there are no more bytes to in the stream, then a null string is returned. This can be checked for using the cString.IsNull function.

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: ReadToEnd

ReadToEnd

Returns a string of all remaining characters in the stream.

 Public Function ReadToEnd ( ) As String

Return Values

String - A string containing the remaining characters.

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: TextReader

TextReader

 Implements TextReader

Return Values

TextReader -

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamReader: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class StreamReader Overview


StreamStatic

StreamStatic

Provides static methods for the Stream class.

See Also

Project VBCorLib Overview Stream | PublicFunctions

Public:

Properties:

Name | Description
NullStream (get) | Returns a Stream object with no backing store.


StreamStatic: NullStream (get)

NullStream

Returns a Stream object with no backing store.

 Public Property Get NullStream ( ) As Stream

Return Values

Stream - A Stream object that has no backing store.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamStatic Overview


StreamWriter

StreamWriter

Writes characters to a byte stream using the specific encoding.

Remarks

The default encoding used is UTF8Encoding. If the writer is not appending to the stream, then an encoding preamble is written to the stream.

See Also

Project VBCorLib Overview | Constructors | StreamReader | TextWriter

Implements:

IObject
TextWriter

Public:

Properties:

Name | Description
AutoFlush (get) | Returns if the writer autoflushes after each write.
AutoFlush (let) | Sets if the writer autoflushes after each write.
BaseStream (get) | Returns the stream this writer is using.
Encoding (get) | Returns the encoding being used by this writer.
FormatProvider (get) | Returns the format provider being used by this writer.
NewLine (get) | Returns the new-line string used by this writer.
NewLine (let) | Sets the new-line string used by this writer.

Methods:

Name | Description
CloseWriter | Closes this writer, flushing any buffers needed.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Flushes the buffers to the underlying stream.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.
WriteLine | Writes the value, then appends the new-line string.
WriteValue | Writes the encoded string representation of the value to the stream.


StreamWriter: AutoFlush (get)

AutoFlush

Returns if the writer autoflushes after each write.

 Public Property Get AutoFlush ( ) As Boolean

Return Values

Boolean - Indication of autoflush.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: AutoFlush (let)

AutoFlush

Sets if the writer autoflushes after each write.

 Public Property Let AutoFlush(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. The new value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: BaseStream (get)

BaseStream

Returns the stream this writer is using.

 Public Property Get BaseStream ( ) As Stream

Return Values

Stream - The stream being used by this writer.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: CloseWriter

CloseWriter

Closes this writer, flushing any buffers needed.

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: Encoding (get)

Encoding

Returns the encoding being used by this writer.

 Public Property Get Encoding ( ) As Encoding

Return Values

Encoding - The encoding being used by this writer.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: Flush

Flush

Flushes the buffers to the underlying stream.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: FormatProvider (get)

FormatProvider

Returns the format provider being used by this writer.

 Public Property Get FormatProvider ( ) As IFormatProvider

Return Values

IFormatProvider - The format provider used by this writer.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: NewLine (get)

NewLine

Returns the new-line string used by this writer.

 Public Property Get NewLine ( ) As String

Return Values

String - The new-line string.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: NewLine (let)

NewLine

Sets the new-line string used by this writer.

 Public Property Let NewLine(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new new-line value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: TextWriter

TextWriter

 Implements TextWriter

Return Values

TextWriter -

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: WriteLine

WriteLine

Writes the value, then appends the new-line string.

 Public Sub WriteLine(
      ParamArray Value ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to be written.

Remarks

The first argument in value is the output to the string. Any additional arguments are used as formatting information. An argument can be refered to through formatting indexes. A formatting index is an integer enclosed in curly braces {}. The indexes start at 0.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StreamWriter: WriteValue

WriteValue

Writes the encoded string representation of the value to the stream.

 Public Sub WriteValue(
      ByRef Value As Variant,
      ParamArray args ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to be written to the stream.
args
[ByRef] Variant. The arguments to be used in formatting the Value.

Remarks

The args are used when argument indexes are supplied in the value to be written. Indexes are indicate by enclosing the specific index in curly braces {}. The indexes start at 0.

See Also

Project VBCorLib Overview | Class StreamWriter Overview


StringBuilder

StringBuilder

Allows easy manipulation, concatenation and removal of strings and characters.

Remarks

This class can be used to quickly minpulate strings. It allows for easy concatenation, removal and modification of the current underlying string value.

See Also

Project VBCorLib Overview | Constructors | NumberFormatInfo | DateTimeFormatInfo

Implements:

IObject

Public:

Properties:

Name | Description
Capacity (get) | Returns the buffer size of the string value.
Capacity (let) | Sets the amount of memory allocated in characters.
Chars (get) | Returns a character from the string value.
Chars (let) | Sets a character in the string value.
FillCharacter (get) | Returns the fill character used to pad empty space.
FillCharacter (let) | Sets the fill character used to pad empty space.
Length (get) | Returns the length of the current string value.
Length (let) | Sets the length of the current string value.

Methods:

Name | Description
Append | Appends a string to the current string value.
AppendChar | Appends a character a specified number of times to the end of string value.
AppendChars | Appends an array of characters to the end of the string value.
AppendFormat | Appends a string with formatted arguments.
AppendFormatEx | Appends a string with formatted arguments using the supplied provider.
AppendLine | Appends the supplied string and a Carriage-Return/Linefeed to the end of the StringBuilder.
AppendQuick | This function is designed to append strings quickly.
AppendString | Appends a string to the current string value.
CopyTo | Copies a set of characters from the StringBuilder into a character array.
EnsureCapacity | Ensures that the internal buffer has atleast the requested amount.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Insert | Inserts a string into the current string value.
InsertChars | Inserts an array of characters into the string value.
Remove | Removes a number of characters from the string value.
Replace | Replaces a substring in the string value with a new string.
ToString | Returns the current version of the string value.


StringBuilder: Append

Append

Appends a string to the current string value.

 Public Function Append(
      ByRef Value As Variant,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As StringBuilder

Parameters

Value
[ByRef] Variant. Value to be appended.
StartIndex
[ByRef] Optional. Variant. A zero-based index of the first character to start appending from in the string.
Count
[ByRef] Optional. Variant. The number of characters from the string to append.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

This version of Append attempts to convert to the value using the Convert.ToString method. This will allow for objects that impelement IObject or IFormattable to be converted to a string value.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: AppendChar

AppendChar

Appends a character a specified number of times to the end of string value.

 Public Function AppendChar(
      ByVal Char As Long,
      Optional ByVal Count As Long = 1 ) As StringBuilder

Parameters

Char
[ByVal] Long. The AscW character code to append.
Count
[ByVal] Optional. Long. The number of times to append the character.

Default: 1

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

The character is a unicode value from -32767 to 65535. For values that are greater than 32767 (&H7FFF), 65536 (&H10000) is subtracted from it to map the character to a 16-bit Integer without overflowing.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: AppendChars

AppendChars

Appends an array of characters to the end of the string value.

 Public Function AppendChars(
      ByRef Chars ( ) As Integer,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As StringBuilder

Parameters

Chars
[ByRef] Integer. The array of characters to be appended.
StartIndex
[ByRef] Optional. Variant. The index from Chars to start appending.
Count
[ByRef] Optional. Variant. The number of characters to append.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: AppendFormat

AppendFormat

Appends a string with formatted arguments.

 Public Function AppendFormat(
      ByRef Format As String,
      ParamArray args ( ) As Variant ) As StringBuilder

Parameters

Format
[ByRef] String. The string to append that contains formatting information.
args
[ByRef] Variant. The arguments to be formatted into the string.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

The format string can embed indexes into the args parameter to indicate where a value should be placed. The way to indicate an index is through an argument index enclosed in braces {N}. N is the parameter index beginning with zero.

Some arguments may handle additional formatting commands. Please refer to their documentation for more information.

Example

' This example uses the AppendFormat method to insert
' values into the string with formatting information. The
' output will show how the formatting information was used
' to transform the arguments into a formatted output.
Private Sub Main()
    Dim sb As New StringBuilder

    ' Indicates the index of the supplied
    ' arguments to be inserted into the string.
    sb.AppendFormat "My name {0}.", "Kelly"
    sb.Append vbCrLf

    ' Insert an integer value that is 5 digits
    ' in length, prepending leading zeros if necessary.
    sb.AppendFormat "A number with leading zeros: {0:d5}.", 23
    sb.Append vbCrLf

    ' Inserts the value into a column of 10 characters
    ' with alignment to the right of the column.
    sb.AppendFormat "Right aligned 10 character column: '{0,10}'.", "right"
    sb.Append vbCrLf

    ' Inserts the value into a column of 10 characters
    ' with alignment fo the left of the column.
    sb.AppendFormat "Left aligned 10 character column: '{0,-10}'.", "left"
    sb.Append vbCrLf

    ' To prevent the insertion of an argument and allow
    ' for curly braces to be inserted into the string, two
    ' braces must be placed together to cause an escape from
    ' the formatting sequence.
    sb.AppendFormat "Use two braces to put a single brace in the output without formatting. {{0}}", "No Used"

    ' Display the contents of the StringBuilder
    Console.WriteLine sb.ToString

    ' Wait for user to press enter
    Console.ReadLine
End Sub

' This code produces the following output.
'
' My name Kelly.
' A number with leading zeros: 00023.
' Right aligned 10 character column: '     right'.
' Left aligned 10 character column: 'left      '.
' Use two braces to put a single brace in the output without formatting. {0}

See Also

Project VBCorLib Overview | Class StringBuilder Overview | NumberFormatInfo | DateTimeFormatInfo


StringBuilder: AppendFormatEx

AppendFormatEx

Appends a string with formatted arguments using the supplied provider.

 Public Function AppendFormatEx(
      ByVal Provider As IFormatProvider,
      ByRef Format As String,
      ParamArray args ( ) As Variant ) As StringBuilder

Parameters

Provider
[ByVal] IFormatProvider. A custom formatting object that formats the arguments.
Format
[ByRef] String. The string to append that contains formatting information.
args
[ByRef] Variant. The arguments to be formatted into the string.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

The format string can embed indexes into the args parameter to indicate where a value should be placed. The way to indicate an index is through an argument index enclosed in braces {N}. N is the parameter index beginning with zero.

Some arguments may handle additional formatting commands. Please refer to their documentation for more information.

The supplied provider can format specific arguments unknown to the system. It can also delegate formatting of system-known arguments to another StringBuilder (usually cString.Format) to provide default formatting of known types and format only specific types.

See Also

Project VBCorLib Overview | Class StringBuilder Overview | NumberFormatInfo | DateTimeFormatInfo


StringBuilder: AppendLine

AppendLine

Appends the supplied string and a Carriage-Return/Linefeed to the end of the StringBuilder.

 Public Function AppendLine(
      Optional ByVal s As String ) As StringBuilder

Parameters

s
[ByVal] Optional. String. The string to append to the builder, followed by a Carraige-Return/Linefeed.

Return Values

StringBuilder - A reference to this instance of StringBuilder.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: AppendQuick

AppendQuick

This function is designed to append strings quickly.

 Public Sub AppendQuick(
      ByRef s As String )

Parameters

s
[ByRef] String. The string value to be appended.

Remarks

This method appends the entire string to the end of the StringBuilder. There is no return reference to the StringBuilder.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: AppendString

AppendString

Appends a string to the current string value.

 Public Function AppendString(
      ByRef s As String,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As StringBuilder

Parameters

s
[ByRef] String. String to be appended.
StartIndex
[ByRef] Optional. Variant. A zero-based index of the first character to start appending from in the string.
Count
[ByRef] Optional. Variant. The number of characters from the string to append.

Return Values

StringBuilder - A reference to this instance of StringBuilder.

Remarks

This version of append is designed for fast concatentation of the supplied string value. The entire string is appended.

This function does not return a reference to the instance of StringBuilder in order to keep the overhead cost down on the function call.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Capacity (get)

Capacity

Returns the buffer size of the string value.

 Public Property Get Capacity ( ) As Long

Return Values

Long - Value indicating the amount of memory allocated in characters.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Capacity (let)

Capacity

Sets the amount of memory allocated in characters.

 Public Property Let Capacity(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of characters to allocate.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Chars (get)

Chars

Returns a character from the string value.

 Public Property Get Chars(
      ByVal Index As Long ) As Integer

Parameters

Index
[ByVal] Long. The index from the string value to return the character.

Return Values

Integer - The character in the string at the specified index.

Remarks

Index is zero-base.

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Chars (let)

Chars

Sets a character in the string value.

 Public Property Let Chars(
      ByVal Index As Long,
      ByVal Char As Integer )

Parameters

Index
[ByVal] Long. The index into the string value to set the character.
Char
[ByVal] Integer. The character to set.

Remarks

index is zero-based.

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: CopyTo

CopyTo

Copies a set of characters from the StringBuilder into a character array.

 Public Sub CopyTo(
      ByVal SourceIndex As Long,
      ByRef Destination ( ) As Integer,
      ByVal DestinationIndex As Long,
      ByVal Count As Long )

Parameters

SourceIndex
[ByVal] Long. The starting index in the StringBuilder to be copying from (0-based).
Destination
[ByRef] Integer. The character array to copy to.
DestinationIndex
[ByVal] Long. The start index to begin placing characters in to.
Count
[ByVal] Long. The number of characters to copy.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: EnsureCapacity

EnsureCapacity

Ensures that the internal buffer has atleast the requested amount.

 Public Function EnsureCapacity(
      ByVal RequiredCapacity As Long ) As Long

Parameters

RequiredCapacity
[ByVal] Long. The minimum amount of characters to be allocated.

Return Values

Long - The capacity after the call is complete.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to test equality on.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: FillCharacter (get)

FillCharacter

Returns the fill character used to pad empty space.

 Public Property Get FillCharacter ( ) As Variant

Return Values

Variant - An Integer representing the AscW of the character.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: FillCharacter (let)

FillCharacter

Sets the fill character used to pad empty space.

 Public Property Let FillCharacter(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. The character as either a String or Integer value.

Remarks

The new value can be either String, in which case the first characters is used, or it can be a number.

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Insert

Insert

Inserts a string into the current string value.

 Public Function Insert(
      ByVal Index As Long,
      ByVal Value As String,
      Optional ByVal Count As Long = 1 ) As StringBuilder

Parameters

Index
[ByVal] Long. The index in the string value to start inserting the new string.
Value
[ByVal] String. The string to be inserted.
Count
[ByVal] Optional. Long. The number of times to insert the string.

Default: 1

Return Values

StringBuilder - This instance of StringBuilder

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: InsertChars

InsertChars

Inserts an array of characters into the string value.

 Public Function InsertChars(
      ByVal Index As Long,
      ByRef Chars ( ) As Integer,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As StringBuilder

Parameters

Index
[ByVal] Long. The index in the string value to start inserting.
Chars
[ByRef] Integer. The characters to be inserted.
StartIndex
[ByRef] Optional. Variant. The index in the Characters to start inserting from.
Count
[ByRef] Optional. Variant. The number of characters to be inserted.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Length (get)

Length

Returns the length of the current string value.

 Public Property Get Length ( ) As Long

Return Values

Long - The length of the string value.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Length (let)

Length

Sets the length of the current string value.

 Public Property Let Length(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The length of the string value.

Remarks

If the new value is longer than the current length, then the new space is padded with FillCharacter (default 32).

Read/Write.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Remove

Remove

Removes a number of characters from the string value.

 Public Function Remove(
      ByVal StartIndex As Long,
      ByVal Count As Long ) As StringBuilder

Parameters

StartIndex
[ByVal] Long. The index in the string value to start removing from.
Count
[ByVal] Long. The number of characters to remove from the string value.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

startindex is zero-based.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: Replace

Replace

Replaces a substring in the string value with a new string.

 Public Function Replace(
      ByVal OldValue As String,
      ByVal NewValue As String,
      Optional ByRef StartIndex As Variant,
      Optional ByRef Count As Variant ) As StringBuilder

Parameters

OldValue
[ByVal] String. The substring to be replaced.
NewValue
[ByVal] String. The string to replace the old string with.
StartIndex
[ByRef] Optional. Variant. The index of the start of the substring in the StringBuilder object.
Count
[ByRef] Optional. Variant. The number of characters in the StringBuilder object substring.

Return Values

StringBuilder - This instance of StringBuilder.

Remarks

Use index and count to replace the old value with a substring of the new value. index is zero-based.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringBuilder: ToString

ToString

Returns the current version of the string value.

 Public Function ToString(
      Optional ByRef StartIndex As Variant,
      Optional ByRef Length As Variant ) As String

Parameters

StartIndex
[ByRef] Optional. Variant. The index to start the return substring from.
Length
[ByRef] Optional. Variant. The number of characters to return in the string.

Return Values

String - A string or substring representing the internal string of the builder.

Remarks

startindex is zero-based.

See Also

Project VBCorLib Overview | Class StringBuilder Overview


StringReader

StringReader

Provides methods to read portions of a string.

See Also

Project VBCorLib Overview Constructors | TextReader

Implements:

IObject
TextReader

Public:

Methods:

Name | Description
CloseReader | Closes the reader
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
Peek | Returns the next character in the string without consuming that character. The character is still the next to be read.
Read | Returns the next character in the string, moving the current position to the next character.
ReadBlock | Fills an array with a block of characters from the string.
ReadLine | Reads a line terminated by a CarriageReturn or LineFeed from the string.
ReadToEnd | Returns from the current position in the string to the end.
ToString | Returns a string representation of this object instance.


StringReader: CloseReader

CloseReader

Closes the reader

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: Peek

Peek

Returns the next character in the string without consuming that character. The character is still the next to be read.

 Public Function Peek ( ) As Long

Return Values

Long - The character Unicode value, or -1 if the end of the string was reached.

Remarks

For characters from &H8000 and above, the value will be positive still, even though the underlying Integer is negative. This is to allow for a -1 to be returned without being confused with an actual character in the string.

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: Read

Read

Returns the next character in the string, moving the current position to the next character.

 Public Function Read ( ) As Long

Return Values

Long - For characters from &H8000 and above, the value will be positive still, even though the underlying Integer is negative. This is to allow for a -1 to be returned without being confused with an actual character in the string.

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: ReadBlock

ReadBlock

Fills an array with a block of characters from the string.

 Public Function ReadBlock(
      ByRef Chars ( ) As Integer,
      ByVal Index As Long,
      ByVal Count As Long ) As Long

Parameters

Chars
[ByRef] Integer. The array to receive the characters read from the string.
Index
[ByVal] Long. The starting index in Chars to begin writing.
Count
[ByVal] Long. The maximum number of characters to be read from the string.

Return Values

Long - The actual number of characters read from the string.

Remarks

If not enough characters exist to fill Count characters, then fewer characters will be returned than Count.

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: ReadLine

ReadLine

Reads a line terminated by a CarriageReturn or LineFeed from the string.

 Public Function ReadLine ( ) As String

Return Values

String - A line from the string or a null string.

Remarks

The returned line does not contain the termination character. If the character is a CarriageReturn followed immediately by a LineFeed, then the LineFeed character is also consumed.

If there are no more characters to be read, then Null is returned.

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: ReadToEnd

ReadToEnd

Returns from the current position in the string to the end.

 Public Function ReadToEnd ( ) As String

Return Values

String - If there are no more characters to be read, then Null is returned.

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: TextReader

TextReader

 Implements TextReader

Return Values

TextReader -

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringReader: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class StringReader Overview


StringWriter

StringWriter

Provides a set of functions for writing to a string.

See Also

Project VBCorLib Overview Constructors | TextWriter

Implements:

IObject
TextWriter

Public:

Properties:

Name | Description
Encoding (get) | Returns the encoding in which the output is written.
FormatProvider (get) | Returns the format provider the writer uses for formatting values.
NewLine (get) | Returns the string currently used to represent a new-line set of characters.
NewLine (let) | Sets the string to be used as the new-line set of characters.

Methods:

Name | Description
CloseWriter | Closes the writer
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
Flush | Writes any buffered data to the underlying string.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetStringBuilder | Returns the underlying stringbuilder being used to write to the string.
ToString | Returns a string representation of this object instance.
WriteLine | Writes a value to the string, followed by a new-line set of characters.
WriteValue | Writes a value to the string.


StringWriter: CloseWriter

CloseWriter

Closes the writer

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: Encoding (get)

Encoding

Returns the encoding in which the output is written.

 Public Property Get Encoding ( ) As Encoding

Return Values

Encoding - The encoding of the output string.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: Flush

Flush

Writes any buffered data to the underlying string.

 Public Sub Flush ( )

Remarks

Since the data is directly written to the underlying string, this function does nothing. It is here to maintain interface consistency.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: FormatProvider (get)

FormatProvider

Returns the format provider the writer uses for formatting values.

 Public Property Get FormatProvider ( ) As IFormatProvider

Return Values

IFormatProvider - The format provider used by the writer.

Remarks

The format provider used is the returned by the current culture.

Read Only.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: GetStringBuilder

GetStringBuilder

Returns the underlying stringbuilder being used to write to the string.

 Public Function GetStringBuilder ( ) As StringBuilder

Return Values

StringBuilder - The StringBuilder being used to write to the string.

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: NewLine (get)

NewLine

Returns the string currently used to represent a new-line set of characters.

 Public Property Get NewLine ( ) As String

Return Values

String - The new-line set of characters.

Remarks

The default is CarriageReturn-LineFeed.

Read/Write.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: NewLine (let)

NewLine

Sets the string to be used as the new-line set of characters.

 Public Property Let NewLine(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. The new-line set of characters.

Remarks

The default is CarriageReturn-LineFeed.

Read/Write.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: TextWriter

TextWriter

 Implements TextWriter

Return Values

TextWriter -

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: WriteLine

WriteLine

Writes a value to the string, followed by a new-line set of characters.

 Public Sub WriteLine(
      ParamArray values ( ) As Variant )

Parameters

values
[ByRef] Variant. The value to be written to the string

Remarks

The first argument in values is the output to the string. Any additional arguments are used as formatting information. An argument can be refered to through formatting indexes. A formatting index is an integer enclosed in curly braces {}. The indexes start at 0.

Numbers and Dates will be formatted to the culture that was passed in using Cor.NewStringWriter. If no culture was specified, then the current culture for this computer is used.

See Also

Project VBCorLib Overview | Class StringWriter Overview


StringWriter: WriteValue

WriteValue

Writes a value to the string.

 Public Sub WriteValue(
      ByRef Value As Variant,
      ParamArray args ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to be written to the stream.
args
[ByRef] Variant. The arguments to be used in formatting the Value.

Remarks

The args are used when argument indexes are supplied in the value to be written. Indexes are indicate by enclosing the specific index in curly braces {}. The indexes start at 0.

See Also

Project VBCorLib Overview | Class StringWriter Overview


SymmetricAlgorithm

SymmetricAlgorithm

Provides a standard interface for utilizing symmetric algorithms.

Remarks

A symmetric algorithm is one that uses the same Key and Initialization Vector to both encrypt and decrypt data.

For one of the symmetric algorithms to work, a Key and Initialization Vector needs to be supplied to the Crypto Service Provider.

See Also

Project VBCorLib Overview

Public:

Types:

Name | Description
CipherMode | A defined set of cipher modes the algorithms can use.
PaddingMode | A defined set of padding modes used to fill the end of non-blocksize length data blocks. For example if an algorithm has a blocksize of 8 bytes and the data is 3 bytes in length, then 5 bytes of padding must be applied.

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by the cryptographic operation.
BlockSize (let) | Sets the block size, in bits, used by the cryptographic operation.
FeedbackSize (get) | Returns the feedback size, in bits, used by the cryptographic operation.
FeedbackSize (let) | Sets the feedback size, in bits, used by the cryptographic operation.
IV (get) | Returns the Initialization Vector used by the cryptographic operation.
IV (let) | Sets the Initialization Vector used by the cryptographic operation.
Key (get) | Returns the secret key used by the cryptographic operation.
Key (let) | Sets the secret key to be used by the cryptographic operation.
KeySize (get) | Returns the size of the key, in bits, used by the cryptographic operation.
KeySize (let) | Sets the size of the key, in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the mode the current algoritm is set to.
Mode (let) | Sets the mode the current algorithm is set to.
Padding (get) | Returns the padding to be used by the algorithm.
Padding (let) | Sets the padding to be used by the algorithm.

Methods:

Name | Description
Clear | Releases all resources.
CreateDecryptor | Creates a new decryptor using the Triple Data Encryption Standard algorithm.
CreateEncryptor | Creates a new encryptor using the Triple Data Ecryption Standard algorithm.
Equals | Returns if this instance and the value are equal.
GenerateIV | Generates a new Initialization Vector array.
GenerateKey | Generates a new Key based on the key size.
GetHashCode | Returns a semi-unique value that represents this instance.
ToString | Returns a string representation of this instance.
ValidKeySize | Checks if the specific number of bits is a valid key size.


SymmetricAlgorithm: BlockSize (get)

BlockSize

Returns the block size, in bits, used by the cryptographic operation.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: BlockSize (let)

BlockSize

Sets the block size, in bits, used by the cryptographic operation.

 Public Property Let BlockSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

An invalid block size will cause a CryptographicException.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: CipherMode

CipherMode

A defined set of cipher modes the algorithms can use.

 Public Enum CipherMode

Values

CBC = 1
The Cipher Block Chaining (CBC) uses a feedback mechanism by Exclusive ORing the previously encrypted block of data with the current block being processed. This is to prevent two identical blocks from encrypting into the same to encrypted blocks of data, making it more difficult to break the encryption. An Initialization Vector array is also used by Exclusive ORing the vector with the current block before encryption.
ECB = 2
The Electronic Codebook (ECB) processes blocks individually and does not alter identical blocks of data. If two or more blocks of data are the same then their encrypted blocks will also be the same. A message with several identical blocks could become easier to decrypt.
OFB = 3
The Output Feedback (OFB) method processes small increments of blocks into ciphered text instead of the entire block at one time. This works similar to the Cipher Feedback method, except if a ciphered bit is corrupted, then all plain text data following the bit will be corrupted.
CFB = 4
The Cipher Feedback (CFB) method processes small increments of plain text into ciphered text instead of the entire block at one time. The method uses a shift register that is one block in length. If one bit of ciphered data is corrupted, then the corrisponding plain text bit is also corrupted until the corrupted bit is finally shifted out of the register.
CTS = 5
The Cipher Text Stealing (CTS) mode handles any length of plain text and produces cipher text whose length matches the plain text length. This mode behaves like the CBC mode for all but the last two blocks of the plain text.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Clear

Clear

Releases all resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: CreateDecryptor

CreateDecryptor

Creates a new decryptor using the Triple Data Encryption Standard algorithm.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to decrypt the ciphered text back into plain text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to decrypt ciphered text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: CreateEncryptor

CreateEncryptor

Creates a new encryptor using the Triple Data Ecryption Standard algorithm.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to encrypt the plain text into ciphered text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to encrypt plain text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Equals

Equals

Returns if this instance and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare for equality.

Return Values

Boolean - Returns if the value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: FeedbackSize (get)

FeedbackSize

Returns the feedback size, in bits, used by the cryptographic operation.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - Returns the feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: FeedbackSize (let)

FeedbackSize

Sets the feedback size, in bits, used by the cryptographic operation.

 Public Property Let FeedbackSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: GenerateIV

GenerateIV

Generates a new Initialization Vector array.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: GenerateKey

GenerateKey

Generates a new Key based on the key size.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: GetHashCode

GetHashCode

Returns a semi-unique value that represents this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns the semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: IV (get)

IV

Returns the Initialization Vector used by the cryptographic operation.

 Public Property Get IV ( ) As Byte ( ) :

Return Values

Byte() - Returns an array of bytes representing an Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same aswell. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: IV (let)

IV

Sets the Initialization Vector used by the cryptographic operation.

 Public Property Let IV(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same aswell. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

This must be set to an array the same size as the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Key (get)

Key

Returns the secret key used by the cryptographic operation.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - Returns the secret key.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

If a key has not been set, then a new key will be generated automatically.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Key (let)

Key

Sets the secret key to be used by the cryptographic operation.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new secret key to be used.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: KeySize (get)

KeySize

Returns the size of the key, in bits, used by the cryptographic operation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The size of the key in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: KeySize (let)

KeySize

Sets the size of the key, in bits.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the key in bits.

Remarks

This will cause the Key property to reset and regenerate when needed.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal block sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal key sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Mode (get)

Mode

Returns the mode the current algoritm is set to.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - Returns a CipherMode value.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Mode (let)

Mode

Sets the mode the current algorithm is set to.

 Public Property Let Mode(
      ByVal RHS As CipherMode ) :

Parameters

RHS
[ByVal] CipherMode. The new mode for the algorithm.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Padding (get)

Padding

Returns the padding to be used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - A current padding being used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: Padding (let)

Padding

Sets the padding to be used by the algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode ) :

Parameters

RHS
[ByVal] PaddingMode. The new padding value to be used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: PaddingMode

PaddingMode

A defined set of padding modes used to fill the end of non-blocksize length data blocks. For example if an algorithm has a blocksize of 8 bytes and the data is 3 bytes in length, then 5 bytes of padding must be applied.

 Public Enum PaddingMode

Values

None = 1
No padding is applied to the data.
PKCS7 = 2
The padding that is used is defined by a pattern of filling the remaining bytes with the numeric value of the padding bytes needed. If 5 bytes of padding are needed, then the 5 bytes would be 05 05 05 05 05.
Zeros = 3
The padded bytes are all equal to zero.
ANSIX923 = 4
The padding that is used is defined by a pattern of bytes set to zero with the last byte having the value of the number of padded bytes added. If 5 bytes of padding are needed, then the 5 bytes would be 00 00 00 00 05.
ISO10126 = 5
The padded bytes are random in value with the last byte being the number of padding bytes. If 5 bytes of padding are needed, then the 5 bytes might be 23 9A 48 7C 05.

Remarks

Most plain text messages do not have an length that is a multiple of the block size to be processed by the cipher. There is usually not enough bytes to completely fill the last block to be processed. In these cases, additional bytes need to be appended to make the final block the same size as the block size being processed.

The reverse is done when decrypting ciphered data back to plain text. The padded bytes are removed.

If a plain text message is 9 bytes long and the block size to be processed is 8 bytes, then two blocks will need to be processed. However, the second block will only have 1 byte, so 7 additional bytes are added for padding.

Data: FF FF FF FF FF FF FF FF FF

None: FF FF FF FF FF FF FF FF FF

PKCS7: FF FF FF FF FF FF FF FF FF 07 07 07 07 07 07 07

ANSIX923: FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 07

ISO10126: FF FF FF FF FF FF FF FF FF 7D 2A 75 EF F8 EF 07

Zeros: FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that represents this instance.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithm: ValidKeySize

ValidKeySize

Checks if the specific number of bits is a valid key size.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. A value to determine if is a legal key size.

Return Values

Boolean - Returns True if the bit length is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithm Overview


SymmetricAlgorithmBase

SymmetricAlgorithmBase

Provides a common base of functionality for SymmetricAlgorithm derived classes.

Remarks

The base class implements many of the details necessary for implementing a Symmetric Cryptographic Algorithm. By utilizing the base class the implementor can quickly provide a new implementation that is consistent with the existing implementations without the need to manage lower level details.

See Also

Project VBCorLib Overview

Public:

Properties:

Name | Description
BlockSize (get) | Returns the currently set block size in bits.
BlockSize (let) | Sets the current block size to be used.
FeedbackSize (get) | Returns the current feedback size in bits.
FeedbackSize (let) | Sets the current feedback size in bits to be used.
KeySize (get) | Returns the currently set key size to be used.
KeySize (let) | Sets the new key size value to be used.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the current cipher mode to be used.
Mode (let) | Sets the cipher mode to be used.
Padding (get) | Returns the current padding to be used.
Padding (let) | Sets the padding mode to be used.

Methods:

Name | Description
AddLegalBlockSize | Adds a new KeySizes object with the supplied values to the list of legal block sizes.
AddLegalKeySize | Adds a new KeySizes object with the supplied values to the list of legal key sizes.
Clear | Clears the IV and Key values.
CloneRgbIV | Returns a clone of an IV.
CloneRgbKey | Returns a clone of a key.
GenerateIV | Generates a random IV value.
GenerateKey | Generates a new random key.
GetIV | Returns the current IV value.
GetKey | Returns the current secret key.
SetIV | Sets the current IV value.
SetKey | Sets the current secret key.
ValidKeySize | Checks if a bit length is a valid key size in bits.

Events:

Name | Description
CheckForWeakKey | Used for implementations that must check for some kind of weak or semi-weak key.


SymmetricAlgorithmBase: AddLegalBlockSize

AddLegalBlockSize

Adds a new KeySizes object with the supplied values to the list of legal block sizes.

 Public Sub AddLegalBlockSize(
      ByVal MinSize As Long,
      ByVal MaxSize As Long,
      ByVal SkipSize As Long )

Parameters

MinSize
[ByVal] Long. The mininum block size in bits the algorithm can process.
MaxSize
[ByVal] Long. The maximum block size in bits the algorithm can process.
SkipSize
[ByVal] Long. The number of bits the block size can change from minimum to maximum.

Remarks

A derived class uses this to add the set of legal block sizes the implementing algorithm can process.

As an example, the RijndaelManaged class would be to call this method as such:

 Call mBase.AddLegalBlockSize(128, 256, 64)

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: AddLegalKeySize

AddLegalKeySize

Adds a new KeySizes object with the supplied values to the list of legal key sizes.

 Public Sub AddLegalKeySize(
      ByVal MinSize As Long,
      ByVal MaxSize As Long,
      ByVal SkipSize As Long )

Parameters

MinSize
[ByVal] Long. The mininum key size in bits the algorithm can use.
MaxSize
[ByVal] Long. The maximum key size in bits the algorithm can use.
SkipSize
[ByVal] Long. The number of bits used to step from the minimum to maximum key size. All intermediate sizes are also legal sizes.

Remarks

A derived class uses this to add the set of legal block sizes the implementing algorithm can process.

As an example, the RijndaelManaged class would be to call this method as such:

 Call mBase.AddLegalKeySize(128, 256, 64)

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: BlockSize (get)

BlockSize

Returns the currently set block size in bits.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The currently block size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: BlockSize (let)

BlockSize

Sets the current block size to be used.

 Public Property Let BlockSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new current block size to be used.

Remarks

The block size is in bits and must be one of the legal block sizes.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: CheckForWeakKey

CheckForWeakKey

Used for implementations that must check for some kind of weak or semi-weak key.

 Public Event CheckForWeakKey(
      ByRef RgbKey ( ) As Byte,
      ByRef Ex As Exception )

Parameters

RgbKey
[ByRef] Byte. The key to be checked for weakness.
Ex
[ByRef] Exception. The return of an exception indicating the key is weak and the specified exception should be thrown if appropriate.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: Clear

Clear

Clears the IV and Key values.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: CloneRgbIV

CloneRgbIV

Returns a clone of an IV.

 Public Function CloneRgbIV(
      ByRef RgbIV As Variant ) As Byte ( )

Parameters

RgbIV
[ByRef] Variant. The IV to return a clone of.

Return Values

Byte() - The newly cloned IV.

Remarks

If a missing parameter is passed in, then the IV from the GetIV function will be returned.

The cloned IV will be zero-based regardless of the base of the passed in IV array.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: CloneRgbKey

CloneRgbKey

Returns a clone of a key.

 Public Function CloneRgbKey(
      ByRef RgbKey As Variant ) As Byte ( )

Parameters

RgbKey
[ByRef] Variant. The key to return the clone of.

Return Values

Byte() - The newly cloned key.

Remarks

If a missing parameter is passed in, then the key from the GetKey function will be returned.

The cloned key will be zero-based regardless of the base of the passed in key array.

If a key is passed in, then the "CheckForWeakKey" event will be raised.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: FeedbackSize (get)

FeedbackSize

Returns the current feedback size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The current feedback size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: FeedbackSize (let)

FeedbackSize

Sets the current feedback size in bits to be used.

 Public Property Let FeedbackSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new feedback size.

Remarks

The feedback size must be greater than zero and evenly divisible by 8. The size cannot be greater than the current block size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: GenerateIV

GenerateIV

Generates a random IV value.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: GenerateKey

GenerateKey

Generates a new random key.

 Public Sub GenerateKey ( )

Remarks

The "CheckForWeakKey" event is raised.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: GetIV

GetIV

Returns the current IV value.

 Public Function GetIV ( ) As Byte ( )

Return Values

Byte() - The current IV value.

Remarks

If no IV has been set, then a random IV will be generated.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: GetKey

GetKey

Returns the current secret key.

 Public Function GetKey ( ) As Byte ( )

Return Values

Byte() - The current secret key is returned.

Remarks

If no key has been set, then a random key will be generated.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: KeySize (get)

KeySize

Returns the currently set key size to be used.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The currently set key size in bits to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: KeySize (let)

KeySize

Sets the new key size value to be used.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

The new value must be of a legal size.

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( )

Return Values

KeySizes() - Returns an array of KeySize objects containing all the legal block sizes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - An array of KeySize objects containing all the legal key sizes in bits.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: Mode (get)

Mode

Returns the current cipher mode to be used.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - The current cipher mode to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview | CipherMode


SymmetricAlgorithmBase: Mode (let)

Mode

Sets the cipher mode to be used.

 Public Property Let Mode(
      ByVal RHS As CipherMode )

Parameters

RHS
[ByVal] CipherMode. The new cipher mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview | CipherMode


SymmetricAlgorithmBase: Padding (get)

Padding

Returns the current padding to be used.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The currnet padding.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview | PaddingMode


SymmetricAlgorithmBase: Padding (let)

Padding

Sets the padding mode to be used.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding mode to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview | PaddingMode


SymmetricAlgorithmBase: SetIV

SetIV

Sets the current IV value.

 Public Sub SetIV(
      ByRef RgbIV ( ) As Byte )

Parameters

RgbIV
[ByRef] Byte. The new IV value.

Remarks

The bit length of the IV value must equal the block size.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: SetKey

SetKey

Sets the current secret key.

 Public Sub SetKey(
      ByRef RgbKey ( ) As Byte )

Parameters

RgbKey
[ByRef] Byte. The new secret key.

Remarks

The bit length of the new value must be of a legal key size.

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SymmetricAlgorithmBase: ValidKeySize

ValidKeySize

Checks if a bit length is a valid key size in bits.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. The value to check.

Return Values

Boolean - Returns True if the value is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SymmetricAlgorithmBase Overview


SystemException

SystemException

Defines the base class for predefined exceptions in the VBCorLib library.

Remarks

This class is used to differenciate between exceptions raised by VBCorLib and the executing application. In most cases, an instance of this class should not be thrown.

See Also

Project VBCorLib Overview | Constructors | ExceptionMethods | Exception

Implements:

Exception
IObject

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


SystemException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview | Exception


SystemException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview | Exception


SystemException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class SystemException Overview


SystemException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class SystemException Overview


TaiwanCalendar

TaiwanCalendar

Provides functions for manipulating Taiwanese dates.

See Also

Project VBCorLib Overview Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) |
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


TaiwanCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class TaiwanCalendar Overview


TaiwanCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class TaiwanCalendar Overview


TaiwanCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class TaiwanCalendar Overview


TaiwanCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class TaiwanCalendar Overview


TaiwanCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class TaiwanCalendar Overview


TextReader

TextReader

Provides an interface to read text characters from a stream.

See Also

Project VBCorLib Overview TextReaderStatic | StreamReader | StringReader

Public:

Methods:

Name | Description
CloseReader | Closes the current reader.
Equals | Returns if the value is equal to this instance of TextReader
GetHashCode | Returns a pseudo-unique number that identifies this object instance.
Peek | Returns the next character from the stream without advancing to the next characters.
Read | Returns the next character in the stream, consuming that character.
ReadBlock | Fills a character array (Integer Array) with the specified number of characters, returning the actual number of characters read from the stream.
ReadLine | Reads characters from the stream until a Return or a LineFeed is found, returning all characters up to that line break.
ReadToEnd | Reads the remaining characters in the stream, returning them as a string.
ToString | Returns a string representation of this instance.


TextReader: CloseReader

CloseReader

Closes the current reader.

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: Equals

Equals

Returns if the value is equal to this instance of TextReader

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to campare equality with.

Return Values

Boolean - True if Value equals this class instance, else False.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: GetHashCode

GetHashCode

Returns a pseudo-unique number that identifies this object instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Value that identifies this instance.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: Peek

Peek

Returns the next character from the stream without advancing to the next characters.

 Public Function Peek ( ) As Long

Return Values

Long - The next character in the Stream, or -1 if no characters remain in the stream.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: Read

Read

Returns the next character in the stream, consuming that character.

 Public Function Read ( ) As Long

Return Values

Long - The next character in the stream, or -1 if no more characters are in the stream.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: ReadBlock

ReadBlock

Fills a character array (Integer Array) with the specified number of characters, returning the actual number of characters read from the stream.

 Public Function ReadBlock(
      ByRef Chars ( ) As Integer,
      ByVal Index As Long,
      ByVal Count As Long ) As Long

Parameters

Chars
[ByRef] Integer. The character array to receive Count characters from the stream.
Index
[ByVal] Long. The starting index in Chars to begin storing characters.
Count
[ByVal] Long. The number of characters to be read from the stream.

Return Values

Long - The actual number of characters read from the stream.

Remarks

Characters are encoded within the stream. A single character may require more that one byte to represent it. This may result in fewer characters read than there are bytes in the stream.

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: ReadLine

ReadLine

Reads characters from the stream until a Return or a LineFeed is found, returning all characters up to that line break.

 Public Function ReadLine ( ) As String

Return Values

String - A string containing characters up to the line break.

Remarks

The line break is not included in the return value. If a Return is followed immediately by a LineFeed, then the LineFeed is also removed.

If the return value is a null-string, then the end of the stream was reached. To determine if the return string is a null-string us the cString.IsNull function.

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: ReadToEnd

ReadToEnd

Reads the remaining characters in the stream, returning them as a string.

 Public Function ReadToEnd ( ) As String

Return Values

String - A string containing the remaining characters in the stream.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReader: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class TextReader Overview


TextReaderStatic

TextReaderStatic

Provides static functions to be accesses using TextReader.* calling convention.

See Also

Project VBCorLib Overview TextReader

Public:

Properties:

Name | Description
NullReader (get) | Returns a TextReader that performs no action.


TextReaderStatic: NullReader (get)

NullReader

Returns a TextReader that performs no action.

 Public Property Get NullReader ( ) As TextReader

Return Values

TextReader - The Null TextReader.

Remarks

The reader performs as if reading from past the end of the underlying stream. The default behaviour sets the return values to the values used to indicate that nothing has been done.
Read returns -1.
Peek returns -1.
ReadBlock returns 0.
ReadLine returns Null.
ReadToEnd returns Null.

Read Only.

See Also

Project VBCorLib Overview | Class TextReaderStatic Overview


TextWriter

TextWriter

Provides an interface used to write text characters to a stream.

Remarks

The specific writer will use the supplied or default Encoding scheme to convert text characters to byte arrays to be written to the stream.

See Also

Project VBCorLib Overview | StreamWriter | StringWriter

Public:

Properties:

Name | Description
Encoding (get) | Returns the encoding being used by this reader instance.
FormatProvider (get) | Returns the format provider used by this read instance.
NewLine (get) | Returns the NewLine character used by this reader.
NewLine (let) | Sets the NewLine character used by this writer.

Methods:

Name | Description
CloseWriter | Closes this writer instance.
Equals | Returns if the value is equal to this instance of TextWriter
Flush | Forces any data being cached to be written to the stream immediately.
GetHashCode | Returns a pseudo-unique number that identifies this object instance.
ToString | Returns a string representation of this instance.
WriteLine | Writes the string representation of the value followed by a NewLine to the stream using both the format provider and encoding objects.
WriteValue | Writes the string representation of the value to the stream using both the format provider and encoding objects.


TextWriter: CloseWriter

CloseWriter

Closes this writer instance.

 Public Sub CloseWriter ( )

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: Encoding (get)

Encoding

Returns the encoding being used by this reader instance.

 Public Property Get Encoding ( ) As Encoding

Return Values

Encoding - An encoding type used to convert characters to bytes.

Remarks

All characters need to be converted to byte arrays in order to be written to a stream. Encodings perform this conversion.

Read Only.

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: Equals

Equals

Returns if the value is equal to this instance of TextWriter

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to campare equality with.

Return Values

Boolean - True if Value equals this class instance, else False.

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: Flush

Flush

Forces any data being cached to be written to the stream immediately.

 Public Sub Flush ( )

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: FormatProvider (get)

FormatProvider

Returns the format provider used by this read instance.

 Public Property Get FormatProvider ( ) As IFormatProvider

Return Values

IFormatProvider - The format provider used to format values to text.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: GetHashCode

GetHashCode

Returns a pseudo-unique number that identifies this object instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Value that identifies this instance.

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: NewLine (get)

NewLine

Returns the NewLine character used by this reader.

 Public Property Get NewLine ( ) As String

Return Values

String - Returns the current newline character.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: NewLine (let)

NewLine

Sets the NewLine character used by this writer.

 Public Property Let NewLine(
      ByVal RHS As String ) :

Parameters

RHS
[ByVal] String. The newline characters to be used.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: WriteLine

WriteLine

Writes the string representation of the value followed by a NewLine to the stream using both the format provider and encoding objects.

 Public Sub WriteLine(
      ParamArray Value ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to be written.

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


TextWriter: WriteValue

WriteValue

Writes the string representation of the value to the stream using both the format provider and encoding objects.

 Public Sub WriteValue(
      ByRef Value As Variant,
      ParamArray args ( ) As Variant )

Parameters

Value
[ByRef] Variant. The value to be written.
args
[ByRef] Variant. Formatting arguments used in formating the Value.

Remarks

See Also

Project VBCorLib Overview | Class TextWriter Overview


ThaiBuddhistCalendar

ThaiBuddhistCalendar

Provides methods for manipulating ThaiBuddhist dates.

See Also

Project VBCorLib Overview ThaiBuddhistCalendarStatic | Calendar

Implements:

Calendar
IObject

Public:

Properties:

Name | Description
Eras (get) | Returns an array of eras this calendar represents.
TwoDigitYearMax (get) |
TwoDigitYearMax (let) |

Methods:

Name | Description
AddDays |
AddHours |
AddMilliseconds |
AddMinutes |
AddMonths |
AddSeconds |
AddWeeks |
AddYears |
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayOfMonth |
GetDayOfWeek |
GetDayOfYear |
GetDaysInMonth |
GetDaysInYear |
GetEra |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetHour |
GetMilliseconds |
GetMinute |
GetMonth |
GetMonthsInYear |
GetSecond |
GetWeekOfYear |
GetYear |
IsLeapDay |
IsLeapMonth |
IsLeapYear |
ToDateTime |
ToFourDigitYear |
ToString | Returns a string representation of this object instance.


ThaiBuddhistCalendar: Calendar

Calendar

 Implements Calendar

Return Values

Calendar -

Remarks

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendar: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendar: Eras (get)

Eras

Returns an array of eras this calendar represents.

 Public Property Get Eras ( ) As Long ( )

Return Values

Long() - An array of eras.

Remarks

The calendar only recognizes the current era. The array only contains one element.

Read Only.

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendar: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendar: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendar: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendar Overview


ThaiBuddhistCalendarStatic

ThaiBuddhistCalendarStatic

Provides static methods of the ThaiBuddhistCalendar class.

See Also

Project VBCorLib Overview ThaiBuddhistCalendar

Public:

Properties:

Name | Description
ThaiBuddhistEra (get) | Returns the current era of the ThaiBuddhist calendar.


ThaiBuddhistCalendarStatic: ThaiBuddhistEra (get)

ThaiBuddhistEra

Returns the current era of the ThaiBuddhist calendar.

 Public Property Get ThaiBuddhistEra ( ) As Long

Return Values

Long - Returns a constant of 1.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class ThaiBuddhistCalendarStatic Overview


Ticker

Ticker

Provides a recurring timer event.

Remarks

To create new Ticker using the constructor, call the NewTicker method.

 Private WithEvents mTicker As Ticker

 Private Sub Class_Initialize()
     Set mTicker = NewTicker(2000)
     mTicker.StartTicker
 End Sub

 Private Sub mTicker_Elapsed()
     ' occurs every 2000 milliseconds (2 seconds.)
 End Sub
The Ticker can also use a callback function when the time has elapsed instead of only raising an event. The event is still raised, however, a callback function is called as well.
 Private mTicker As Ticker  ' declared without using WithEvents

 Private Sub Main()
     Set mTicker = NewTicker(2000,,, AddressOf TimerCallback)
     mTicker.StartTicker

     ' Application Code
 End Sub

 Private Sub TickerCallback(ByRef Ticker As Ticker, ByRef Data As Variant)
     ' occurs every 2000 milliseconds (2 seconds.)
 End Sub

See Also

Project VBCorLib Overview | Constructors

Implements:

IObject

Public:

Properties:

Name | Description
AutoReset (get) | Returns if the Ticker event will be recurring.
AutoReset (let) | Sets if the Ticker event will be recurring or not.
Callback (get) | Returns the callback address of the function used by the Ticker object.
Callback (let) | Sets the callback address of the function to be used by the Ticker object.
Data (get) | Returns custom data associated with this Ticker instance.
Data (let) | Sets custom data associated with this Ticker instance.
Data (set) | Sets custom data associated with this Ticker instance.
Enabled (get) | Returns if the Ticker is currently running.
Enabled (let) | Sets the Ticker to be stopped or running.
Interval (get) | Returns the duration between Ticker events in milliseconds.
Interval (let) | Sets the duration between Ticker events in milliseconds.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
StartTicker | Starts the Ticker.
StopTicker | Stops the Ticker if it is running.
ToString | Returns a string representation of this object instance.

Events:

Name | Description
Elapsed | This event is raised when the Ticker interval has been reached.


Ticker: AutoReset (get)

AutoReset

Returns if the Ticker event will be recurring.

 Public Property Get AutoReset ( ) As Boolean

Return Values

Boolean - AutoReset flag.

Remarks

If AutoReset is set to false, then the Ticker event will happen only once. The Ticker will need to be restarted for another event to occur.

The default is True.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: AutoReset (let)

AutoReset

Sets if the Ticker event will be recurring or not.

 Public Property Let AutoReset(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Flag indicating if the Ticker will be recurring.

Remarks

If AutoReset is set to false, then the Ticker event will happen only once. The Ticker will need to be restarted for another event to occur.

The default is True.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Callback (get)

Callback

Returns the callback address of the function used by the Ticker object.

 Public Property Get Callback ( ) As Long

Return Values

Long - Callback address. Setting this to zero will stop the callback.

Remarks

A callback method is used to allow a Ticker object to notify the function without having to use an Event. A function callback must have the following signature, or the application may crash.

 Public Sub TickerCallback(ByRef Ticker As Ticker, ByRef Data As Variant)
     ' do stuff
 End Sub
The two parameters must be declared as ByRef.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Callback (let)

Callback

Sets the callback address of the function to be used by the Ticker object.

 Public Property Let Callback(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The address of the callback function. Setting this to zero will stop the callback.

Remarks

A callback method is used to allow a Ticker object to notify the function without having to use an Event. A function callback must have the following signature, or the application may crash.

 Public Sub TickerCallback(ByRef Ticker As Ticker, ByRef Data As Variant)
     ' do stuff
 End Sub
The two parameters must be declared as ByRef.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Data (get)

Data

Returns custom data associated with this Ticker instance.

 Public Property Get Data ( ) As Variant

Return Values

Variant - Custom data.

Remarks

The data is not used by the Ticker. It is to allow a developer to associate values to the Ticker if needed.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Data (let)

Data

Sets custom data associated with this Ticker instance.

 Public Property Let Data(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. The data to associate with this Ticker instance.

Remarks

The data is not used by the Ticker. It is to allow a developer to associate values to the Ticker if needed.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Data (set)

Data

Sets custom data associated with this Ticker instance.

 Public Property Set Data(
      ByVal RHS As Variant )

Parameters

RHS
[ByVal] Variant. The data to associate with this Ticker instance.

Remarks

The data is not used by the Ticker. It is to allow a developer to associate values to the Ticker if needed.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Elapsed

Elapsed

This event is raised when the Ticker interval has been reached.

 Public Event Elapsed(
      ByRef Data As Variant )

Parameters

Data
[ByRef] Variant. A user-defined value associated with the Ticker.

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Enabled (get)

Enabled

Returns if the Ticker is currently running.

 Public Property Get Enabled ( ) As Boolean

Return Values

Boolean - If the Ticker is running.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Enabled (let)

Enabled

Sets the Ticker to be stopped or running.

 Public Property Let Enabled(
      ByVal RHS As Boolean )

Parameters

RHS
[ByVal] Boolean. Value indicating if the Ticker is stopped or running.

Remarks

If setting Enabled to True and the Ticker is already running, then the Ticker will be stopped and restarted.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Interval (get)

Interval

Returns the duration between Ticker events in milliseconds.

 Public Property Get Interval ( ) As Long

Return Values

Long - Duration between events in milliseconds

Remarks

If the Ticker is already running, it will be reset and begin a new duration with the new interval.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: Interval (let)

Interval

Sets the duration between Ticker events in milliseconds.

 Public Property Let Interval(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. Duration between events in milliseconds.

Remarks

If the Ticker is already running, it will be reset and begin a new duration with the new interval.

Read/Write.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: StartTicker

StartTicker

Starts the Ticker.

 Public Sub StartTicker ( )

Remarks

If the Ticker is already running, it will be stopped and restarted. A new full interval will be elapsed before the next event occurs.

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: StopTicker

StopTicker

Stops the Ticker if it is running.

 Public Sub StopTicker ( )

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


Ticker: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class Ticker Overview


TimeSpan

TimeSpan

This class represents an amount of time.

Remarks

The time is represented internally in milliseconds, with a fractional portion to represent ticks. A tick is defined as 100 nanoseconds, or 1/10000 of a millisecond. TimeSpans are displayed in a [-][d.]hh:mm:ss[.ff] format. Bracketed fields are only displayed if they are not zero. A negative sign is displayed if the timespan is negative.

See Also

Project VBCorLib Overview | Constructors | TimeSpanStatic | cDateTime

Implements:

IComparable
IObject

Public:

Properties:

Name | Description
Days (get) | Returns the Days portion of the duration.
Hours (get) | Returns the Hours portion of the duration.
Milliseconds (get) | Returns the Milliseconds portion of the duration.
Minutes (get) | Returns the Minutes portion of the duration.
Seconds (get) | Returns the Seconds portion of the duration.
Ticks (get) | Returns the duration in ticks.
TotalDays (get) | Returns the duration of this instance in days.
TotalHours (get) | Returns the duration of this instance in hours.
TotalMilliseconds (get) | Returns the duration of this instance in milliseconds.
TotalMinutes (get) | Returns the duration of this instance in minutes.
TotalSeconds (get) | Returns the duration of this instance in seconds.

Methods:

Name | Description
Add | Adds a timespan to this instance.
CompareTo | Compares this TimeSpan with another timespan.
Duration | Returns the absolute value of this instance.
Equals | Returns a boolean indicating if the value and this TimeSpan instance are the same value.
EqualTo |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GreaterThan | Returns if this TimeSpan instance is greater than another TimeSpan instance.
GreaterThanOrEqualTo |
LessThan |
LessThanOrEqualTo |
Negate | Returns a TimeSpan with the opposite sign of this instance.
NotEqualTo |
Subtract | Subtracts a timespan from this instance.
ToString | Returns a string representation of the duration.


TimeSpan: Add

Add

Adds a timespan to this instance.

 Public Function Add(
      ByRef ts As TimeSpan ) As TimeSpan

Parameters

ts
[ByRef] TimeSpan. TimeSpan to be added.

Return Values

TimeSpan - A TimeSpan that represents the sum of the two timespans.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: CompareTo

CompareTo

Compares this TimeSpan with another timespan.

 Public Function CompareTo(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The TimeSpan to compare this instance against.

Return Values

Long - Value indicating the relation between the two timespans.

Remarks

The return value indicates how the two timespans are in relation to eachother.
1 = This instance is greater than the passed in timespan.
0 = This instance is equal to the passed in timespan.
-1 = This instance is less than the passed in timespan.

If Nothing is passed in 1 is returned.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Days (get)

Days

Returns the Days portion of the duration.

 Public Property Get Days ( ) As Long

Return Values

Long - The Days portion of the duration.

Remarks

This does not represent the entire duration of the timespan, only the specified portion of it.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Duration

Duration

Returns the absolute value of this instance.

 Public Function Duration ( ) As TimeSpan

Return Values

TimeSpan - TimeSpan that represents the absolute value of the original TimeSpan.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Equals

Equals

Returns a boolean indicating if the value and this TimeSpan instance are the same value.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: GreaterThan

GreaterThan

Returns if this TimeSpan instance is greater than another TimeSpan instance.

 Public Function GreaterThan(
      ByRef ts As TimeSpan ) As Boolean

Parameters

ts
[ByRef] TimeSpan. The TimeSpan object to compare this instance against.

Return Values

Boolean - Returns True if this is greater that, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Hours (get)

Hours

Returns the Hours portion of the duration.

 Public Property Get Hours ( ) As Long

Return Values

Long - The Hours portion of the duration.

Remarks

This does not represent the entire duration of the timespan, only the specified portion of it.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: IComparable

IComparable

 Implements IComparable

Return Values

IComparable -

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Milliseconds (get)

Milliseconds

Returns the Milliseconds portion of the duration.

 Public Property Get Milliseconds ( ) As Long

Return Values

Long - The Milliseconds portion of the duration.

Remarks

This does not represent the entire duration of the timespan, only the specified portion of it.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Minutes (get)

Minutes

Returns the Minutes portion of the duration.

 Public Property Get Minutes ( ) As Long

Return Values

Long - The Minutes portion of the duration.

Remarks

This does not represent the entire duration of the timespan, only the specified portion of it.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Negate

Negate

Returns a TimeSpan with the opposite sign of this instance.

 Public Function Negate ( ) As TimeSpan

Return Values

TimeSpan - The timespan with the opposite sign as this duration.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Seconds (get)

Seconds

Returns the Seconds portion of the duration.

 Public Property Get Seconds ( ) As Long

Return Values

Long - The Seconds portion of the duration.

Remarks

This does not represent the entire duration of the timespan, only the specified portion of it.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Subtract

Subtract

Subtracts a timespan from this instance.

 Public Function Subtract(
      ByRef ts As TimeSpan ) As TimeSpan

Parameters

ts
[ByRef] TimeSpan. TimeSpan to be subtracted.

Return Values

TimeSpan - TimeSpan with the subtracted value.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: Ticks (get)

Ticks

Returns the duration in ticks.

 Public Property Get Ticks ( ) As Variant

Return Values

Variant - The duration in ticks

Remarks

A tick is defined as 100 nanoseconds, or 1/10000 of a millisecond.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: ToString

ToString

Returns a string representation of the duration.

 Public Function ToString ( ) As String

Return Values

String - String representing the duration.

Remarks

A string representation is in the form of [-][d.]hh:mm:ss[.ff] where the bracketed fields are optional. The optional fields will be included in the string their value is not zero, or the TimeSpan is negative.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: TotalDays (get)

TotalDays

Returns the duration of this instance in days.

 Public Property Get TotalDays ( ) As Double

Return Values

Double - This timespan in days.

Remarks

The returned duration can contain a fractional part if necessary to represent the duration.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: TotalHours (get)

TotalHours

Returns the duration of this instance in hours.

 Public Property Get TotalHours ( ) As Double

Return Values

Double - This timespan in hours.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: TotalMilliseconds (get)

TotalMilliseconds

Returns the duration of this instance in milliseconds.

 Public Property Get TotalMilliseconds ( ) As Currency

Return Values

Currency - This timespan in milliseconds.

Remarks

The returned duration can contain a fractional part if necessary to represent the duration.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: TotalMinutes (get)

TotalMinutes

Returns the duration of this instance in minutes.

 Public Property Get TotalMinutes ( ) As Double

Return Values

Double - This timespan in minutes.

Remarks

The returned duration can contain a fractional part if necessary to represent the duration.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpan: TotalSeconds (get)

TotalSeconds

Returns the duration of this instance in seconds.

 Public Property Get TotalSeconds ( ) As Double

Return Values

Double - This timespan in seconds.

Remarks

The returned duration can contain a fractional part if necessary to represent the duration.

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpan Overview


TimeSpanStatic

TimeSpanStatic

Provides severs static functions to help in creating TimeSpan objects.

See Also

Project VBCorLib Overview TimeSpan

Public:

Properties:

Name | Description
MaxValue (get) | Returns a TimeSpan with a maximum value.
MinValue (get) | Returns a TimeSpan with a minimum value.
Zero (get) | Returns a TimeSpan with a value of zero.

Methods:

Name | Description
FromDate | Returns a TimeSpan object representing the time of day of the date.
FromDays | Returns a TimeSpan created from days.
FromHours | Returns a TimeSpan created from hours.
FromMilliseconds | Returns a TimeSpan created from milliseconds.
FromMinutes | Returns a TimeSpan created from minutes.
FromSeconds | Returns a TimeSpan created from seconds.
FromTicks | Returns a TimeSpan created from ticks.
Parse | Parses a string in the format of [d.]h:mm:ss[.ff] into a TimeSpan.


TimeSpanStatic: FromDate

FromDate

Returns a TimeSpan object representing the time of day of the date.

 Public Function FromDate(
      ByRef Value As Variant ) As TimeSpan

Parameters

Value
[ByRef] Variant. The date to retrieve the time of day for.

Return Values

TimeSpan - A TimeSpan representing the time of day.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromDays

FromDays

Returns a TimeSpan created from days.

 Public Function FromDays(
      ByVal Value As Double ) As TimeSpan

Parameters

Value
[ByVal] Double. The number of days the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of days.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromHours

FromHours

Returns a TimeSpan created from hours.

 Public Function FromHours(
      ByVal Value As Double ) As TimeSpan

Parameters

Value
[ByVal] Double. The number of hours the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of hours.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromMilliseconds

FromMilliseconds

Returns a TimeSpan created from milliseconds.

 Public Function FromMilliseconds(
      ByVal Value As Currency ) As TimeSpan

Parameters

Value
[ByVal] Currency. The number of milliseconds the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of milliseconds.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromMinutes

FromMinutes

Returns a TimeSpan created from minutes.

 Public Function FromMinutes(
      ByVal Value As Double ) As TimeSpan

Parameters

Value
[ByVal] Double. The number of minutes the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of minutes.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromSeconds

FromSeconds

Returns a TimeSpan created from seconds.

 Public Function FromSeconds(
      ByVal Value As Double ) As TimeSpan

Parameters

Value
[ByVal] Double. The number of seconds the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of seconds.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: FromTicks

FromTicks

Returns a TimeSpan created from ticks.

 Public Function FromTicks(
      ByRef Value As Variant ) As TimeSpan

Parameters

Value
[ByRef] Variant. The number of ticks the timespan will represent.

Return Values

TimeSpan - The TimeSpan initialized to the specified number of ticks.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: MaxValue (get)

MaxValue

Returns a TimeSpan with a maximum value.

 Public Property Get MaxValue ( ) As TimeSpan

Return Values

TimeSpan - A maximum value timespan.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: MinValue (get)

MinValue

Returns a TimeSpan with a minimum value.

 Public Property Get MinValue ( ) As TimeSpan

Return Values

TimeSpan - A minimum value timespan.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: Parse

Parse

Parses a string in the format of [d.]h:mm:ss[.ff] into a TimeSpan.

 Public Function Parse(
      ByVal s As String ) As TimeSpan

Parameters

s
[ByVal] String. A string containing the date to be parsed.

Return Values

TimeSpan - A TimeSpan created from the parsed string.

Remarks

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeSpanStatic: Zero (get)

Zero

Returns a TimeSpan with a value of zero.

 Public Property Get Zero ( ) As TimeSpan

Return Values

TimeSpan - A zero timespan.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeSpanStatic Overview


TimeZone

TimeZone

Represents timezone information for the local machine.

See Also

Project VBCorLib Overview TimeZoneStatic

Implements:

IObject

Public:

Properties:

Name | Description
DayLightName (get) | Returns the name of the daylight savings period.
StandardName (get) | Returns the name of the standard time period.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetDayLightChanges | Returns the start and end of the daylight savings period.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetUtcOffset | Returns the offset from UTC to the current timezone, adjusting for daylight savings.
IsDayLightSavingTime | Returns whether the time is currently in the daylight savings period.
ToLocalTime | Returns the time with the UTC offset applied to get the local time.
ToString | Returns a string representation of this object instance.
ToUniversalTime | Returns the local time with UTC offset removed to get the UTC time.


TimeZone: DayLightName (get)

DayLightName

Returns the name of the daylight savings period.

 Public Property Get DayLightName ( ) As String

Return Values

String - Daylight savings period name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: GetDayLightChanges

GetDayLightChanges

Returns the start and end of the daylight savings period.

 Public Function GetDayLightChanges(
      ByVal Year As Long ) As DayLightTime

Parameters

Year
[ByVal] Long. The year which contains the daylight savings period.

Return Values

DayLightTime - The daylight savings period.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: GetUtcOffset

GetUtcOffset

Returns the offset from UTC to the current timezone, adjusting for daylight savings.

 Public Function GetUtcOffset(
      ByRef Time As Variant ) As TimeSpan

Parameters

Time
[ByRef] Variant. The time to get the offset for.

Return Values

TimeSpan - The offset from the time to UTC.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: IsDayLightSavingTime

IsDayLightSavingTime

Returns whether the time is currently in the daylight savings period.

 Public Function IsDayLightSavingTime(
      ByRef Time As Variant,
      Optional ByVal dayLightTimes As DayLightTime ) As Boolean

Parameters

Time
[ByRef] Variant. The time to check if in the daylight savings period.
dayLightTimes
[ByVal] Optional. DayLightTime. the daylight period to check the time against.

Return Values

Boolean - Indicating if the time was in the daylight savings period.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: StandardName (get)

StandardName

Returns the name of the standard time period.

 Public Property Get StandardName ( ) As String

Return Values

String - Standard time period name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: ToLocalTime

ToLocalTime

Returns the time with the UTC offset applied to get the local time.

 Public Function ToLocalTime(
      ByRef Time As Variant ) As cDateTime

Parameters

Time
[ByRef] Variant. The UTC time to convert to local time.

Return Values

cDateTime - The local time converted from the UTC time.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZone: ToUniversalTime

ToUniversalTime

Returns the local time with UTC offset removed to get the UTC time.

 Public Function ToUniversalTime(
      ByRef Time As Variant ) As cDateTime

Parameters

Time
[ByRef] Variant. The local time to have the UTC offset removed.

Return Values

cDateTime - The UTC time converted from the local time.

Remarks

See Also

Project VBCorLib Overview | Class TimeZone Overview


TimeZoneStatic

TimeZoneStatic

Represents static methods for the TimeZone class.

See Also

Project VBCorLib Overview TimeZone

Public:

Properties:

Name | Description
CurrentTimeZone (get) | Returns the current timezone for this machine.


TimeZoneStatic: CurrentTimeZone (get)

CurrentTimeZone

Returns the current timezone for this machine.

 Public Property Get CurrentTimeZone ( ) As TimeZone

Return Values

TimeZone - The current timezone for this machine.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TimeZoneStatic Overview


ToBase64Transform

ToBase64Transform

A class used to transform byte data to Base 64 data.

Remarks

ToBase64Transform is used to transfrom sections of byte arrays to a Base 64 array.

This class is primarily used with a CryptoStream object to perform transformations of data in a streaming mechanism. It is not intended to be used directly.

See Also

Project VBCorLib Overview | CryptoStream

Implements:

ICryptoTransform
IObject

Public:

Properties:

Name | Description
CanReuseTransform (get) | Returns if this transform object can be reused.
CanTransformMultipleBlocks (get) | Returns if this transform can process multiple data blocks at once.
InputBlockSize (get) | Returns the block size of data that is operated on at a time.
OutputBlockSize (get) | Returns the block size of data that is returned from a transformation operation.

Methods:

Name | Description
Clear | Releases all resources being used by the transform.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
TransformBlock | Converts a specified region of byte array data to Base 64 byte array data.
TransformFinalBlock | Converts a specified region of byte array data to Base 64 byte array data.


ToBase64Transform: CanReuseTransform (get)

CanReuseTransform

Returns if this transform object can be reused.

 Public Property Get CanReuseTransform ( ) As Boolean

Return Values

Boolean - Returns True if this transform can be used multiple times, False otherwise.

Remarks

This always returns True.

Read Only.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: CanTransformMultipleBlocks (get)

CanTransformMultipleBlocks

Returns if this transform can process multiple data blocks at once.

 Public Property Get CanTransformMultipleBlocks ( ) As Boolean

Return Values

Boolean - Returns True if this transform can process multiple data blocks at once, False otherwise.

Remarks

This always returns False.

Read Only.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: Clear

Clear

Releases all resources being used by the transform.

 Public Sub Clear ( )

Remarks

Once all resources have been called, this transform instance will no longer work.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns if the the Value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview | IObject


ToBase64Transform: ICryptoTransform

ICryptoTransform

 Implements ICryptoTransform

Return Values

ICryptoTransform -

Remarks

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: InputBlockSize (get)

InputBlockSize

Returns the block size of data that is operated on at a time.

 Public Property Get InputBlockSize ( ) As Long

Return Values

Long - The number of bytes operated on at a time.

Remarks

This always returns 3.

When calling the TransformBlock method, the InputCount must be zero or a multiple of this value.

ToBase64Transform works on 24bits at a time using standard Base 64 conversion methods. The resulting output is 32bits of transformed data.

Read Only.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: OutputBlockSize (get)

OutputBlockSize

Returns the block size of data that is returned from a transformation operation.

 Public Property Get OutputBlockSize ( ) As Long

Return Values

Long - The number of bytes that will result from a transformation.

Remarks

This always returns 4.

ToBase64Transform works on 24bits at a time using standard Base 64 conversion methods. The resulting output is 32bits of transformed data.

Read Only.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: TransformBlock

TransformBlock

Converts a specified region of byte array data to Base 64 byte array data.

 Public Function TransformBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long,
      ByRef OutputBuffer ( ) As Byte,
      ByVal OutputOffset As Long ) As Long

Parameters

InputBuffer
[ByRef] Byte. A byte array containing the data to be transformed.
InputOffset
[ByVal] Long. The starting position in the InputBuffer to begin transforming data.
InputCount
[ByVal] Long. The number of bytes to be transformed.
OutputBuffer
[ByRef] Byte. A byte array that received the transformed data.
OutputOffset
[ByVal] Long. The starting position in the OutputBuffer to begin placing transformed data.

Return Values

Long - The number of bytes added to the OutputBuffer after the transformation.

Remarks

ToBase64Transform only operated on 3 bytes at a time, generating 4 bytes of output. If more than 3 bytes is needed to be transformed, then this method needs to be called multiple times.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


ToBase64Transform: TransformFinalBlock

TransformFinalBlock

Converts a specified region of byte array data to Base 64 byte array data.

 Public Function TransformFinalBlock(
      ByRef InputBuffer ( ) As Byte,
      ByVal InputOffset As Long,
      ByVal InputCount As Long ) As Byte ( )

Parameters

InputBuffer
[ByRef] Byte. A byte array containing the data to be transformed.
InputOffset
[ByVal] Long. The starting position in the InputBuffer to begin transforming data.
InputCount
[ByVal] Long. The number of bytes to be transformed.

Return Values

Byte() - A byte array containing data transformed to Base 64.

Remarks

The purpose of this method is to transform a block of data that is 0 to 3 bytes in length. This is to allow the end of an array to be transformed if the array length is not a multiple of 3.

The resulting array will always be 4 bytes in length. It is padded if less than 3 bytes is transformed. If zero bytes are transformed, then a zero-length array is returned, not a null array.

See Also

Project VBCorLib Overview | Class ToBase64Transform Overview


TripleDES

TripleDES

Represents the interface for Triple Data Encryption Standard classes to implement.

See Also

Project VBCorLib Overview TripleDESCryptoServiceProvider | TripleDESStatic

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by the cryptographic operation.
BlockSize (let) | Sets the block size, in bits, used by the cryptographic operation.
FeedbackSize (get) | Returns the feedback size, in bits, used by the cryptographic operation.
FeedbackSize (let) | Sets the feedback size, in bits, used by the cryptographic operation.
IV (get) | Returns the Initialization Vector used by the cryptographic operation.
IV (let) | Sets the Initialization Vector used by the cryptographic operation.
Key (get) | Returns the secret key used by the cryptographic operation.
Key (let) | Sets the secret key to be used by the cryptographic operation.
KeySize (get) | Returns the size of the key, in bits, used by the cryptographic operation.
KeySize (let) | Sets the size of the key, in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of legal key sizes.
Mode (get) | Returns the mode the current algoritm is set to.
Mode (let) | Sets the mode the current algorithm is set to.
Padding (get) | Returns the padding to be used by the algorithm.
Padding (let) | Sets the padding to be used by the algorithm.

Methods:

Name | Description
Clear | Releases all resources.
CreateDecryptor | Creates a new decryptor using the Triple Data Encryption Standard algorithm.
CreateEncryptor | Creates a new encryptor using the Triple Data Ecryption Standard algorithm.
Equals | Returns if this instance and the value are equal.
GenerateIV | Generates a new Initialization Vector array.
GenerateKey | Generates a new Key based on the key size.
GetHashCode | Returns a semi-unique value that represents this instance.
ToString | Returns a string representation of this instance.
ValidKeySize | Checks if the specific number of bits is a valid key size.


TripleDES: BlockSize (get)

BlockSize

Returns the block size, in bits, used by the cryptographic operation.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: BlockSize (let)

BlockSize

Sets the block size, in bits, used by the cryptographic operation.

 Public Property Let BlockSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The block size in bits.

Remarks

A block size is the basic unit size of data that can be encrypted or decrypted in a single operation. Data that is larger than a block size are processed by splitting the data into multiple blocks the same size as the block size then operating of the multiple blocks.

An invalid block size will cause a CryptographicException.

A list of legal block sizes can be obtained through the LegalBlockSizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Clear

Clear

Releases all resources.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: CreateDecryptor

CreateDecryptor

Creates a new decryptor using the Triple Data Encryption Standard algorithm.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to decrypt the ciphered text back into plain text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to decrypt ciphered text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: CreateEncryptor

CreateEncryptor

Creates a new encryptor using the Triple Data Ecryption Standard algorithm.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. The secret key to be used to encrypt the plain text into ciphered text.
RgbIV
[ByRef] Optional. Variant. The Initialization Vector to begin the feedback with.

Return Values

ICryptoTransform - A new ICryptoTransform used to encrypt plain text.

Remarks

Though both parameters are optional, if only one parameter is supplied, an exception will be thrown.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Equals

Equals

Returns if this instance and the value are equal.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare for equality.

Return Values

Boolean - Returns if the value and this instance are equal.

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: FeedbackSize (get)

FeedbackSize

Returns the feedback size, in bits, used by the cryptographic operation.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - Returns the feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: FeedbackSize (let)

FeedbackSize

Sets the feedback size, in bits, used by the cryptographic operation.

 Public Property Let FeedbackSize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The feedback size in bits.

Remarks

The feedback size determines the amount of data that is fed back to successive encryption or decryption operations. The feedback size cannot be greater than the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: GenerateIV

GenerateIV

Generates a new Initialization Vector array.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: GenerateKey

GenerateKey

Generates a new Key based on the key size.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: GetHashCode

GetHashCode

Returns a semi-unique value that represents this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns the semi-unique value.

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: IV (get)

IV

Returns the Initialization Vector used by the cryptographic operation.

 Public Property Get IV ( ) As Byte ( ) :

Return Values

Byte() - Returns an array of bytes representing an Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same as well. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: IV (let)

IV

Sets the Initialization Vector used by the cryptographic operation.

 Public Property Let IV(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same aswell. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

This must be set to an array the same size as the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Key (get)

Key

Returns the secret key used by the cryptographic operation.

 Public Property Get Key ( ) As Byte ( ) :

Return Values

Byte() - Returns the secret key.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

If a key has not been set, then a new key will be generated automatically.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Key (let)

Key

Sets the secret key to be used by the cryptographic operation.

 Public Property Let Key(
      ByRef RHS ( ) As Byte ) :

Parameters

RHS
[ByRef] Byte. The new secret key to be used.

Remarks

Valid key sizes are determined by the individual algorithms. A list of valid sizes can be obtained through the LegalKeySizes property.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: KeySize (get)

KeySize

Returns the size of the key, in bits, used by the cryptographic operation.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The size of the key in bits.

Remarks

The size of keys are measured in bits. Common key sizes are 64, 128, 192, and 256 bit lengths.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: KeySize (let)

KeySize

Sets the size of the key, in bits.

 Public Property Let KeySize(
      ByVal RHS As Long ) :

Parameters

RHS
[ByVal] Long. The size of the key in bits.

Remarks

The size of keys are measured in bits. Common key sizes are 64, 128, 192, and 256 bit lengths.

This will cause the Key property to reset and regenerate when needed.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal block sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: LegalKeySizes (get)

LegalKeySizes

Returns a list of legal key sizes.

 Public Property Get LegalKeySizes ( ) As KeySizes ( ) :

Return Values

KeySizes() - A list of legal key sizes the cryptographic operation supports.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Mode (get)

Mode

Returns the mode the current algoritm is set to.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - Returns a CipherMode value.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Mode (let)

Mode

Sets the mode the current algorithm is set to.

 Public Property Let Mode(
      ByVal RHS As CipherMode ) :

Parameters

RHS
[ByVal] CipherMode. The new mode for the algorithm.

Remarks

The algoritm can operate in several modes. The modes determine how the data is processed from one block to the next.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Padding (get)

Padding

Returns the padding to be used by the algorithm.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - A current padding being used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: Padding (let)

Padding

Sets the padding to be used by the algorithm.

 Public Property Let Padding(
      ByVal RHS As PaddingMode ) :

Parameters

RHS
[ByVal] PaddingMode. The new padding value to be used.

Remarks

Padding is added to the end of plain text data to make the data length an even multiple of the block size.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: ToString

ToString

Returns a string representation of this instance.

 Public Function ToString ( ) As String

Return Values

String - A string that represents this instance.

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDES: ValidKeySize

ValidKeySize

Checks if the specific number of bits is a valid key size.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. A value to determine if is a legal key size.

Return Values

Boolean - Returns True if the bit length is a valid key size, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class TripleDES Overview


TripleDESCryptoServiceProvider

TripleDESCryptoServiceProvider

Provides cryptographic services using the TripleDES cryptographic service provider.

Remarks

This example shows a very simple method of encrypting then decrypting a String value.

Private Sub Main()
    ' Create a new TripleDESCryptoServiceProvider key.
    Dim Key As New TripleDESCryptoServiceProvider

    ' Encrypt a string to a byte array.
    Dim Buffer() As Byte
    Buffer = Encrypt("This is some plaintext!", Key)

    ' Decrypt the byte array back to a string.
    Dim PlainText As String
    PlainText = Decrypt(Buffer, Key)

    ' Display the plaintext value to the console.
    Console.WriteLine PlainText
    Console.ReadKey
End Sub Main

' Encrypt the string.
Private Function Encrypt(ByVal PlainText As String, ByVal Key As SymmetricAlgorithm) As Byte()
    Dim Buffer() As Byte
    Buffer = StrConv(PlainText, vbFromUnicode)

    Dim Encryptor As ICryptoTransform
    Set Encryptor = Key.CreateEncryptor
    Encrypt = Encryptor.TransformFinalBlock(Buffer, 0, cArray.GetLength(Buffer))
End Function

' Decrypt the byte array.
Public Function Decrypt(ByRef CypherText() As Byte, ByVal Key As SymmetricAlgorithm) As String
    Dim Decryptor As ICryptoTransform
    Set Decryptor = Key.CreateDecryptor

    Dim Buffer() As Byte
    Buffer = Decryptor.TransformFinalBlock(CypherText, 0, cArray.GetLength(CypherText))
    Decrypt = StrConv(Buffer, vbUnicode)
End Function

See Also

Project VBCorLib Overview | TripleDESStatic

Implements:

IObject
SymmetricAlgorithm
TripleDES

Public:

Properties:

Name | Description
BlockSize (get) | Returns the block size, in bits, used by this algorithm.
BlockSize (let) | Sets the block size, in bits, used by this algorithm.
FeedbackSize (get) | Returns the Feedback Size in bits.
FeedbackSize (let) | Sets the Feedback size in bits.
IV (get) | Returns the Initialization Vector.
IV (let) | Sets the Initialization Vector to be used.
Key (get) | Returns the current secret key.
Key (let) | Sets the secret key.
KeySize (get) | Returns the key size in bits.
KeySize (let) | Sets the key size in bits.
LegalBlockSizes (get) | Returns a list of legal block sizes.
LegalKeySizes (get) | Returns a list of valid key sizes supported by this algorithm.
Mode (get) | Returns the Cipher mode this algorithm will use.
Mode (let) | Sets the Cipher mode this algorithm will use.
Padding (get) | Returns the padding mode being used.
Padding (let) | Sets the padding mode to be used.

Methods:

Name | Description
Clear | Clears the Key and IV arrays.
CreateDecryptor | Returns a new cipher used to decrypt data.
CreateEncryptor | Returns a new cipher used to encrypt data.
Equals | This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.
GenerateIV | Generates a random IV array to use.
GenerateKey | Generates a random key to be used.
GetHashCode | Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.
ToString | Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.
ValidKeySize | Tests if a specific bit length is valid for a key.


TripleDESCryptoServiceProvider: BlockSize (get)

BlockSize

Returns the block size, in bits, used by this algorithm.

 Public Property Get BlockSize ( ) As Long

Return Values

Long - The block size in bits.

Remarks

This will always return 64 bits (8 bytes).

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: BlockSize (let)

BlockSize

Sets the block size, in bits, used by this algorithm.

 Public Property Let BlockSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new block size in bits.

Remarks

The only valid block size is 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: Clear

Clear

Clears the Key and IV arrays.

 Public Sub Clear ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: CreateDecryptor

CreateDecryptor

Returns a new cipher used to decrypt data.

 Public Function CreateDecryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to dencrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: CreateEncryptor

CreateEncryptor

Returns a new cipher used to encrypt data.

 Public Function CreateEncryptor(
      Optional ByRef RgbKey As Variant,
      Optional ByRef RgbIV As Variant ) As ICryptoTransform

Parameters

RgbKey
[ByRef] Optional. Variant. A supplied byte array used as the secret key.
RgbIV
[ByRef] Optional. Variant. A supplied byte array used for the Initialization Vector (IV).

Return Values

ICryptoTransform - An ICryptoTransform object used to encrypt data.

Remarks

Both parameters must be either supplied or missing. A single parameter will throw an exception.

If no parameters are supplied then the key and IV will be retrieved through the Key and IV properties.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: Equals

Equals

This function determines if the value passed in is the same as the current object instance. Meaning, are the Value and this object the same object in memory.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare against this instance.

Return Values

Boolean - Returns True if the values are the same.

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: FeedbackSize (get)

FeedbackSize

Returns the Feedback Size in bits.

 Public Property Get FeedbackSize ( ) As Long

Return Values

Long - The Feedback size in bits.

Remarks

Always returns 64 bits.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: FeedbackSize (let)

FeedbackSize

Sets the Feedback size in bits.

 Public Property Let FeedbackSize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new feedback size in bits.

Remarks

Only 64 bits is valid.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: GenerateIV

GenerateIV

Generates a random IV array to use.

 Public Sub GenerateIV ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: GenerateKey

GenerateKey

Generates a random key to be used.

 Public Sub GenerateKey ( )

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: GetHashCode

GetHashCode

Returns a psuedo-unique number used to help identify this object in memory. The current method is to return the value obtained from ObjPtr. If a different method needs to be impelmented then change the method here in this function.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Returns a number identifing this instance.

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: IV (get)

IV

Returns the Initialization Vector.

 Public Property Get IV ( ) As Byte ( )

Return Values

Byte() - The Initialization Vector.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same as well. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

If no IV has been set, then a new random IV will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: IV (let)

IV

Sets the Initialization Vector to be used.

 Public Property Let IV(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new IV to use.

Remarks

If several blocks of same plain text are encrypted, the ciphered data could all be the same as well. Using an Initialization Vector can prevent same plain text blocks to reproduce the same ciphered blocks.

This can be generated using the GenerateIV method, or a new one will be generated if one hasnt been set when this property is accessed.

The array must be 8 bytes in length.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: Key (get)

Key

Returns the current secret key.

 Public Property Get Key ( ) As Byte ( )

Return Values

Byte() - The secret key.

Remarks

If no key has been set, then a new random key will be generated.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: Key (let)

Key

Sets the secret key.

 Public Property Let Key(
      ByRef RHS ( ) As Byte )

Parameters

RHS
[ByRef] Byte. The new secret key.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: KeySize (get)

KeySize

Returns the key size in bits.

 Public Property Get KeySize ( ) As Long

Return Values

Long - The key size in bits.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: KeySize (let)

KeySize

Sets the key size in bits.

 Public Property Let KeySize(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The new key size in bits.

Remarks

Key sizes of 128 or 192 are supported.

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: LegalBlockSizes (get)

LegalBlockSizes

Returns a list of legal block sizes.

 Public Property Get LegalBlockSizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of legal block sizes.

Remarks

Only one block size is legal, 64 bits.

Read Only.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: LegalKeySizes (get)

LegalKeySizes

Returns a list of valid key sizes supported by this algorithm.

 Public Property Get LegalKeySizes ( ) As KeySizes ( )

Return Values

KeySizes() - A list of valid key sizes.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: Mode (get)

Mode

Returns the Cipher mode this algorithm will use.

 Public Property Get Mode ( ) As CipherMode

Return Values

CipherMode - The Cipher mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview | CipherMode


TripleDESCryptoServiceProvider: Mode (let)

Mode

Sets the Cipher mode this algorithm will use.

 Public Property Let Mode(
      ByVal RHS As CipherMode )

Parameters

RHS
[ByVal] CipherMode. The cipher mode to use.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview | CipherMode


TripleDESCryptoServiceProvider: Padding (get)

Padding

Returns the padding mode being used.

 Public Property Get Padding ( ) As PaddingMode

Return Values

PaddingMode - The current padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview | PaddingMode


TripleDESCryptoServiceProvider: Padding (let)

Padding

Sets the padding mode to be used.

 Public Property Let Padding(
      ByVal RHS As PaddingMode )

Parameters

RHS
[ByVal] PaddingMode. The new padding mode.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview | PaddingMode


TripleDESCryptoServiceProvider: SymmetricAlgorithm

SymmetricAlgorithm

 Implements SymmetricAlgorithm

Return Values

SymmetricAlgorithm -

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: ToString

ToString

Returns a string representation of this object instance. The default method simply returns the application name and class name in which this class resides.

 Public Function ToString ( ) As String

Return Values

String - Returns a string representation of this instance.

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: TripleDES

TripleDES

 Implements TripleDES

Return Values

TripleDES -

Remarks

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESCryptoServiceProvider: ValidKeySize

ValidKeySize

Tests if a specific bit length is valid for a key.

 Public Function ValidKeySize(
      ByVal BitLength As Long ) As Boolean

Parameters

BitLength
[ByVal] Long. The number of bits to test for.

Return Values

Boolean - Return True if the number of bits is supported, False otherwise.

Remarks

Only 128bit and 192bit are supported.

See Also

Project VBCorLib Overview | Class TripleDESCryptoServiceProvider Overview


TripleDESStatic

TripleDESStatic

Provides static methods used with the Triple Data Encryption Standard algorithm.

See Also

Project VBCorLib Overview TripleDES | TripleDESCryptoServiceProvider

Public:

Methods:

Name | Description
Create | Returns a TripleDES algorithm implementation based on the name.
IsWeakKey | Determines if a key is weak or not.


TripleDESStatic: Create

Create

Returns a TripleDES algorithm implementation based on the name.

 Public Function Create(
      Optional ByVal AlgName As String = "TripleDES" ) As TripleDES

Parameters

AlgName
[ByVal] Optional. String. The name of the TripleDES implementation.

Default: "TripleDES"

Return Values

TripleDES - The TripleDES algorithm.

Remarks

The name is specified by the Server.Class name. The CreateObject method is used to instantiate the object.

If the name is "3DES", "TripleDES" or missing then the default implementation is returned.

See Also

Project VBCorLib Overview | Class TripleDESStatic Overview


TripleDESStatic: IsWeakKey

IsWeakKey

Determines if a key is weak or not.

 Public Function IsWeakKey(
      ByRef RgbKey ( ) As Byte ) As Boolean

Parameters

RgbKey
[ByRef] Byte. The key to be tested for weakness.

Return Values

Boolean - Returns True if the key is weak, or False if not.

Remarks

A weak key is determined if the first 64 bits are equal to the second 64 bits for a 128 bit key. For a 192 bit key, weakness is determined if the first 64 bits is equal to the second 64 bits, or if the second 64 bits is equal to the third 64 bits.

See Also

Project VBCorLib Overview | Class TripleDESStatic Overview


UnauthorizedAccessException

UnauthorizedAccessException

This exception is thrown when an operation attempted to access a secured value or location without proper authorization.

See Also

Project VBCorLib Overview Constructors | Exception | ExceptionMethods

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


UnauthorizedAccessException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview | Exception


UnauthorizedAccessException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview | Exception


UnauthorizedAccessException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewSystemException.

Read Only.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnauthorizedAccessException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class UnauthorizedAccessException Overview


UnicodeEncoding

UnicodeEncoding

A set of functions used to convert unicode characters to and from byte arrays.

Remarks

This encoding can encode characters using big-endian or little-endian notation. The default is little-endian (least significant byte first).

A Byte order Mark will be emitted if selected using the Cor.NewUnicodeEncoding constructor.

See Also

Project VBCorLib Overview | Constructors | Encoding

Implements:

Encoding
IObject

Public:

Properties:

Name | Description
BodyName (get) | Returns the encoding name to be used in with the mail agent body tags.
CodePage (get) | Returns the code page identifier for this encoding.
EncodingName (get) | The name of this encoding.
HeaderName (get) | Returns the encoding name to be used in with the mail agent header tags.
IsBrowserDisplay (get) | Indicates if this encoding can be used by browsers to display text.
IsBrowserSave (get) | Indicates if this encoding can be used to save data with this encoding.
IsMailNewsDisplay (get) | Indicates if this encoding can be used to display mail and news by mail and news clients.
IsMailNewsSave (get) | Indicates if this encoding can be used to save date by mail and news clients.
IsSingleByte (get) | Returns if the current encoding uses single-byte code points.
WebName (get) | Returns the encoding name registered with the Internet Assigned Numbers Authority.
WindowsCodePage (get) | Returns the Windows Operating Systems code page for this encoding.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByteCount | Returns the number of bytes that would be produced from the set of characters using this encoding.
GetBytes | Encodes a set of characters into an array of bytes.
GetBytesEx | Encodes a set of characters into an array of bytes, returning the number of bytes produced.
GetCharCount | Returns the number of characters that would be produced by decoding a byte array.
GetChars | Decodes a set of bytes into a set of characters.
GetCharsEx | Decodes a set of bytes into the supplied Integer array.
GetDecoder | Returns a decoder that maintains state.
GetEncoder | Returns an encoder that maintains state.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMaxByteCount | Returns the maximum number of bytes that can be created from a specific number of characters.
GetMaxCharCount | Returns the maximum number of characters than can be decoded from the number of bytes specified.
GetPreamble | Returns an array of bytes that represents this encoding.
GetString | Decodes a set of bytes into a String.
ToString | Returns a string representation of this object instance.


UnicodeEncoding: BodyName (get)

BodyName

Returns the encoding name to be used in with the mail agent body tags.

 Public Property Get BodyName ( ) As String

Return Values

String - The body tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: CodePage (get)

CodePage

Returns the code page identifier for this encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - Code page identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: Encoding

Encoding

 Implements Encoding

Return Values

Encoding -

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: EncodingName (get)

EncodingName

The name of this encoding.

 Public Property Get EncodingName ( ) As String

Return Values

String - The encodings name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetByteCount

GetByteCount

Returns the number of bytes that would be produced from the set of characters using this encoding.

 Public Function GetByteCount(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Chars
[ByRef] Variant. A set of characters used to calculated the number of bytes once encoded with this encoding.
Index
[ByRef] Optional. Variant. The starting index of the first character to be used.
Count
[ByRef] Optional. Variant. The number of characters to include in the calculation.

Return Values

Long - The number of bytes that would be produced by encoding the set of characters.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetBytes

GetBytes

Encodes a set of characters into an array of bytes.

 Public Function GetBytes(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Chars
[ByRef] Variant. The set of characters to be encoded into an array of bytes. This can be either an Integer array or a String.
Index
[ByRef] Optional. Variant. The index of the first character to begin encoding from.
Count
[ByRef] Optional. Variant. The number of characters to be encoded.

Return Values

Byte() - A byte array containing the encoded characters as bytes.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetBytesEx

GetBytesEx

Encodes a set of characters into an array of bytes, returning the number of bytes produced.

 Public Function GetBytesEx(
      ByRef Chars As Variant,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long ) As Long

Parameters

Chars
[ByRef] Variant. the set of characters to be encoded into bytes. This can be either an Integer array or a String.
CharIndex
[ByVal] Long. The index of the first character to begin encoding from.
CharCount
[ByVal] Long. The number of characters to be encoded.
Bytes
[ByRef] Byte. The destination for the encoded characters.
ByteIndex
[ByVal] Long. The index of the first byte stored in the destination array.

Return Values

Long - The number of bytes produce by the encoding.

Remarks

The Bytes array cannot be null and must be large enough to hold the encoded set of characters. To obtain the size required, use GetByteCount to find the necessary size. Or, use GetMaxByteCount to get the largest size that could be produced. The largest size is not the perfect size, only the maximum number of bytes that could ever be produced by a number of characters. Resizing of the resultant Bytes array may be necessary.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetCharCount

GetCharCount

Returns the number of characters that would be produced by decoding a byte array.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to use when calculating the number of characters.
Index
[ByRef] Optional. Variant. The starting index in Bytes to being calculating from.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the calculation.

Return Values

Long - The number of characters that would be decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetChars

GetChars

Decodes a set of bytes into a set of characters.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Integer ( )

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
Index
[ByRef] Optional. Variant. The index of the first byte to be used in decoding.
Count
[ByRef] Optional. Variant. The number of bytes to be used in decoding.

Return Values

Integer() - An array of characters decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetCharsEx

GetCharsEx

Decodes a set of bytes into the supplied Integer array.

 Public Function GetCharsEx(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
ByteIndex
[ByVal] Long. The index of the first byte to begin decoding from.
ByteCount
[ByVal] Long. The number of bytes to be used in decoding.
Chars
[ByRef] Integer. The destination character array for the decoded bytes.
CharIndex
[ByVal] Long. The first index to begin storing decoded bytes in Chars.

Return Values

Long - The number of characters decoded from the array of bytes.

Remarks

The Chars array must be large enough to handle all the bytes that will be decoded. To ensure the Chars array is large enough, use either GetCharCount or GetMaxCharCount to determine a size that will hold the decoded bytes.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetDecoder

GetDecoder

Returns a decoder that maintains state.

 Public Function GetDecoder ( ) As Decoder

Return Values

Decoder - The stateful decoder.

Remarks

Unlike UnicodeEncoding, the decoder maintains state between decoding calls. Since a single unicode character required exactly 2 bytes to be decoded, it is possible that an odd number of bytes may be attempted to be decoding, creating an orphaned byte which represents only half of a unicode character. The remaining byte is held until the next decoding call, and the byte is then inserted at the beginning of the next set of bytes to be decoded, picking up byte decoding where the orphaned byte left off.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetEncoder

GetEncoder

Returns an encoder that maintains state.

 Public Function GetEncoder ( ) As Encoder

Return Values

Encoder - The stateful encoder.

Remarks

Since encoding Unicode characters equates to exactly 2 bytes per character, there is no state that is maintained between calls. This method functions identically to GetBytes.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetMaxByteCount

GetMaxByteCount

Returns the maximum number of bytes that can be created from a specific number of characters.

 Public Function GetMaxByteCount(
      ByVal CharCount As Long ) As Long

Parameters

CharCount
[ByVal] Long. The number of characters to be encoded.

Return Values

Long - The maximum number of bytes that can be generated from the specified number of characters.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetMaxCharCount

GetMaxCharCount

Returns the maximum number of characters than can be decoded from the number of bytes specified.

 Public Function GetMaxCharCount(
      ByVal ByteCount As Long ) As Long

Parameters

ByteCount
[ByVal] Long. The number of bytes to be decoded.

Return Values

Long - The maximum number of characters that can be decoded from the specified number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetPreamble

GetPreamble

Returns an array of bytes that represents this encoding.

 Public Function GetPreamble ( ) As Byte ( )

Return Values

Byte() - A byte array containg the bytes to be used to identify this encoding type.

Remarks

If the encoding was created setting the BigEndian paramter to true, then this will return the Unicode byte array identifer &HFEFF otherwise &HFFFE for a non-bigEndian encoding. If no identifier is to be emitted, then an empty byte array is returned (not a null array).

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: GetString

GetString

Decodes a set of bytes into a String.

 Public Function GetString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into a string.
Index
[ByRef] Optional. Variant. The index of the first byte to be decoded.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the decoding.

Return Values

String - A string containing the decoded set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: HeaderName (get)

HeaderName

Returns the encoding name to be used in with the mail agent header tags.

 Public Property Get HeaderName ( ) As String

Return Values

String - The header tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IsBrowserDisplay (get)

IsBrowserDisplay

Indicates if this encoding can be used by browsers to display text.

 Public Property Get IsBrowserDisplay ( ) As Boolean

Return Values

Boolean - The indication for browser display capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IsBrowserSave (get)

IsBrowserSave

Indicates if this encoding can be used to save data with this encoding.

 Public Property Get IsBrowserSave ( ) As Boolean

Return Values

Boolean - The indication for the browser saving capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IsMailNewsDisplay (get)

IsMailNewsDisplay

Indicates if this encoding can be used to display mail and news by mail and news clients.

 Public Property Get IsMailNewsDisplay ( ) As Boolean

Return Values

Boolean - Indication for mail and news client capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IsMailNewsSave (get)

IsMailNewsSave

Indicates if this encoding can be used to save date by mail and news clients.

 Public Property Get IsMailNewsSave ( ) As Boolean

Return Values

Boolean - Indication for the mail and news clients to use this encoding for saving.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: IsSingleByte (get)

IsSingleByte

Returns if the current encoding uses single-byte code points.

 Public Property Get IsSingleByte ( ) As Boolean

Return Values

Boolean - Returns True for single-byte, False for multi-byte code points.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: WebName (get)

WebName

Returns the encoding name registered with the Internet Assigned Numbers Authority.

 Public Property Get WebName ( ) As String

Return Values

String - The registered encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UnicodeEncoding: WindowsCodePage (get)

WindowsCodePage

Returns the Windows Operating Systems code page for this encoding.

 Public Property Get WindowsCodePage ( ) As Long

Return Values

Long - The Windows code page for this encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UnicodeEncoding Overview


UTF7Encoding

UTF7Encoding

A set of functions used to convert unicode characters to and from byte arrays.

Remarks

Characters less that 128 may be directly encoded as their existing ascii value. Characters above 127 are encoded using a Base-64 encoding scheme.

Information about the UTF-7 encoding scheme can be found at "http://www.faqs.org/rfcs/rfc2152.html".

See Also

Project VBCorLib Overview | Constructors | Encoding

Implements:

Encoding
IObject

Public:

Properties:

Name | Description
BodyName (get) | Returns the encoding name to be used in with the mail agent body tags.
CodePage (get) | Returns the code page identifier for this encoding.
EncodingName (get) | The name of this encoding.
HeaderName (get) | Returns the encoding name to be used in with the mail agent header tags.
IsBrowserDisplay (get) | Indicates if this encoding can be used by browsers to display text.
IsBrowserSave (get) | Indicates if this encoding can be used to save data with this encoding.
IsMailNewsDisplay (get) | Indicates if this encoding can be used to display mail and news by mail and news clients.
IsMailNewsSave (get) | Indicates if this encoding can be used to save date by mail and news clients.
IsSingleByte (get) | Returns if the current encoding uses single-byte code points.
WebName (get) | Returns the encoding name registered with the Internet Assigned Numbers Authority.
WindowsCodePage (get) | Returns the Windows Operating Systems code page for this encoding.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByteCount | Returns the number of bytes that would be produced from the set of characters using this encoding.
GetBytes | Encodes a set of characters into an array of bytes.
GetBytesEx | Encodes a set of characters into an array of bytes, returning the number of bytes produced.
GetCharCount | Returns the number of characters that would be produced by decoding a byte array.
GetChars | Decodes a set of bytes into a set of characters.
GetCharsEx | Decodes a set of bytes into the supplied Integer array.
GetDecoder | Returns a decoder that maintains state.
GetEncoder | Returns an encoder that maintains state.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMaxByteCount | Returns the maximum number of bytes that can be created from a specific number of characters.
GetMaxCharCount | Returns the maximum number of characters than can be decoded from the number of bytes specified.
GetPreamble | Returns an array of bytes that represents this encoding.
GetString | Decodes a set of bytes into a String.
ToString | Returns a string representation of this object instance.


UTF7Encoding: BodyName (get)

BodyName

Returns the encoding name to be used in with the mail agent body tags.

 Public Property Get BodyName ( ) As String

Return Values

String - The body tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: CodePage (get)

CodePage

Returns the code page identifier for this encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - Code page identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: Encoding

Encoding

 Implements Encoding

Return Values

Encoding -

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: EncodingName (get)

EncodingName

The name of this encoding.

 Public Property Get EncodingName ( ) As String

Return Values

String - The encodings name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetByteCount

GetByteCount

Returns the number of bytes that would be produced from the set of characters using this encoding.

 Public Function GetByteCount(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Chars
[ByRef] Variant. A set of characters used to calculated the number of bytes once encoded with this encoding.
Index
[ByRef] Optional. Variant. The starting index of the first character to be used.
Count
[ByRef] Optional. Variant. The number of characters to include in the calculation.

Return Values

Long - The number of bytes that would be produced by encoding the set of characters.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetBytes

GetBytes

Encodes a set of characters into an array of bytes.

 Public Function GetBytes(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Chars
[ByRef] Variant. The set of characters to be encoded into an array of bytes. This can be either an Integer array or a String.
Index
[ByRef] Optional. Variant. The index of the first character to begin encoding from.
Count
[ByRef] Optional. Variant. The number of characters to be encoded.

Return Values

Byte() - A byte array containing the encoded characters as bytes.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetBytesEx

GetBytesEx

Encodes a set of characters into an array of bytes, returning the number of bytes produced.

 Public Function GetBytesEx(
      ByRef Chars As Variant,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long ) As Long

Parameters

Chars
[ByRef] Variant. the set of characters to be encoded into bytes. This can be either an Integer array or a String.
CharIndex
[ByVal] Long. The index of the first character to begin encoding from.
CharCount
[ByVal] Long. The number of characters to be encoded.
Bytes
[ByRef] Byte. The destination for the encoded characters.
ByteIndex
[ByVal] Long. The index of the first byte stored in the destination array.

Return Values

Long - The number of bytes produce by the encoding.

Remarks

The Bytes array cannot be null and must be large enough to hold the encoded set of characters. To obtain the size required, use GetByteCount to find the necessary size. Or, use GetMaxByteCount to get the largest size that could be produced. The largest size is not the perfect size, only the maximum number of bytes that could ever be produced by a number of characters. Resizing of the resultant Bytes array may be necessary.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetCharCount

GetCharCount

Returns the number of characters that would be produced by decoding a byte array.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to use when calculating the number of characters.
Index
[ByRef] Optional. Variant. The starting index in Bytes to being calculating from.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the calculation.

Return Values

Long - The number of characters that would be decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetChars

GetChars

Decodes a set of bytes into a set of characters.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Integer ( )

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
Index
[ByRef] Optional. Variant. The index of the first byte to be used in decoding.
Count
[ByRef] Optional. Variant. The number of bytes to be used in decoding.

Return Values

Integer() - An array of characters decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetCharsEx

GetCharsEx

Decodes a set of bytes into the supplied Integer array.

 Public Function GetCharsEx(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
ByteIndex
[ByVal] Long. The index of the first byte to begin decoding from.
ByteCount
[ByVal] Long. The number of bytes to be used in decoding.
Chars
[ByRef] Integer. The destination character array for the decoded bytes.
CharIndex
[ByVal] Long. The first index to begin storing decoded bytes in Chars.

Return Values

Long - The number of characters decoded from the array of bytes.

Remarks

The Chars array must be large enough to handle all the bytes that will be decoded. To ensure the Chars array is large enough, use either GetCharCount or GetMaxCharCount to determine a size that will hold the decoded bytes.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetDecoder

GetDecoder

Returns a decoder that maintains state.

 Public Function GetDecoder ( ) As Decoder

Return Values

Decoder - The stateful decoder.

Remarks

Unlike UTF8Encoding, the decoder maintains state between decoding calls. this allows for a sequence of bytes to not have to be in the same call in order to be decoded to the representive character. All characters other than directly encodable characters are encoded in a Modified Base64 encoding, which can be require 3 bytes to decode to a single character. This decoder allows the Base64 encoded byte set to be decoded across multiple calls and still be decoded as a single set of bytes. A multi-byte encoded characters does not need to be in the same call in order to be decoded properly.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetEncoder

GetEncoder

Returns an encoder that maintains state.

 Public Function GetEncoder ( ) As Encoder

Return Values

Encoder - The stateful encoder.

Remarks

Unlike UTF7Encoding, the encoder maintains state between encoding calls. This allows for a set of characters to be split up but still be encoded as a single set of characters. This will allow Modified Base64 encoding to continue between encoding calls.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetMaxByteCount

GetMaxByteCount

Returns the maximum number of bytes that can be created from a specific number of characters.

 Public Function GetMaxByteCount(
      ByVal CharCount As Long ) As Long

Parameters

CharCount
[ByVal] Long. The number of characters to be encoded.

Return Values

Long - The maximum number of bytes that can be generated from the specified number of characters.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetMaxCharCount

GetMaxCharCount

Returns the maximum number of characters than can be decoded from the number of bytes specified.

 Public Function GetMaxCharCount(
      ByVal ByteCount As Long ) As Long

Parameters

ByteCount
[ByVal] Long. The number of bytes to be decoded.

Return Values

Long - The maximum number of characters that can be decoded from the specified number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetPreamble

GetPreamble

Returns an array of bytes that represents this encoding.

 Public Function GetPreamble ( ) As Byte ( )

Return Values

Byte() - A byte array containg the bytes to be used to identify this encoding type.

Remarks

There is no identifier for UTF7 so an empty array is returned.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: GetString

GetString

Decodes a set of bytes into a String.

 Public Function GetString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into a string.
Index
[ByRef] Optional. Variant. The index of the first byte to be decoded.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the decoding.

Return Values

String - A string containing the decoded set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: HeaderName (get)

HeaderName

Returns the encoding name to be used in with the mail agent header tags.

 Public Property Get HeaderName ( ) As String

Return Values

String - The header tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IsBrowserDisplay (get)

IsBrowserDisplay

Indicates if this encoding can be used by browsers to display text.

 Public Property Get IsBrowserDisplay ( ) As Boolean

Return Values

Boolean - The indication for browser display capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IsBrowserSave (get)

IsBrowserSave

Indicates if this encoding can be used to save data with this encoding.

 Public Property Get IsBrowserSave ( ) As Boolean

Return Values

Boolean - The indication for the browser saving capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IsMailNewsDisplay (get)

IsMailNewsDisplay

Indicates if this encoding can be used to display mail and news by mail and news clients.

 Public Property Get IsMailNewsDisplay ( ) As Boolean

Return Values

Boolean - Indication for mail and news client capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IsMailNewsSave (get)

IsMailNewsSave

Indicates if this encoding can be used to save date by mail and news clients.

 Public Property Get IsMailNewsSave ( ) As Boolean

Return Values

Boolean - Indication for the mail and news clients to use this encoding for saving.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: IsSingleByte (get)

IsSingleByte

Returns if the current encoding uses single-byte code points.

 Public Property Get IsSingleByte ( ) As Boolean

Return Values

Boolean - Returns True for single-byte, False for multi-byte code points.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: WebName (get)

WebName

Returns the encoding name registered with the Internet Assigned Numbers Authority.

 Public Property Get WebName ( ) As String

Return Values

String - The registered encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF7Encoding: WindowsCodePage (get)

WindowsCodePage

Returns the Windows Operating Systems code page for this encoding.

 Public Property Get WindowsCodePage ( ) As Long

Return Values

Long - The Windows code page for this encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF7Encoding Overview


UTF8Encoding

UTF8Encoding

A set of functions to be used to convert character arrays to and from byte arrays.

Remarks

UTF-8 is an encoding scheme that is fully compatible with the existing ASCII set of characters (0-127). It also supports Unicode characters, including the UTF-16 character set.

UTF-8 is useful because it will have a size ratio of 1:1 for pure ASCII characters. The ratio will increase during the encoding for characters outside ASCII.

Additional information about UTF-8 encoding scheme can be found at "http://www.faqs.org/rfcs/rfc2279.html".

See Also

Project VBCorLib Overview | Constructors | Encoding

Implements:

Encoding
IObject

Public:

Properties:

Name | Description
BodyName (get) | Returns the encoding name to be used in with the mail agent body tags.
CodePage (get) | Returns the code page identifier for this encoding.
EncodingName (get) | The name of this encoding.
HeaderName (get) | Returns the encoding name to be used in with the mail agent header tags.
IsBrowserDisplay (get) | Indicates if this encoding can be used by browsers to display text.
IsBrowserSave (get) | Indicates if this encoding can be used to save data with this encoding.
IsMailNewsDisplay (get) | Indicates if this encoding can be used to display mail and news by mail and news clients.
IsMailNewsSave (get) | Indicates if this encoding can be used to save data by mail and news clients.
IsSingleByte (get) | Returns if the current encoding uses single-byte code points.
WebName (get) | Returns the encoding name registered with the Internet Assigned Numbers Authority.
WindowsCodePage (get) | Returns the Windows Operating Systems code page for this encoding.

Methods:

Name | Description
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetByteCount | Returns the number of bytes that would be produced from the set of characters using this encoding.
GetBytes | Encodes a set of characters into an array of bytes.
GetBytesEx | Encodes a set of characters into an array of bytes, returning the number of bytes produced.
GetCharCount | Returns the number of characters that would be produced by decoding a byte array.
GetChars | Decodes a set of bytes into a set of characters.
GetCharsEx | Decodes a set of bytes into the supplied Integer array.
GetDecoder | Returns a decoder that maintains state.
GetEncoder | Returns an encoder that maintains state.
GetHashCode | Returns a pseudo-unique number identifying this instance.
GetMaxByteCount | Returns the maximum number of bytes that can be created from a specific number of characters.
GetMaxCharCount | Returns the maximum number of characters than can be decoded from the number of bytes specified.
GetPreamble | Returns an array of bytes that represents this encoding.
GetString | Decodes a set of bytes into a String.
ToString | Returns a string representation of this object instance.


UTF8Encoding: BodyName (get)

BodyName

Returns the encoding name to be used in with the mail agent body tags.

 Public Property Get BodyName ( ) As String

Return Values

String - The body tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: CodePage (get)

CodePage

Returns the code page identifier for this encoding.

 Public Property Get CodePage ( ) As Long

Return Values

Long - Code page identifier.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: Encoding

Encoding

 Implements Encoding

Return Values

Encoding -

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: EncodingName (get)

EncodingName

The name of this encoding.

 Public Property Get EncodingName ( ) As String

Return Values

String - The encodings name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetByteCount

GetByteCount

Returns the number of bytes that would be produced from the set of characters using this encoding.

 Public Function GetByteCount(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Chars
[ByRef] Variant. A set of characters used to calculated the number of bytes once encoded with this encoding.
Index
[ByRef] Optional. Variant. The starting index of the first character to be used.
Count
[ByRef] Optional. Variant. The number of characters to include in the calculation.

Return Values

Long - The number of bytes that would be produced by encoding the set of characters.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetBytes

GetBytes

Encodes a set of characters into an array of bytes.

 Public Function GetBytes(
      ByRef Chars As Variant,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Byte ( )

Parameters

Chars
[ByRef] Variant. The set of characters to be encoded into an array of bytes. This can be either an Integer array or a String.
Index
[ByRef] Optional. Variant. The index of the first character to begin encoding from.
Count
[ByRef] Optional. Variant. The number of characters to be encoded.

Return Values

Byte() - A byte array containing the encoded characters as bytes.

Remarks

The Chars parameter will accept either a String or an Integer array. The Index is zero based for both the String and Integer array, not 1 based like Mid$.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetBytesEx

GetBytesEx

Encodes a set of characters into an array of bytes, returning the number of bytes produced.

 Public Function GetBytesEx(
      ByRef Chars As Variant,
      ByVal CharIndex As Long,
      ByVal CharCount As Long,
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long ) As Long

Parameters

Chars
[ByRef] Variant. the set of characters to be encoded into bytes. This can be either an Integer array or a String.
CharIndex
[ByVal] Long. The index of the first character to begin encoding from.
CharCount
[ByVal] Long. The number of characters to be encoded.
Bytes
[ByRef] Byte. The destination for the encoded characters.
ByteIndex
[ByVal] Long. The index of the first byte stored in the destination array.

Return Values

Long - The number of bytes produce by the encoding.

Remarks

The Bytes array cannot be null and must be large enough to hold the encoded set of characters. To obtain the size required, use GetByteCount to find the necessary size. Or, use GetMaxByteCount to get the largest size that could be produced. The largest size is not the perfect size, only the maximum number of bytes that could ever be produced by a number of characters. Resizing of the resultant Bytes array may be necessary.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetCharCount

GetCharCount

Returns the number of characters that would be produced by decoding a byte array.

 Public Function GetCharCount(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Long

Parameters

Bytes
[ByRef] Byte. The bytes to use when calculating the number of characters.
Index
[ByRef] Optional. Variant. The starting index in Bytes to being calculating from.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the calculation.

Return Values

Long - The number of characters that would be decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetChars

GetChars

Decodes a set of bytes into a set of characters.

 Public Function GetChars(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As Integer ( )

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
Index
[ByRef] Optional. Variant. The index of the first byte to be used in decoding.
Count
[ByRef] Optional. Variant. The number of bytes to be used in decoding.

Return Values

Integer() - An array of characters decoded from the set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetCharsEx

GetCharsEx

Decodes a set of bytes into the supplied Integer array.

 Public Function GetCharsEx(
      ByRef Bytes ( ) As Byte,
      ByVal ByteIndex As Long,
      ByVal ByteCount As Long,
      ByRef Chars ( ) As Integer,
      ByVal CharIndex As Long ) As Long

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into characters.
ByteIndex
[ByVal] Long. The index of the first byte to begin decoding from.
ByteCount
[ByVal] Long. The number of bytes to be used in decoding.
Chars
[ByRef] Integer. The destination character array for the decoded bytes.
CharIndex
[ByVal] Long. The first index to begin storing decoded bytes in Chars.

Return Values

Long - The number of characters decoded from the array of bytes.

Remarks

The Chars array must be large enough to handle all the bytes that will be decoded. To ensure the Chars array is large enough, use either GetCharCount or GetMaxCharCount to determine a size that will hold the decoded bytes.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetDecoder

GetDecoder

Returns a decoder that maintains state.

 Public Function GetDecoder ( ) As Decoder

Return Values

Decoder - The stateful decoder.

Remarks

Unlike UTF8Encoding, the decoder maintains state between decoding calls. this allows for a sequence of bytes to not have to be in the same call in order to be decoded to the representive character. Other than the standard ASCII set of characters (0-127), all other characters are represented by 2-4 bytes. Using this decoder allows for some of those bytes to be at the end of one call and the rest be at the beginning of the next call. The decoder will continue decoding as if all the required bytes were in the same call.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetEncoder

GetEncoder

Returns an encoder that maintains state.

 Public Function GetEncoder ( ) As Encoder

Return Values

Encoder - The stateful encoder.

Remarks

Unlike UTF8Encoding, the encoder maintains state between encoding calls. This allows for a set of characters to be split up but still be encoded as a single set of characters. This will only be effective when encoding UTF-16 surrogate pairs of characters. Otherwise, a single characters is all that is required to be encodable. the UTF-16 surrogate pairs can be split to the last character of one call and the first character of the next and the encoding will continue as if a single call was made.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetMaxByteCount

GetMaxByteCount

Returns the maximum number of bytes that can be created from a specific number of characters.

 Public Function GetMaxByteCount(
      ByVal CharCount As Long ) As Long

Parameters

CharCount
[ByVal] Long. The number of characters to be encoded.

Return Values

Long - The maximum number of bytes that can be generated from the specified number of characters.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetMaxCharCount

GetMaxCharCount

Returns the maximum number of characters than can be decoded from the number of bytes specified.

 Public Function GetMaxCharCount(
      ByVal ByteCount As Long ) As Long

Parameters

ByteCount
[ByVal] Long. The number of bytes to be decoded.

Return Values

Long - The maximum number of characters that can be decoded from the specified number of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetPreamble

GetPreamble

Returns an array of bytes that represents this encoding.

 Public Function GetPreamble ( ) As Byte ( )

Return Values

Byte() - A byte array containg the bytes to be used to identify this encoding type.

Remarks

If the encoding was created setting the ShouldEmitUTF8Identifier paramter to true, then this will return the UTF-8 identifer &HFFEF already encoded into the 3 bytes. The bytes are &HEF, &HBB, &HBF. They will decode to &HFFEF. Since &HFF and &HFE are not valid in a UTF-8 encoding, these will unique and can be used to identify the encoding used in the stream.

If ShouldEmitUTF8Identifier was set to False, then an empty array will be returned. The array will not be null. It will have a UBound of -1.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: GetString

GetString

Decodes a set of bytes into a String.

 Public Function GetString(
      ByRef Bytes ( ) As Byte,
      Optional ByRef Index As Variant,
      Optional ByRef Count As Variant ) As String

Parameters

Bytes
[ByRef] Byte. The set of bytes to be decoded into a string.
Index
[ByRef] Optional. Variant. The index of the first byte to be decoded.
Count
[ByRef] Optional. Variant. The number of bytes to be used in the decoding.

Return Values

String - A string containing the decoded set of bytes.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: HeaderName (get)

HeaderName

Returns the encoding name to be used in with the mail agent header tags.

 Public Property Get HeaderName ( ) As String

Return Values

String - The header tag compatible encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IsBrowserDisplay (get)

IsBrowserDisplay

Indicates if this encoding can be used by browsers to display text.

 Public Property Get IsBrowserDisplay ( ) As Boolean

Return Values

Boolean - The indication for browser display capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IsBrowserSave (get)

IsBrowserSave

Indicates if this encoding can be used to save data with this encoding.

 Public Property Get IsBrowserSave ( ) As Boolean

Return Values

Boolean - The indication for the browser saving capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IsMailNewsDisplay (get)

IsMailNewsDisplay

Indicates if this encoding can be used to display mail and news by mail and news clients.

 Public Property Get IsMailNewsDisplay ( ) As Boolean

Return Values

Boolean - Indication for mail and news client capable.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IsMailNewsSave (get)

IsMailNewsSave

Indicates if this encoding can be used to save data by mail and news clients.

 Public Property Get IsMailNewsSave ( ) As Boolean

Return Values

Boolean - Indication for the mail and news clients to use this encoding for saving.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: IsSingleByte (get)

IsSingleByte

Returns if the current encoding uses single-byte code points.

 Public Property Get IsSingleByte ( ) As Boolean

Return Values

Boolean - Returns True for single-byte, False for multi-byte code points.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: WebName (get)

WebName

Returns the encoding name registered with the Internet Assigned Numbers Authority.

 Public Property Get WebName ( ) As String

Return Values

String - The registered encoding name.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


UTF8Encoding: WindowsCodePage (get)

WindowsCodePage

Returns the Windows Operating Systems code page for this encoding.

 Public Property Get WindowsCodePage ( ) As Long

Return Values

Long - The Windows code page for this encoding.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class UTF8Encoding Overview


Version

Version

Represents a version number.

See Also

Project VBCorLib Overview Constructors | VersionStatic

Implements:

ICloneable
IComparable
IObject

Public:

Properties:

Name | Description
Build (get) | Returns the build version number of this instance.
Major (get) | Returns the major version number of this instance.
MajorRevision (get) | Returns the major revision value.
Minor (get) | Returns the minor version number of this instance.
MinorRevision (get) | Returns a minor revision value.
Revision (get) | Returns the revision version number of this instance.

Methods:

Name | Description
Clone | Returns a cloned object of this instance.
CompareTo | Compares this instance to a passed in value.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
EqualTo |
GetHashCode | Returns a pseudo-unique number identifying this instance.
GreaterThan |
GreaterThanOrEqualTo |
LessThan |
LessThanOrEqualTo |
NotEqualTo |
ToString | Returns a string representation of this object instance.


Version: Build (get)

Build

Returns the build version number of this instance.

 Public Property Get Build ( ) As Long

Return Values

Long - The build version number.

Remarks

The build version is an optional tracking number. If the number was not used when this instance was created, then -1 is returned.

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: Clone

Clone

Returns a cloned object of this instance.

 Public Function Clone ( ) As Version

Return Values

Version - The cloned version of this instanced.

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: CompareTo

CompareTo

Compares this instance to a passed in value.

 Public Function CompareTo(
      ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The value to compare this instance against.

Return Values

Long - Value indicating the relation of this instance to the passed in value.

Remarks

A negative number indicates this instance is less than the value. A positive number indicates this instance is greater than the value. Zero indicates this instance is equal to the value.

See Also

Project VBCorLib Overview | Class Version Overview


Version: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: ICloneable

ICloneable

 Implements ICloneable

Return Values

ICloneable -

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: IComparable

IComparable

 Implements IComparable

Return Values

IComparable -

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


Version: Major (get)

Major

Returns the major version number of this instance.

 Public Property Get Major ( ) As Long

Return Values

Long - The major version number. This is a non-negative number.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: MajorRevision (get)

MajorRevision

Returns the major revision value.

 Public Property Get MajorRevision ( ) As Long

Return Values

Long - Major revision number.

Remarks

The major revision number is the upper 16-bits of the standard revision value.

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: Minor (get)

Minor

Returns the minor version number of this instance.

 Public Property Get Minor ( ) As Long

Return Values

Long - The minor version number. This is a non-negative number.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: MinorRevision (get)

MinorRevision

Returns a minor revision value.

 Public Property Get MinorRevision ( ) As Long

Return Values

Long - Minor revision number.

Remarks

The minor revision is the lower 16-bits of the standard revision value.

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: Revision (get)

Revision

Returns the revision version number of this instance.

 Public Property Get Revision ( ) As Long

Return Values

Long - The revision version number.

Remarks

The build version is an optional tracking number. If the number was not used when this instance was created, then -1 is returned.

Read Only.

See Also

Project VBCorLib Overview | Class Version Overview


Version: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString(
      Optional ByRef vFieldCount As Variant ) As String

Parameters

vFieldCount
[ByRef] Optional. Variant. The number of fields to be included in the result string.

Return Values

String - String representing this instance in the form of Major.Minor[.Build[.Revision]]

Remarks

See Also

Project VBCorLib Overview | Class Version Overview


VersionStatic

VersionStatic

Provides static methods to help create Version objects.

See Also

Project VBCorLib Overview Version

Public:

Methods:

Name | Description
Parse | Parses a string in the format of 0.0[.0][.0]


VersionStatic: Parse

Parse

Parses a string in the format of 0.0[.0][.0]

 Public Function Parse(
      ByRef s As String ) As Version

Parameters

s
[ByRef] String. The string to be parsed.

Return Values

Version - A version defined from the string.

Remarks

Atleast 2 of the version numbers must be supplied, and all version numbers must be non-negative.

See Also

Project VBCorLib Overview | Class VersionStatic Overview


WaitHandle

WaitHandle

See Also

Project VBCorLib Overview


WeakReference

WeakReference

Provides a reference to an object, but does not keep that object alive.

Remarks

This is to help with circular references to prevent unreachable objects from remaining in memory. The number of references is examined after each call to an objects IUnknown.Release method. Once it reaches zero, the WeakReference object clears the hook into the referenced object and sets the IsAlive status to false.

See Also

Project VBCorLib Overview | Constructors

Implements:

IObject

Public:

Properties:

Name | Description
IsAlive (get) | Returns the status of the weakly referenced object.
IsChild (get) | Returns if this isnstance of WeakReference is a child.
Target (get) | Returns a strong reference to the object a weak reference is being kept to.
Target (set) | Sets the target object to keep a weak reference to.

Methods:

Name | Description
ClearDeadReferences | Releases any dead child WeakReferences.
CreateChild | Creates a new weak reference without allocating addition resources to maintain reference integrity.
Dispose | Releases the reference to the Target object.
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.

Events:

Name | Description
Disposed | This event is raised when a controlling WeakReference loses reference to the underlying Target object.


WeakReference: ClearDeadReferences

ClearDeadReferences

Releases any dead child WeakReferences.

 Public Sub ClearDeadReferences ( )

Remarks

This releases any children that may have been disposed by calling Dispose on the child WeakReference and not through the Dispose through the controlling WeakReference object.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: CreateChild

CreateChild

Creates a new weak reference without allocating addition resources to maintain reference integrity.

 Public Function CreateChild ( ) As WeakReference

Return Values

WeakReference - A child version of the parent weak reference.

Remarks

If multiple weak references want to be maintained on a single object, creating child weak references is the most efficient method.

You cannot set the target to anything other than Nothing on a child weak reference. This is to preserve the integerity of the controlling weak reference and the referenced object.

If the controlling weak reference loses reference to the Target object, all child weak references will also lose reference.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: Dispose

Dispose

Releases the reference to the Target object.

 Public Sub Dispose(
      Optional ByVal ChildrenOnly As Boolean = False )

Parameters

ChildrenOnly
[ByVal] Optional. Boolean. True is this instance is the controlling WeakReference and only the children are to be disposed of.

Default: False

Remarks

This allows the weak reference and its children to be disconnected from the Target object. The children themselves can be disposed of without disposing the controlling WeakReference.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: Disposed

Disposed

This event is raised when a controlling WeakReference loses reference to the underlying Target object.

 Public Event Disposed ( )

Remarks

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equality to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: IsAlive (get)

IsAlive

Returns the status of the weakly referenced object.

 Public Property Get IsAlive ( ) As Boolean

Return Values

Boolean - Status of the weak referenced object.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: IsChild (get)

IsChild

Returns if this isnstance of WeakReference is a child.

 Public Property Get IsChild ( ) As Boolean

Return Values

Boolean - Returns True if this instance was created using Object.CreateChild, otherwise False.

Remarks

Read Only.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: Target (get)

Target

Returns a strong reference to the object a weak reference is being kept to.

 Public Property Get Target ( ) As Object

Return Values

Object - Strong referenced object.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: Target (set)

Target

Sets the target object to keep a weak reference to.

 Public Property Set Target(
      ByVal RHS As Object )

Parameters

RHS
[ByVal] Object. Strong object to create a weak reference to.

Remarks

Read/Write.

See Also

Project VBCorLib Overview | Class WeakReference Overview


WeakReference: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class WeakReference Overview


WinResourceReader

WinResourceReader

A class that reads resources out of EXE and DLL files.

Remarks

Use this class to iterate the resources within an EXE or DLL file.

The only resource types recognized are Strings, Bitmaps, Icons and Cursors. All other resource types are maintained as byte arrays.

Pass this object into the ResourceManager constructor to retrieve specific resources based on ID, Type, and Culture. Or, pass this object into a ResourceSet to retrieve resources for a specific culture.

See Also

Project VBCorLib Overview | Constructors | ResourceManager | ResourceSet | ResourceReader | IResourceReader | Win32Resource

Implements:

IEnumerable
IObject
IResourceReader

Public:

Methods:

Name | Description
AddDecoder | Adds additional resource decoders to interpret binary data that is unknown to the ResourceReader.
CloseReader | Closes the reader
Equals | Returns a boolean indicating if the value and this object instance are the same instance.
GetEnumerator | Returns an IDictionaryEnumerator object.
GetHashCode | Returns a pseudo-unique number identifying this instance.
ToString | Returns a string representation of this object instance.


WinResourceReader: AddDecoder

AddDecoder

Adds additional resource decoders to interpret binary data that is unknown to the ResourceReader.

 Public Sub AddDecoder(
      ByVal DecoderToAdd As IResourceDecoder )

Parameters

DecoderToAdd
[ByVal] IResourceDecoder. A resource decoder associated with a specific resource type.

Remarks

This allows the ResourceReader to be extended to handle additional resource types. If no decoder exists for the specific resource type, then the raw data is returned in a Byte array.

Resource types can be identified by either a numeric value, or a string name.

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: CloseReader

CloseReader

Closes the reader

 Public Sub CloseReader ( )

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: Equals

Equals

Returns a boolean indicating if the value and this object instance are the same instance.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to compare equalit to.

Return Values

Boolean - Boolean indicating equality.

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: GetEnumerator

GetEnumerator

Returns an IDictionaryEnumerator object.

 Public Function GetEnumerator ( ) As IDictionaryEnumerator

Return Values

IDictionaryEnumerator - An enumerator.

Remarks

The enumerator returns values as DictionaryEntry objects. The value property in the DictionaryEntry object returns a Win32Resource object which contains details about the specific resource found in the EXE or DLL file. The Key property returns the ID for the specific resource. The Keys may not be unique across all resources, os using the Key as a unique identifier is not recommended.

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: GetHashCode

GetHashCode

Returns a pseudo-unique number identifying this instance.

 Public Function GetHashCode ( ) As Long

Return Values

Long - Pseudo-unique number identifying this instance.

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: IEnumerable

IEnumerable

 Implements IEnumerable

Return Values

IEnumerable -

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: IResourceReader

IResourceReader

 Implements IResourceReader

Return Values

IResourceReader -

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


WinResourceReader: ToString

ToString

Returns a string representation of this object instance.

 Public Function ToString ( ) As String

Return Values

String - String representing this instance.

Remarks

See Also

Project VBCorLib Overview | Class WinResourceReader Overview


XmlSyntaxException

XmlSyntaxException

Represents an exception caused by invalid XML syntax.

See Also

Project VBCorLib Overview

Implements:

Exception
IObject
SystemException

Public:

Properties:

Name | Description
Data (get) | Returns a key/value collection used to contain user-defined specific information about the exception.
HelpLink (get) | Gets a link to a help file associated with the exception.
HelpLink (let) | Sets a link to a help file associated with the exception.
HResult (get) | Gets the HRESULT, a coded numerical value that is assigned to a specific exception.
HResult (let) | Sets the HRESULT, a coded numerical value that is assigned to a specific exception.
InnerException (get) | Gets the exception that caused the Subclassed exception to be thrown.
Message (get) | Gets the error message associated with the Subclass exception.
Source (get) | Gets a description of the source of the exception.
Source (let) | Sets a description of the source of the exception.

Methods:

Name | Description
Equals | Provides a basic implementation of the Equals function of the IObject interface.
GetBaseException | Gets the original exception that caused the chain of exceptions to occur.
GetHashCode | Provides a basic implementation of the GetHashcode function of the IObject interface.
ToString | Returns the exception message prepended with the type name of the Subclass Exception.


XmlSyntaxException: Data (get)

Data

Returns a key/value collection used to contain user-defined specific information about the exception.

 Public Property Get Data ( ) As IDictionary

Return Values

IDictionary - A key/value collection for user-defined information.

Remarks

This is a public property that is used by the exception classes to allow user-defined information to be included with the exception.

Read Only.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: Equals

Equals

Provides a basic implementation of the Equals function of the IObject interface.

 Public Function Equals(
      ByRef Value As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The value to determine if is the same object instance as the exception.

Return Values

Boolean - Returns True if Value is the same instance as the exception object, False otherwise.

Remarks

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: Exception

Exception

 Implements Exception

Return Values

Exception -

Remarks

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: GetBaseException

GetBaseException

Gets the original exception that caused the chain of exceptions to occur.

 Public Function GetBaseException ( ) As Exception

Return Values

Exception - The Exception that caused the chain of exceptions to occur.

Remarks

If exceptions set their InnerException to a previously thrown exception, then a chain of exceptions can be created. Using this function will traverse that chain of exceptions until the original exception is reached. That exception with then be returned to the caller.

When an InnerException of Nothing is reached, then then the exception object is returned as the base exception because it did not have an inner exception, so it is assumed that the exception object is the last in the chain and therefore the cause of the chain of exceptions being iterated.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: GetHashCode

GetHashCode

Provides a basic implementation of the GetHashcode function of the IObject interface.

 Public Function GetHashCode ( ) As Long

Return Values

Long - A 32-bit value used to help identify the exception object.

Remarks

The value generated is not unique across all hashcodes. Additional measures must be taken to find a unique value that happens to have the same hashcode as the exception object.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: HelpLink (get)

HelpLink

Gets a link to a help file associated with the exception.

 Public Property Get HelpLink ( ) As String

Return Values

String - The Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: HelpLink (let)

HelpLink

Sets a link to a help file associated with the exception.

 Public Property Let HelpLink(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. Set the Uniform Resource Name (URN) or Uniform Resource Locator (URL).

Remarks

The return value, which represents a help file, is a URN or URL. For example, the HelpLink value could be:
"http://www.myhelpsite.com"

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: HResult (get)

HResult

Gets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Get HResult ( ) As Long

Return Values

Long - The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned.

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview | Exception


XmlSyntaxException: HResult (let)

HResult

Sets the HRESULT, a coded numerical value that is assigned to a specific exception.

 Public Property Let HResult(
      ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The value of the associated HResult.

Remarks

An HResult is associated with an error result code. This allows for VB specific error codes to be returned. This is the same as Err.Number.

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview | Exception


XmlSyntaxException: InnerException (get)

InnerException

Gets the exception that caused the Subclassed exception to be thrown.

 Public Property Get InnerException ( ) As Exception

Return Values

Exception - The inner exception that caused the current exception to be thrown.

Remarks

when an exception is thrown and that exception causes another exception to be thrown, then the InnerException of the new Exception object should contain the exception that caused it to be thrown.

Read Only.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: IObject

IObject

 Implements IObject

Return Values

IObject -

Remarks

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: Message (get)

Message

Gets the error message associated with the Subclass exception.

 Public Property Get Message ( ) As String

Return Values

String - A custom message set by the Subclass, or a default message of "An Error has occurred."

Remarks

Generally this property is set to a meaningful message that is related to the exception that is being thrown. The message should be human readable.

This property can be set in the constructor NewException.

Read Only.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: Source (get)

Source

Gets a description of the source of the exception.

 Public Property Get Source ( ) As String

Return Values

String - A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: Source (let)

Source

Sets a description of the source of the exception.

 Public Property Let Source(
      ByVal RHS As String )

Parameters

RHS
[ByVal] String. A description of the source of the exception.

Remarks

The source of an exception generally will contain the name of the function being called when the exception was thrown. This is to help narrow down exactly where the exception had occurred.

Read/Write.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: SystemException

SystemException

 Implements SystemException

Return Values

SystemException -

Remarks

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview


XmlSyntaxException: ToString

ToString

Returns the exception message prepended with the type name of the Subclass Exception.

 Public Function ToString ( ) As String

Return Values

String - A formatted message containing the original message and possible type of exception.

Remarks

A general format might look like this:
VBCorLib.SystemException: An Error has occurred.

A listing of all inner exceptions will be included in the return value.

See Also

Project VBCorLib Overview | Class XmlSyntaxException Overview