I\'m working on this project where we don\'t have the source code for large chunks of the project, but we have the .DLL files with some information. There is a bug in the D
Try type cast to IUnknown first.
tempSubclass := Subclass(ParentClass(Integer(IUnknown(oleVariantCast))));