473,326 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Invalid Error Message while utilising umanaged DLL

Hi All,

I have a peculiar kind of issue after converting VC and VB code from
Visual studio 6.0 to Visual Studio 2005.

We have the business logic in the VC code which uses the ATL framework
and implements a COM server. VB code gives the GUI part of the project,

For reporting custom errors like invalid login, we use AtlReportError
method to report error from the VC code side.

While utilising the built VC dlls(unmanaged code), using VB 6.0
applications, we get the Error message text( like in the case of failed
login), exactly as we require. But while utilising the VC dlls in a VB
2005 application, instead of getting a error message we see "Exception
from HRESULT : 0x8004B411".

I do not know the reason cause for displaying such a error message
instead of the custom error message. Not sure whether i need to change
any settings in the project( any problem with interop dlls??).
I would appreciate your earnest help in this regard.

Thank you,
Sugan.

Dec 12 '06 #1
2 1532
Hi All,

I read through the few MSDN
posts(http://blogs.msdn.com/jaredpar/archi...11/416300.aspx)
and also read through COM and .NET Interoperability by ANDREW TROELSEN
pdf. As i'm only a beginner in COM & ATL programming, I could
understand very till from the documents.

This is my current understanding. I need to implement IErrorInfo
interface in my COM class to pass on the error description. VB .Net
client would look for IErrorInfo interface and get the error
description from the interface.

My project has classes like this.

CMyComClass which inturn implements IRemoteNetwork and
ISoftPhoneInterface.

Exceptions from CMyComClass methods return the required error message
when the instance of CMyComClass is utilised in VB .Net client. Where
as when VB .Net client calls a method from IRemoteNetwork(implemented
in CMyComClass), the exception returns only HRESULT error instead of
the required error description. So I think that i should implement the
IErrorInfo interface in CMyComClass.

Please let me know if my understanding is correct.

Thank you,
Sugan.

Sugan wrote:
Hi All,

I have a peculiar kind of issue after converting VC and VB code from
Visual studio 6.0 to Visual Studio 2005.

We have the business logic in the VC code which uses the ATL framework
and implements a COM server. VB code gives the GUI part of the project,

For reporting custom errors like invalid login, we use AtlReportError
method to report error from the VC code side.

While utilising the built VC dlls(unmanaged code), using VB 6.0
applications, we get the Error message text( like in the case of failed
login), exactly as we require. But while utilising the VC dlls in a VB
2005 application, instead of getting a error message we see "Exception
from HRESULT : 0x8004B411".

I do not know the reason cause for displaying such a error message
instead of the custom error message. Not sure whether i need to change
any settings in the project( any problem with interop dlls??).
I would appreciate your earnest help in this regard.

Thank you,
Sugan.
Dec 13 '06 #2
Hi Group,

Any ideas??

Sugan wrote:
Hi All,

I read through the few MSDN
posts(http://blogs.msdn.com/jaredpar/archi...11/416300.aspx)
and also read through COM and .NET Interoperability by ANDREW TROELSEN
pdf. As i'm only a beginner in COM & ATL programming, I could
understand very till from the documents.

This is my current understanding. I need to implement IErrorInfo
interface in my COM class to pass on the error description. VB .Net
client would look for IErrorInfo interface and get the error
description from the interface.

My project has classes like this.

CMyComClass which inturn implements IRemoteNetwork and
ISoftPhoneInterface.

Exceptions from CMyComClass methods return the required error message
when the instance of CMyComClass is utilised in VB .Net client. Where
as when VB .Net client calls a method from IRemoteNetwork(implemented
in CMyComClass), the exception returns only HRESULT error instead of
the required error description. So I think that i should implement the
IErrorInfo interface in CMyComClass.

Please let me know if my understanding is correct.

Thank you,
Sugan.

Sugan wrote:
Hi All,

I have a peculiar kind of issue after converting VC and VB code from
Visual studio 6.0 to Visual Studio 2005.

We have the business logic in the VC code which uses the ATL framework
and implements a COM server. VB code gives the GUI part of the project,

For reporting custom errors like invalid login, we use AtlReportError
method to report error from the VC code side.

While utilising the built VC dlls(unmanaged code), using VB 6.0
applications, we get the Error message text( like in the case of failed
login), exactly as we require. But while utilising the VC dlls in a VB
2005 application, instead of getting a error message we see "Exception
from HRESULT : 0x8004B411".

I do not know the reason cause for displaying such a error message
instead of the custom error message. Not sure whether i need to change
any settings in the project( any problem with interop dlls??).
I would appreciate your earnest help in this regard.

Thank you,
Sugan.
Dec 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: Brad | last post by:
I have an intranet app that has just started sporadically getting the following error "The viewstate is invalid for this page and might be corrupted." By sproadic I mean 3-4 times during the past...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
4
by: Patrick Sullivan | last post by:
dim s_err as stringbuilder dim xx(6) as double dim ret_flag as integer ' This is a function to call an unmanaged C-style library function. ' The lib function fills an array of 6 doubles or...
0
by: Sebastian Dau | last post by:
Hello Newsgroup, I'm struggeling with wrapping a dll using MFC CStrings. Code: class CLASSEXPORTDLL_API CClassExportDll { public:
2
by: Argirop | last post by:
I have a page Default.aspx. Its first line is the following: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs"...
0
by: Sugan | last post by:
Hi All, I have a peculiar kind of issue after converting VC and VB code from Visual studio 6.0 to Visual Studio 2005. We have the business logic in the VC code which uses the ATL framework...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.