KMotion_dotNet.KM_CoordMotion.SetStraightFeedCallback C# (CSharp) Method

SetStraightFeedCallback() private method

Sets the internal Straight Feed callback for the CoordMotion.cpp object Separate delegate for this callback prevents the Garbage Collector from releasing the unmanaged function pointer from being destroyed
private SetStraightFeedCallback ( ) : void
return void
        private void SetStraightFeedCallback()
        {
            try
            {
                CoordMotionStraightFeedHandler = new KM_CoordMotionStraightFeedSixAxisHandler(OnCoordMotionStraightFeed);
                KM_dotnet_Interop_CoordMotion_SetStraightFeedCallback(_InstanceHandle, CoordMotionStraightFeedHandler);
            }
            catch (DllNotFoundException e)
            {
                throw new DMException(this, e, String.Format("Dll Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                    this.ToString(), "SetStraightFeedCallback"));
            }
            catch (EntryPointNotFoundException e)
            {
                throw new DMException(this, e, String.Format("Entry Point Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                   this.ToString(), "SetStraightFeedCallback"));
            }
            catch (Exception e)
            {
                throw new DMException(this, e, String.Format("General Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                  this.ToString(), "SetStraightFeedCallback"));
            }
        }
KM_CoordMotion