public BreakpointResolutionLocationData(BP_RESOLUTION_LOCATION location, bool releaseComObjects)
        {
            if (location.bpType != (uint)enum_BP_TYPE.BPT_DATA)
                throw new ArgumentException();

            if (location.unionmember1 != IntPtr.Zero)
            {
                _dataExpression = Marshal.PtrToStringBSTR(location.unionmember1);
                if (releaseComObjects)
                    Marshal.FreeBSTR(location.unionmember1);
            }

            if (location.unionmember2 != IntPtr.Zero)
            {
                _function = Marshal.PtrToStringBSTR(location.unionmember2);
                if (releaseComObjects)
                    Marshal.FreeBSTR(location.unionmember2);
            }

            if (location.unionmember3 != IntPtr.Zero)
            {
                _image = Marshal.PtrToStringBSTR(location.unionmember3);
                if (releaseComObjects)
                    Marshal.FreeBSTR(location.unionmember3);
            }

            _flags = (enum_BP_RES_DATA_FLAGS)location.unionmember4;
        }
 public BreakpointResolutionLocationData(string dataExpression, string function, string image, enum_BP_RES_DATA_FLAGS flags)
 {
     _dataExpression = dataExpression;
     _function = function;
     _image = image;
     _flags = flags;
 }
Ejemplo n.º 3
0
 public BreakpointResolutionLocationData(string dataExpression, string function, string image, enum_BP_RES_DATA_FLAGS flags)
 {
     _dataExpression = dataExpression;
     _function       = function;
     _image          = image;
     _flags          = flags;
 }
Ejemplo n.º 4
0
        public BreakpointResolutionLocationData(BP_RESOLUTION_LOCATION location, bool releaseComObjects)
        {
            if (location.bpType != (uint)enum_BP_TYPE.BPT_DATA)
            {
                throw new ArgumentException();
            }

            if (location.unionmember1 != IntPtr.Zero)
            {
                _dataExpression = Marshal.PtrToStringBSTR(location.unionmember1);
                if (releaseComObjects)
                {
                    Marshal.FreeBSTR(location.unionmember1);
                }
            }

            if (location.unionmember2 != IntPtr.Zero)
            {
                _function = Marshal.PtrToStringBSTR(location.unionmember2);
                if (releaseComObjects)
                {
                    Marshal.FreeBSTR(location.unionmember2);
                }
            }

            if (location.unionmember3 != IntPtr.Zero)
            {
                _image = Marshal.PtrToStringBSTR(location.unionmember3);
                if (releaseComObjects)
                {
                    Marshal.FreeBSTR(location.unionmember3);
                }
            }

            _flags = (enum_BP_RES_DATA_FLAGS)location.unionmember4;
        }