HRESULT is used as a return value to determine the success or failure of a function.
Questions tagged [hresult]
168 questions
2
votes
4 answers
How to catch specific OleDbException?
I need to catch the following specific exception:
System.Data.OleDb.OleDbException was caught ErrorCode=-2147467259
Message="The changes you requested to the table were not successful
because they would create duplicate values in the index,…

CJ7
- 22,579
- 65
- 193
- 321
2
votes
2 answers
Two kinects & skeleton stream from both of them - possible?
I have two kinect sensors that are connected on different USB controllers. If I enable the skeleton stream on both of them, I get an exception when I call the start method on the second sensor:
This API has returned an exception from an HRESULT:…

VladN
- 729
- 1
- 10
- 29
2
votes
2 answers
Exception: Error HRESULT E_FAIL with Microsoft LightSwitch Visual Studio 2012 RC
I installed Visual Studio 2012 RC recently along with VS 2012 SDK and LightSwitch Extensibility Toolkit.
this is the XAML code in my Client.Design -> TControl.XAML file

UsherTech
- 35
- 6
2
votes
0 answers
Excel Interop Range.Value = arr[,] crashes with 0x800A03EC when arr[,] contains Date less than 1900-01-01
I understand the basic problem is that Excel represents 1900-01-01 as the value of 1. However, in Excel it's possible to manually type in values pre-1900.
// this converts the DataTable to an Object[,]
DataTable table = ...
Object[,] arr =…

Loathing
- 5,109
- 3
- 24
- 35
1
vote
2 answers
How should I check that [out] params in COM can be used?
Officially one should not use [out] parameters from COM functions unless the function succeeded this means that there are (at least) three ways to see if an [out] parameter can be used.
Consider the following interface
interface IFoo : IUnknown {
…

Motti
- 110,860
- 49
- 189
- 262
1
vote
1 answer
How can I determine which filter in my DirectShow filter graph failed when I call IMediaControlRun?
I have a Delphi 6 application using the DSPACK component library that builds a filter graph and then runs it. When I run the Filter Graph I am getting an error via a failed HRESULT return from IMediaControl.Run(), using a cePlay control event…

Robert Oschler
- 14,153
- 18
- 94
- 227
1
vote
1 answer
How to debug an unspecified error ($80004005) during DirectShow put_Enable call on Capture filter?
I have a DirectShow application written in Delphi 6 using the DSPACK component library. I am having a strange problem enabling an input line on a Filter. I search the pins until I find the input line, in this case named 'Microphone', and call…

Robert Oschler
- 14,153
- 18
- 94
- 227
1
vote
2 answers
What does "Invalid parameter error. 0x80030057 (STG_E_INVALIDPARAMETER)" usually mean?
I came across the COM error:
Invalid parameter error. HRESULT 0x80030057 (STG_E_INVALIDPARAMETER)
when dealing with an Excel interop component called Aspose and couldn't figure out why this error when opening an Excel file. Nor could I find…

Lisa
- 4,333
- 2
- 27
- 34
1
vote
0 answers
In Microsoft javascript is it possible to get the textual description of an error coming from an HRESULT?
I know the Error object http://msdn.microsoft.com/en-us/library/dww52sbt in Microsoft javascript.
Some errors come from an HRESULT and they have a valid number property (for example -2147023570 which maps to 0x8007052E, see for example "Making Sense…

Alessandro Jacopson
- 18,047
- 15
- 98
- 153
1
vote
1 answer
Returning undocumented HRESULTS from standard COM interface methods?
What is the rule on returning undocumented HRESULTS from documented standard COM objects?
i'm looking at the documentation for IObjectWithSite.SetSite, which says i should return S_OK in all situations:
Syntax
HRESULT SetSite(IUnknown…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
1
vote
2 answers
CreateWICTextureFromFile returns E_NOINTERFACE
I want to create a Texture loader.
However, when I create the following line:
HRESULT res = CreateWICTextureFromFile(device, file.c_str(),&resource,&shaderResourceView,0);
it returns E_NOINTERFACE.
The file I want to load definitively exists and…

Raildex
- 3,406
- 1
- 18
- 42
1
vote
1 answer
What is the difference between HRESULT error codes that start with 0x8 and with 0xC?
It's more of a curiosity than anything else. I've been reviewing the HRESULT error codes that many Win32 APIs and Windows components return to signify errors.
If I understand its structure correctly, the most significant bit 31 is the error bit. If…

c00000fd
- 20,994
- 29
- 177
- 400
1
vote
0 answers
Type mismatch on excel data from powershell
Good day everyone.
I am a starting programmer in powershell and am trying to make a program input help desk calls into an excel sheet to import into the help desk ticketing system.
My script:
$excel_file_path = 'G:\IT\Helpdesk\Daily Calls.xlsx'
##…

Megamidget3
- 59
- 10
1
vote
1 answer
#import lead to a HRESULT 0x80040154 "Not registered class"
I'm trying to use a COM DLL from VC++ 2005. I created a TestCOMlib.dll with ATL, created a simple interface ISimple and added one property (type LONG, name Property01) and one method (name Method01).
The DLL seems to be correctly registered in the…

gionny
- 247
- 2
- 10
1
vote
1 answer
HRESULT: distinguish custom code from system one
Similar question was asked before, but i haven't found some answers there.
As i understand, for making custom HRESULT codes i create an .mc file where i describe the codes, then compile it and get an .h file. But i can't get it how to prevent…

fogbit
- 1,961
- 6
- 27
- 41