By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Invalid Error Message while utilising umanaged DLL

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.