/// <exception cref="VariantException"></exception>
        /// <exception cref="TjsException"></exception>
        protected internal static void InstanceOf(Variant name, Variant targ)
        {
            // checks instance inheritance.
            string str = name.AsString();

            if (str != null)
            {
                int hr = CustomObject.DefaultIsInstanceOf(0, targ, str, null);
                if (hr < 0)
                {
                    ThrowFrom_tjs_error(hr, null);
                }
                targ.Set((hr == Error.S_TRUE) ? 1 : 0);
                return;
            }
            targ.Set(0);
        }