- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
ERIC MARECHAL
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
ERIC MARECHAL
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
If you had two dual interfaces on the object which one do you want to answer QueryInterface for IDispatch?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Leo
> 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.
Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
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
ERIC MARECHAL
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.
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
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
ERIC MARECHAL
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page