Example #1
0
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             IntegrationHelpers.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         IntegrationHelpers.DeInitializeIntegration();
         _initialized = false;
         _opened      = false;
     }
 }
Example #2
0
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             ExcelIntegration.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         TraceLogger.IntegrationTraceSource = null;
         ExcelIntegration.DeInitialize();
         _initialized = false;
         _opened      = false;
     }
 }
Example #3
0
        internal static IntPtr RegistrationInfo(IntPtr pParam)
        {
            if (!_initialized)
            {
                return(IntPtr.Zero);
            }

            object param   = XlMarshalContext.ObjectParam(pParam);
            object regInfo = XlRegistration.GetRegistrationInfo(param);

            if (regInfo == null)
            {
                return(IntPtr.Zero); // Converted to #NUM
            }

            var ctx = XlDirectMarshal.GetMarshalContext();

            return(ctx.ObjectReturn(regInfo));
        }
Example #4
0
        internal static IntPtr RegistrationInfo(IntPtr pParam)
        {
            if (!_initialized)
            {
                return(IntPtr.Zero);
            }

            // CONSIDER: This might not be the right place for this.
            ICustomMarshaler m       = XlObject12Marshaler.GetInstance("");
            object           param   = m.MarshalNativeToManaged(pParam);
            object           regInfo = XlRegistration.GetRegistrationInfo(param);

            if (regInfo == null)
            {
                return(IntPtr.Zero); // Converted to #NUM
            }

            return(m.MarshalManagedToNative(regInfo));
        }
Example #5
0
 public void RegisterRtdWrapper(string progId, object rtdWrapperOptions, object functionAttribute, List <object> argumentAttributes)
 => XlRegistration.RegisterRtdWrapper(progId, rtdWrapperOptions, functionAttribute, argumentAttributes);
Example #6
0
 public void RegisterLambdaExpressionsWithAttributes(List <LambdaExpression> lambdaExpressions, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterLambdaExpressionsWithAttributes(lambdaExpressions, functionAttributes, argumentAttributes);
Example #7
0
 public void RegisterDelegatesWithAttributes(List <Delegate> delegates, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterDelegatesWithAttributes(delegates, functionAttributes, argumentAttributes);
Example #8
0
 public void RegisterMethodsWithAttributes(List <MethodInfo> methods, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterMethodsWithAttributes(methods, functionAttributes, argumentAttributes);
Example #9
0
 public void RegisterMethods(List <MethodInfo> methods)
 => XlRegistration.RegisterMethods(methods);