All handle classes provide the methods SetHandle() and GetHandle(), which allow to access the underlying handle for legacy purposes; furthermore, the classes provide an operator that casts an instance of the class into the corresponding handle. These methods are typically used when combining procedural and object-oriented code.