public unsafe CrmLogControl HoldClerk(object idx)
 {
     CrmLogControl control = null;
     tagVARIANT gvariant;
     tagVARIANT gvariant2;
     IntPtr pDstNativeVariant = new IntPtr((int) &gvariant);
     VariantInit(&gvariant);
     VariantInit(&gvariant2);
     Marshal.GetNativeVariantForObject(idx, pDstNativeVariant);
     ICrmMonitor* monitorPtr = this._pMon;
     int modopt(IsLong) errorCode = **(((int*) monitorPtr))[0x10](monitorPtr, gvariant, &gvariant2);
     VariantClear(&gvariant);
     if (errorCode < 0)
     {
         Marshal.ThrowExceptionForHR(errorCode);
     }
     IUnknown* unknownPtr = *((IUnknown**) (&gvariant2 + 8));
     if (*(((int*) (&gvariant2 + 8))) != 0)
     {
         try
         {
             IntPtr p = new IntPtr((int) unknownPtr);
             control = new CrmLogControl(p);
         }
         finally
         {
             VariantClear(&gvariant2);
         }
     }
     return control;
 }
        public unsafe CrmLogControl HoldClerk(object idx)
        {
            CrmLogControl control = null;
            tagVARIANT    gvariant;
            tagVARIANT    gvariant2;
            IntPtr        pDstNativeVariant = new IntPtr((int)&gvariant);

            VariantInit(&gvariant);
            VariantInit(&gvariant2);
            Marshal.GetNativeVariantForObject(idx, pDstNativeVariant);
            ICrmMonitor *monitorPtr = this._pMon;

            int modopt(IsLong) errorCode = **(((int *)monitorPtr))[0x10](monitorPtr, gvariant, &gvariant2);

            VariantClear(&gvariant);
            if (errorCode < 0)
            {
                Marshal.ThrowExceptionForHR(errorCode);
            }
            IUnknown *unknownPtr = *((IUnknown **)(&gvariant2 + 8));

            if (*(((int *)(&gvariant2 + 8))) != 0)
            {
                try
                {
                    IntPtr p = new IntPtr((int)unknownPtr);
                    control = new CrmLogControl(p);
                }
                finally
                {
                    VariantClear(&gvariant2);
                }
            }
            return(control);
        }
예제 #3
0
        private void Init(String compensator, String description, CompensatorOptions flags)
        {
            // Create the logcontrol object:
            DBG.Info(DBG.CRM, "Creating the log-control object");
            _control = new CrmLogControl();

            DBG.Info(DBG.CRM, "Registering the compensator '" + compensator + "' w/ the control.");
            _control.RegisterCompensator(compensator, description, (int)flags);

            DBG.Info(DBG.CRM, "Getting monitor from log-control object");
            _monitor = _control.GetMonitor();
        }
 private void Init(string compensator, string description, CompensatorOptions flags)
 {
     this._control = new CrmLogControl();
     this._control.RegisterCompensator(compensator, description, (int modopt(IsLong)) flags);
     this._monitor = this._control.GetMonitor();
 }
 internal Clerk(CrmLogControl logControl)
 {
     this._control = logControl;
     this._monitor = this._control.GetMonitor();
 }
예제 #6
0
 private void Init(string compensator, string description, CompensatorOptions flags)
 {
     this._control = new CrmLogControl();
     this._control.RegisterCompensator(compensator, description, (int modopt(IsLong))flags);
     this._monitor = this._control.GetMonitor();
 }
예제 #7
0
 internal Clerk(CrmLogControl logControl)
 {
     this._control = logControl;
     this._monitor = this._control.GetMonitor();
 }
예제 #8
0
 internal Clerk(CrmLogControl logControl)
 {
     DBG.Assert(logControl != null, "logControl object is null!");
     _control = logControl;
     _monitor = _control.GetMonitor();
 }