472,985 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Invalid Error Message while utilising umanaged DLL in VB .Net client

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??).

updated::
-------------
I also read through the few MSDN
postshttp://blogs.msdn.com/jaredpar/archive/2005/05/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.

But i do not have a clear picture to do this. So can someone post
sample code to accomplish this or explain in detail how should I
proceed further.

Thank you,
Sugan.

Dec 14 '06 #1
0 1245

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

Similar topics

1
by: Patrick Dunnigan | last post by:
Hi, I am attempting a bulk copy from a c program into SQL Server 2000 using DBLib in freeTDS 0.63 RC11 (gcc 3.4.3, RH 9). I am getting an error message that I cannot find any documentation on. ...
3
by: Paul | last post by:
I have an Access 2000 database with a form that is giving me some major headaches. When you open the form, it displays all records and allows editing, but has AllowAdditions set to False so that...
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...
6
by: Steve Crawford | last post by:
I've started seeing the following in my logs: FATAL: invalid frontend message type 8 I searched back over a month and there are 5 instances of this error of which 4 are in the last 24 hours. ...
9
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
3
by: stephenedavis | last post by:
I keep getting the error message "Invalid postback or callback argument" on my asp.net 2.0 pages in Internet Explorer. These pages are simple, and just to make sure there is nothing wrong with the...
3
by: Nathan Sokalski | last post by:
I am recieving the following error on the second postback of a page I have written: The state information is invalid for this page and might be corrupted Stack Trace: ...
2
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...
4
by: Miha V | last post by:
Hi! We are using ASMX web service with WSE (we're using WS-Addressing) and IIS returns HTTP status code 200 even if XML is malformed (it can contain illegal characters in it). The request...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.