HRESULT is used as a return value to determine the success or failure of a function.
Questions tagged [hresult]
168 questions
1
vote
1 answer
Could QueryInterface() provide us with nullptr when succeed?
Imagine a situation:
CComPtr pGraph;
HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pGraph));
if (SUCCEEDED(hr))
{
CComPtr pControl;
hr =…

Illia Levandovskyi
- 1,228
- 1
- 11
- 20
1
vote
0 answers
Background thread throws exception when unloading in AppDomain, how can I stop it? Error while uploading appdomain (HRESULT 0x80131015)
I've been using this program.
I am currently running the server program in an appdomain. However, when I want to unload it, it returns an exception with HRESULT 0x80131015. This only occurs when I start the pipeServer by clicking the button. I've…

IamACatBug
- 25
- 5
1
vote
1 answer
how to correct hresult error.ms sql server
when remotely accessing an instance, I try to open 'new query' in the sql server , it is given below error:
Error: already exists. (Exception from HRESULT: 0x80030050 (STG_E_FILEALREADYEXISTS))
How to correct this error?

murat
- 139
- 1
- 5
1
vote
1 answer
The located assembly's manifest definition does not match the assembly
Im getting the error below when i try to build my web app. the same code work on my other machine, but not in the main dev. i have the dll in the bin folder, too. and the error discription is nothing more than the one given below? any ideas whats…

Aneef
- 3,641
- 10
- 43
- 67
1
vote
2 answers
In Visual Studio, my Design view doesn't load the master page controls. Why?
It's just so much HRESULT E_FAIL, if you know what I'm talking about.
And if you use Visual Studio, you know what I'm talking about.
Similar thread, but not a duplicate: Is the design view for aspx pages in Visual Studio useful?
Any insight,…

MrBoJangles
- 12,127
- 17
- 61
- 79
1
vote
1 answer
Retrieving error message from HRESULT in C++ after calling a C# COM object
I have a COM object written in C#. Under some circumstances, the COM object may throw an Exception with a descriptive message if it encounters an error (for example throw new Exception("error message")).
This COM object is called from VB6 code and…

ghigad
- 341
- 1
- 12
1
vote
1 answer
Is there a reason why HRESULT should be assigned to a variable?
I have a quick question about some demo code from the directshownet samples.
Is the following:
// Set the video to stream to pictureBox1
int hr;
hr = this.videoWindow.put_Owner(this.pictureBox1.Handle);
DsError.ThrowExceptionForHR(hr);
Preferable…

James
- 53
- 1
- 6
1
vote
1 answer
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
I have a project which runs in visual studio 2008. When I try to convert the project within visual studio 2012 (on a different computer) I get the following error:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
I…

thehoten
- 123
- 1
- 9
1
vote
2 answers
Silverlight ChildWindow: HRESULT E_FAIL on ChildWindow.Show()
I have some problems with ChildWindow control, I have created an error window control that is shown after unhandled exception is caught in app.xaml.cs. The problem is when I try to show the error window, sometimes it works fine, but sometimes I get…

Boris
- 13
- 3
1
vote
0 answers
Imagebrush ResourceDictionary
I've created an Resourcedictionary where i define my ImageBrush to an jpg picture. I use this ImageBrush on my Path object to fill it. However when I build I get the error Error:
Error HRESULT E_FAIL has been returned from a call to a COM component.…

JonasN89
- 1,386
- 2
- 11
- 23
1
vote
1 answer
how to interpret HRESULT -1072868846
anyone help to interpret what is HRESULT -1072868846? I found http://msdn.microsoft.com/en-us/library/ee719669%28VS.85%29.aspx but none of the listed ones match...
the function i'm calling is
hr = m_pReader->SetCurrentMediaType(
…

user2453839
- 13
- 4
1
vote
0 answers
Getting deployment error HRESULT: 0x80070002 System cannot find the file specified when adding a file to the solution in Visual Studio 2010
I added a Schema.xml file to a list instance in my solution. When I attempt to deploy the solution, it throws an exception saying that it cannot find the specified file HRESULT 0x80070002. If I remove the Schema.xml, it deploys fine.
I have checked…

halshing
- 612
- 2
- 6
- 17
1
vote
0 answers
Error while using Keyword Query object in asp.net application for search in sharepoint
I am trying to use Keyword Query object in asp.net application.
I wrote this code :
Namespace : using System.Data.SqlClient;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Search;
using…

Red Swan
- 15,157
- 43
- 156
- 238
1
vote
1 answer
tracking down an uncatchable thread abort in c#
I'm getting a ThreadAbortException in C# in generic try catch block (catching all exceptions) -- however, I'm unable to get a trace on it, indicating it was probably killed outside of managed code.
I get an HRESULT code of -2146233040, which when…

ayu
- 111
- 1
- 1
- 6
1
vote
2 answers
An unhandled exception occurred during the execution of the current web request
suddenly when i run my web application i get this error :
Could not load file or assembly
'file:///C:\Users\rafael\AppData\Local\Temp\Temporary ASP.NET
Files\root\284bddf3\431c8965\App_Web_homepage.aspx.cdcab7d2.vmizb1js.dll'
or one of its…

Rafael Adel
- 7,673
- 25
- 77
- 118