Questions tagged [hresult]

HRESULT is used as a return value to determine the success or failure of a function.

168 questions
6
votes
1 answer

What does this usually mean, Error HRESULT E_FAIL has been returned from a call to a COM component.?

I have a particular view with a DataGrid (silverlight 4). But i have a project where resources have been merged with another project (for backward support). Now, after this merge, i am getting this error whenever i try to add a new row oject to my…
AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140
6
votes
2 answers

In Windows, is there any way to convert an errno into an HRESULT?

I know the HRESULT_FROM_WIN32 macro to convert a Win32 error code into an HRESULT, is there any way to do the conversion starting from an errno error?
Alessandro Jacopson
  • 18,047
  • 15
  • 98
  • 153
5
votes
0 answers

Trying to create a Gatt Client application for Windows C++ that doesn't fail when connection established

I am using the Windows api Gatt Client BLE for C++, my goal is to connect two devices (but in this case I will try just one) and keep reading and writing data constantly without closing the device at any time. All my devices have one specific…
5
votes
0 answers

COMException using WebBrowser control in certain 2008 R2 Environments

In certain 2008 R2 environments and not others, I'm getting a COMExceptions when utilizing a System.Windows.Forms.WebBrowser control. Whether specifying contents via the DocumentText property or invoking the Navigate method with a URL parameter, I…
user851220
  • 1,071
  • 2
  • 7
  • 7
5
votes
1 answer

What does this macro do? __success(return >= 0) long

In the Windows header file WinNT.h, HRESULT is defines as follows: typedef __success(return >= 0) long HRESULT; Doing some research I learned that the "__success" macro is part of the Microsoft source code annotation language SAL and is defined in…
Sabuncu
  • 5,095
  • 5
  • 55
  • 89
5
votes
3 answers

How do I choose between E_NOTIMPL and E_NOINTERFACE?

I have managed to confuse myself whether I should return E_NOTIMPL or E_NOINTERFACE from my COM server methods. I have a class with two functions I have overridden from the class I inherited from, both of those functions do nothing since they…
Jtello
  • 752
  • 1
  • 5
  • 17
4
votes
1 answer

How to return HRESULT from C# to C++ instead of throwing Exceptions?

Currently i am writing a C# COM Server which will be used by a C++ client. I want to return a certain HRESULT to the C++ code when an specific exception is raised in the C# code like the following // C# COM Server Code public void MyMethod() { …
wsw
  • 831
  • 7
  • 9
4
votes
1 answer

E_ACCESSDENIED on CoCreateInstance, where it used to work

I have some code that used to work, but recently stopped. It's in an Adobe Reader Plugin, and the latest Reader version has a "Protected Mode" which causes my problem. My plugin can load some of my normal dlls, which load…
Tim
  • 8,912
  • 3
  • 39
  • 57
4
votes
2 answers

Where I could find a reference for all the "COR_E_" HRESULTs wrapped by .NET framework?

I'm writing a simple Enum for interop that will define only a little percentage of the common HRESULT values that we can get by a Win32 function. By the moment, I have defined these values that I taken from this MSDN reference and other…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
4
votes
1 answer

Conversion of HRESULT between C++ and C#

I have C++ code which is called from C# using reflection and etc. The weird thing I encountered is while on C++ side function declaration looks like this dppFUNC(HRESULT) dppOnlineGetBalanceInfo( On C# side it is declared…
user5528169
4
votes
1 answer

Unhandled Exception in vc++ - HRESULT failed

I know the VC++6.0 is very old language, but i don't have a choice, i am just maintaining an existing program, and i encounter this error Unhandled exception in Assess.exe (KERNELBASE.DLL): 0xE06D7363: Microsoft C++ Exception And here is my code …
Wielder
  • 156
  • 2
  • 15
4
votes
2 answers

Handling CoCreateInstance return value

Here's a code sample creating a COM object: CComPtr pFilter; auto hr = CoCreateInstance(CLSID_DMOWrapperFilter, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast(&pFilter)); I've seen somewhere that checking if…
Dalamber
  • 1,009
  • 1
  • 12
  • 32
3
votes
1 answer

Correct format specifier for printing HRESULT with Delphi 6's Format() statement in hexadecimal format?

I have a Delphi 6 application that uses the DSPACK component library. That library prints a log line when in debug mode whenever a particular DirectShow operation fails. Here's the relevant souce code line: format('Error %08lX from FillBuffer!!!',…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
3
votes
2 answers

Finding HRESULT '-2146697191' Error message - clickonce setup error

I want to know what exactly HRESULT error means? This is occuring when user is trying to download clickonce application from our server. Hence to figure what is the problem behind it I want to know what does this HRESULT number refers to. I tried to…
JPReddy
  • 63,233
  • 16
  • 64
  • 93
3
votes
2 answers

Open Excel 2016 file failed with HRESULT: 0x800706BE

The simple VB.NET code for opening up an existing Excel file consistently failed at open command with the following error: The remote procedure call failed. (Exception from HRESULT: 0x800706BE) I've searched Stack Overflow and Microsoft sites for…
For Comment
  • 1,139
  • 4
  • 13
  • 25
1
2
3
11 12