Exemple #1
0
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             IntegrationHelpers.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         IntegrationHelpers.DeInitializeIntegration();
         _initialized = false;
         _opened      = false;
     }
 }
Exemple #2
0
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             ExcelIntegration.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         TraceLogger.IntegrationTraceSource = null;
         ExcelIntegration.DeInitialize();
         _initialized = false;
         _opened      = false;
     }
 }
Exemple #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));
        }
Exemple #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));
        }
Exemple #5
0
 public void RegisterRtdWrapper(string progId, object rtdWrapperOptions, object functionAttribute, List <object> argumentAttributes)
 => XlRegistration.RegisterRtdWrapper(progId, rtdWrapperOptions, functionAttribute, argumentAttributes);
Exemple #6
0
 public void RegisterLambdaExpressionsWithAttributes(List <LambdaExpression> lambdaExpressions, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterLambdaExpressionsWithAttributes(lambdaExpressions, functionAttributes, argumentAttributes);
Exemple #7
0
 public void RegisterDelegatesWithAttributes(List <Delegate> delegates, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterDelegatesWithAttributes(delegates, functionAttributes, argumentAttributes);
Exemple #8
0
 public void RegisterMethodsWithAttributes(List <MethodInfo> methods, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterMethodsWithAttributes(methods, functionAttributes, argumentAttributes);
Exemple #9
0
 public void RegisterMethods(List <MethodInfo> methods)
 => XlRegistration.RegisterMethods(methods);