Hello
I'm trying to deploy an application which uses an library that embeds an ActiveX control with AxHost in C#.
When I run the installed app on our test rig I catch and present the following exception:
Unexpected exception.
This application has failed to start because the application configuration is incorrect. Reinstalling the app...
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 {
HRESULT GetOtherFoo([out] IFoo** ppFoo);
HRESULT Bar();
};
Which of the follow...
The System.Exception.HResult property is protected. How can I peek inside an exception and get the HResult without resorting to reflection or other ugly hacks?
Here's the situation:
I want to write a backup tool, which opens and reads files on a system.
I open the file with FileAccess.Read and FileShare.ReadWrite, according to this...
I just spent way too long trying to diagnose why, in the following snippet of code, the ProcessEvent() method seemed to be ignoring the false value I passed in for aInvokeEventHandler:
HRESULT
CEventManager::
Process(Event anEvent)
{
return (m_pPool->GetFsm()->ProcessEvent(anEvent), false);
}
// Definition of ProcessEvent()
HRESUL...
Hi there.
I have a MOSS 2007 site which I'm an admin for. In the 'People and Groups' area for a site, I'm trying to add a user as a site owner. On the 'Add User' page, I add the name of the user and click 'OK', after which I get this totally useless error:
Exception from HRESULT: 0x80040E37
at
Microsoft.SharePoint.Library.SPRequ...
I already have a project that uses alot of COM, and HRESULTS. ANyways i was wondering if its possible to define your own HRESULT, AND be able to use the FormatMessage() for our own HRESULT?
I dug around and cant find anything. Any ideas?
EDIT
Basically i want to define a set of my own HRESULT's instead of just returning E_FAIL. Or one...
Hi guys,
I am working on a project in C# to create a forms application. I would like to use IFileDialog and other functionality that is part of the native Windows API (or however ti should be called).
Starting out I knew absolutely nothing about interop or the Windows API. I am starting to learn but at times it can be hard to find very...
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 Microsoft.SharePoint.Search.Query;
Page load event:
GridView grd = new GridView();
...
I'm seeing the following exception in my managed (C#) app calling an unmanaged assembly:
Caught:System.IO.FileLoadException 'A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)'
What does this HRESULT mean, and where should I start in diagnosing this?
...
Hello, 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 this nasty exception:
Message:
Error HRESULT E_FAIL has been returned from a cal...
I just looked at the definition of HRESULT in VS2008. WinNT.h has the following line:
typedef __success(return >= 0) long HRESULT;
What exactly does it mean? It doesn't even look like C or C++ to my untrained eye
...
I am trying to generate a powerpoint presentation in C#. Everything works well on my machine but when I deploy it on Server I receive HRESULT exception on the creation of chart. Tables and other shapes work on both sides but I dont whats wrong with the chart when I generate it on Server. Can someone help here?
...
Hi Guys,
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 going on ?
Could not load file or assembly 'Microsoft.Office.Interop.PowerPoint12...
Definition of SUCCEEDED(): #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
Background: When an Ok button is clicked on a dialog, I need to return an HRESULT value hr such that SUCCEEDED(hr) is true. If Cancel button is clicked, I need to return a negative value. I could have used bools, but that would break the existing pattern (usually th...
Hello all,
I've got a stange situation in visual studio 2008 C++. I work on code that was originally written for visual studio 2003, where everything works well. Now, ported to VS 2008, the exception handling, which unfortuantely exists widely in the code, does not work anymore. standard code example:
try
{
HRESULT hr = S_OK;
...
Hi all ,
I'm trying to parse HTML page usging Microsoft.mshtml . I get an exception : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Any idea how to resolve this problem .
Thanks
in advance ...
...
I am using the GMFBridge directshow filter from c# and the import library seems to discard the HRESULTs. i.e
[id(5), helpstring("Create render filters in empty render graph")]
HRESULT CreateRenderGraph(
[in] IUnknown* pSourceGraphSinkFilter,
[in] IUnknown* pRenderGraph,
[out, retval] IUnknown** pRenderGraphSourceFilter);
[id(6), ...
We have a big body of code that was refactored so that stuff which was plain-old C++ is now COM.
I've been spending the last couple of days hunting out places in which we missed the fact that a function that previously returned a bool now returns an HRESULT (the problem is compound by the fact that S_OK == false).
Is there a way to det...
I have a need to pass in an HRESULT value to a program as a command line argument. I had intended to do so by passing the hex value, e.g.:
>receiver.exe 0x80048836
I'm trying to convert this string representation back into an HRESULT using wcstol, eg:
HRESULT hr = wcstol(argv[2], NULL, 16);
However, the value of the original HRESUL...