Reference Library
CreateDecoder Method (key)
NamespacesMBNCSUtilCdKeyCreateDecoder(String)
Creates a CD key decoder for the specified key.
Declaration Syntax
C#Visual BasicVisual C++
public static CdKey CreateDecoder(
	string key
)
Public Shared Function CreateDecoder ( _
	key As String _
) As CdKey
public:
static CdKey^ CreateDecoder(
	String^ key
)
Parameters
key (String)
The CD key to initialize processing for.
Return Value
An instance of the CdKey class
Remarks

This method only conducts initial validity checks to ensure that the CD key is valid; that is, it checks for a valid key length (13, 16, or 26 characters) and checks that the characters are valid for the key type. For example, Starcraft keys are numeric only, whereas Warcraft II, Diablo II, Lord of Destruction, Warcraft III, and The Frozen Throne keys are alphanumeric.

Additional validity checks are conducted internally; however, these do not raise Exceptions. To confirm the validity of a key after instantiation, call the CdKey.IsValid property.

This method is only a wrapper for the CdKey constructor and provides no additional functionality.

Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if the value of key is null (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionThrown if the CD key is an invalid length or does not pass initial validity checks.

Assembly: Asgard5Library (Module: Asgard5Library)