When I am using the 'Fortran OM Server Wizard', I can not create 2 Dual interfaces for the same class !
The problem is that I have to communicate with some existing BB and I++ objects which are expecting to access 2 different interfaces (ID) corresponding to a given class (Pro_ID)
These are two ways to manage the data of a unique given object.

The problem is that it seems that only one of the interface can be declared as Dual and this is causing incompatibility!

Is it exist some way to solve this problem ?

Best Regards


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You did not clearly state why you need two Dual interfaces on your object. You can communicate with VB and C++ objects/clients expecting to access 2 different interfaces on your object with custom interfaces on your object. Use the oleautomation attribute.

If you had two dual interfaces on the object which one do you want to answer QueryInterface for IDispatch?

Hi Eric,

> If you had two dual interfaces on the object which one do you want to answer QueryInterface for IDispatch?

The Wizard intentionally disallows this because of the issue that John pointed out.


I need 2 dual interfaces because I have to fit with the TLB I received as definition of the standard for the creation of my objects.
I can see that if I don't work with DUAL interfaces, the routine table offset is not OK. This is due to the additional standard interfaces introduced by the Wizard.
=> If I have DUAL + non DUAL => access to the non DUAL is not working because of the offset (visible when I am creating a TB from my DLL)!
Concerning the answer to IDispatch, I was thinking that it was the goal of the 'default interface' check box to define the default one !

I give you a copy of the declaration section of an existing VB object in wich I have 2 deferent interfaces for the same object class this can help you to identify what I need.

MultiUse = -1 'True
Attribute VB_Name = "HDAPack"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

Option Explicit
#Const TRACING = True
Const E_NOTIMPL = &H80004001
Dim m_EqServer As ICapeThermoEquilibriumServer
Implements ICapeIdentification
Implements ICapeThermoPropertyPackage
code for the different interfaces is starting after.

After connecting using the ProgID, I can use both interfaces without any problem.

Best Regards


Leave a Comment

Please sign in to add a comment. Not a member? Join today