public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo)
        {
            if (pBPResolutionInfo == null)
            {
                throw new ArgumentNullException("pBPResolutionInfo");
            }
            if (pBPResolutionInfo.Length == 0)
            {
                throw new ArgumentException();
            }

            pBPResolutionInfo[0].dwFields = 0;

            if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0)
            {
                pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM;
                pBPResolutionInfo[0].pProgram  = _program;
            }

            if ((dwFields & enum_BPRESI_FIELDS.BPRESI_THREAD) != 0 && _thread != null)
            {
                pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD;
                pBPResolutionInfo[0].pThread   = _thread;
            }

            if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0 && false)
            {
                pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION;
                _location.ToNativeForm(out pBPResolutionInfo[0].bpResLocation);
            }

            return(VSConstants.S_OK);
        }
        public int GetResolutionInfo(enum_BPERESI_FIELDS dwFields, BP_ERROR_RESOLUTION_INFO[] pErrorResolutionInfo)
        {
            if (pErrorResolutionInfo == null)
            {
                throw new ArgumentNullException("pErrorResolutionInfo");
            }
            if (pErrorResolutionInfo.Length == 0)
            {
                throw new ArgumentException();
            }

            pErrorResolutionInfo[0].dwFields = 0;

            if ((dwFields & enum_BPERESI_FIELDS.BPERESI_MESSAGE) != 0 && _message != null)
            {
                pErrorResolutionInfo[0].dwFields   |= enum_BPERESI_FIELDS.BPERESI_MESSAGE;
                pErrorResolutionInfo[0].bstrMessage = _message;
            }

            if ((dwFields & enum_BPERESI_FIELDS.BPERESI_PROGRAM) != 0 && _program != null)
            {
                pErrorResolutionInfo[0].dwFields |= enum_BPERESI_FIELDS.BPERESI_PROGRAM;
                pErrorResolutionInfo[0].pProgram  = _program;
            }

            if ((dwFields & enum_BPERESI_FIELDS.BPERESI_THREAD) != 0 && _thread != null)
            {
                pErrorResolutionInfo[0].dwFields |= enum_BPERESI_FIELDS.BPERESI_THREAD;
                pErrorResolutionInfo[0].pThread   = _thread;
            }

            if ((dwFields & enum_BPERESI_FIELDS.BPERESI_TYPE) != 0)
            {
                pErrorResolutionInfo[0].dwFields |= enum_BPERESI_FIELDS.BPERESI_TYPE;
                pErrorResolutionInfo[0].dwType    = _errorType;
            }

            if ((dwFields & enum_BPERESI_FIELDS.BPERESI_BPRESLOCATION) != 0 && _location != null)
            {
                pErrorResolutionInfo[0].dwFields |= enum_BPERESI_FIELDS.BPERESI_BPRESLOCATION;
                _location.ToNativeForm(out pErrorResolutionInfo[0].bpResLocation);
            }

            return(VSConstants.S_OK);
        }