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