コード例 #1
0
ファイル: XlAddIn.cs プロジェクト: cezary12/ExcelDna
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             IntegrationHelpers.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         IntegrationHelpers.DeInitializeIntegration();
         _initialized = false;
         _opened      = false;
     }
 }
コード例 #2
0
 private static void DeInitializeIntegration()
 {
     if (_initialized)
     {
         if (_opened)
         {
             ExcelIntegration.DnaLibraryAutoClose();
             XlRegistration.UnregisterMethods();
         }
         TraceLogger.IntegrationTraceSource = null;
         ExcelIntegration.DeInitialize();
         _initialized = false;
         _opened      = false;
     }
 }
コード例 #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));
        }
コード例 #4
0
ファイル: XlAddIn.cs プロジェクト: Excel-DNA/exceldna-build
        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));
        }
コード例 #5
0
 public void RegisterRtdWrapper(string progId, object rtdWrapperOptions, object functionAttribute, List <object> argumentAttributes)
 => XlRegistration.RegisterRtdWrapper(progId, rtdWrapperOptions, functionAttribute, argumentAttributes);
コード例 #6
0
 public void RegisterLambdaExpressionsWithAttributes(List <LambdaExpression> lambdaExpressions, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterLambdaExpressionsWithAttributes(lambdaExpressions, functionAttributes, argumentAttributes);
コード例 #7
0
 public void RegisterDelegatesWithAttributes(List <Delegate> delegates, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterDelegatesWithAttributes(delegates, functionAttributes, argumentAttributes);
コード例 #8
0
 public void RegisterMethodsWithAttributes(List <MethodInfo> methods, List <object> functionAttributes, List <List <object> > argumentAttributes)
 => XlRegistration.RegisterMethodsWithAttributes(methods, functionAttributes, argumentAttributes);
コード例 #9
0
 public void RegisterMethods(List <MethodInfo> methods)
 => XlRegistration.RegisterMethods(methods);